[
http://jira.codehaus.org/browse/MEXEC-52?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=227883#action_227883
]
Robert Scholte commented on MEXEC-52:
-------------------------------------
I doubt this is an exec-maven-plugin bug. Profiles and dependencies are under
control of Maven. The plugin just gathers the dependecies which Maven has bound
to the project (based on the profile(s)), the plugin has absolutely no clue if
these dependecies were added by profile or not.
If you run {{mvn exec:exec -Pbcd -X}} you should be able to see which files are
added to the classpath. This should give more feedback.
> 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