Quantcast
Viewing all articles
Browse latest Browse all 5648

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

Viewing all articles
Browse latest Browse all 5648

Trending Articles