maven-exec-plugin <classpath/> not ignoring <activeByDefault/> when explicit
profile given
------------------------------------------------------------------------------------------
Key: MEXEC-52
URL: http://jira.codehaus.org/browse/MEXEC-52
Project: Maven 2.x Exec Plugin
Issue Type: Bug
Components: exec
Affects Versions: 1.1
Reporter: Glen Mazza
When determining the list of dependencies for running a Java class, the
maven-exec-plugin's <classpath/> setting is not ignoring the <activeByDefault/>
setting (as it should) when an explicit -Pprofile setting is given on the
command-line.
mvn exec:exec -Pbcd
<profile>
<id>abc</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
....
</profile>
Should result in just bcd's dependencies getting listed into the classpath, not
the sum of abc's and bcd's.
As stated on the Maven profile page[1]: "[activeByDefault profiles] will
automatically be active for all builds unless another profile in the same pom
is activated using one of the previously described methods. All profiles that
are active by default are automatically deactivated when a profile in the pom
is activated on the command line or through its activation config."
In my case, these three pom files[2] together allow for creating web service
providers and clients using either Glassfish Metro or Apache CXF web service
stack. In the trunk/pom.xml file, if I set activeByDefault for either Metro or
CXF, the maven-exec-plugin <classpath/> setting always adds those dependencies
in. If I explicitly set -PMetro or -PCXF command-line, it will add those
dependencies on top of whatever is <activeByDefault/>. But in reality, an
explicit profile setting is supposed to completely replace whatever
dependencies would be listed in <activeByDefault/>.
[1] http://maven.apache.org/guides/introduction/introduction-to-profiles.html
[2] http://www.jroller.com/gmazza/date/20080417#WFstep3
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email