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

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -