maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoît Berthonneau <ben...@berthonneau.com>
Subject RE: Work-around to the Maven restriction on AND condition profile activation?
Date Sat, 01 Feb 2014 11:40:47 GMT
Hi Dave,

I don't what is the purpose of your double activation profile but I did something that could
help you.
I implement 2 profiles: "should-i-do-something" and "do-something".

 - The "should-i-do-something" profile is automatically activated by the existence of a file
in a project, but the phase of all plugins involved was set to "none" (that's the trick)
 - The "do-something" profile is activated on demand and just set the phase(s) of the plugins
involved in the previous profile

Hope this help,
Benoît.


-----Message d'origine-----
De : laredotornado-3 [mailto:laredotornado@gmail.com] 
Envoyé : vendredi 31 janvier 2014 22:19
À : users@maven.apache.org
Objet : Work-around to the Maven restriction on AND condition profile activation?

Hi,

I’m using Maven 3.1.1 and Java 1.6.  From reading over posts online, it seems a profile
cannot be activated based on two conditions (i.e. there is no such thing as logical AND in
Maven profile activation).  So I was wondering if someone knows of a work-around for what
I want to do.  I want to run a plugin if a flag is given on the command line (“-DdeployWars”)
and a file is present in my module, e.g.

                        <activation>
                                <file>

<exists>${basedir}/src/main/webapp/WEB-INF/web.xml</exists>
                                </file>
                        </activation>

Unfortunately, its not an option to include the AND profile activation extension (https://github.com/johnjcool/and-activation-profile-selector)
in our Maven installation, unless there is some way to reference that extension from the Maven
project itself.

Thanks for your thoughts, - Dave



--
View this message in context: 
http://maven.40175.n5.nabble.com/Work-around-to-the-Maven-restriction-on-AND-condition-profile-activation-tp5782919.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message