Can I make one maven profile activate another?

JavaMaven 2

Java Problem Overview


I have 2 maven2 profiles, selenium and jspc. Now for "selenium" id'd like to have an implicit activation of "jspc", so that I don't have to write mvn -Pselenium,jspc from the command line. Is this possible ?

Java Solutions


Solution 1 - Java

You can't "chain" profile activations (maven reference) but you can activate them both through the same property:

<activation>
  <property>
    <name>profile.selenium</name>
  </property>
</activation>

And the run mvn -Dprofile.selenium

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionkrosenvoldView Question on Stackoverflow
Solution 1 - JavaRobert MunteanuView Answer on Stackoverflow