Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I make one maven profile activate another?

Tags:

java

maven-2

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 ?

like image 991
krosenvold Avatar asked Jun 03 '09 06:06

krosenvold


People also ask

How do I run a specific profile in Maven?

Open Maven settings. m2 directory where %USER_HOME% represents the user home directory. If settings. xml file is not there, then create a new one. Add test profile as an active profile using active Profiles node as shown below in example.


1 Answers

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

like image 136
Robert Munteanu Avatar answered Sep 21 '22 14:09

Robert Munteanu