[ 
http://jira.codehaus.org/browse/MEXEC-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Bentmann closed MEXEC-52.
----------------------------------

    Resolution: Not A Bug
      Assignee: Benjamin Bentmann

bq. However running from the client folder mvn exec:exec -PMetro is causing the 
default CXF libraries to load in addition to the Metro ones,
Which is expected given CXF is a dependency of the service-war the client 
module depends on:
{noformat}
[INFO] [dependency:tree {execution: default-cli}]
[INFO] com.mycompany.webservice:client:jar:1.0-SNAPSHOT
[INFO] +- com.mycompany.webservice:service-war:jar:jaxws:1.0-SNAPSHOT:compile
[INFO] |  +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.2.9:compile
{noformat}

Furthermore, profile activation on the CLI via {{-P}} only affects the profiles 
in currently built projects, never in dependencies.

> 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
>            Assignee: Benjamin Bentmann
>
> 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


Reply via email to