Maven implicit profile Activation -


i have 2 maven profiles

  1. buildprofile
  2. testprofile

so whenever do

mvn clean install -p buildprofile

it should activate testprofile implicitly first , if testprofile fails should not proceed buildprofile , mark result failure.

i want testprofile activated when run buildprofile.

mvn clean install -p buildprofile --> testprofile(if testprofile success proceed buildprofile) + buildprofile

mvn clean install -p anotherprofile ---> anotherprofile

is there anyways achieve this?

it not possible maven's profiles mechanism itself, can use profile activation on property, e.g.

<activation>     <property>         <name>buildprofile</name>     </property> </activation> 

then same property can activate multiple profiles. maven call looks this:

mvn -dbuildprofile ... 

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -