[
https://jira.codehaus.org/browse/MJBOSSPACK-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=274933#comment-274933
]
Benjamin Bentmann commented on MJBOSSPACK-40:
---------------------------------------------
That's interesting, for the most part, Maven 2 and 3 agree:
{noformat}
Maven 3:
[DEBUG] org.example.jboss-sar-test:sar-module:jboss-sar:0.0.1-SNAPSHOT
[DEBUG] org.example.jboss-sar-test:jar-module:jar:0.0.1-SNAPSHOT:provided
[DEBUG] log4j:log4j:jar:1.2.16:compile
Maven 2:
[INFO] [dependency:tree {execution: default-cli}]
[INFO] org.example.jboss-sar-test:sar-module:jboss-sar:0.0.1-SNAPSHOT
[INFO] \- org.example.jboss-sar-test:jar-module:jar:0.0.1-SNAPSHOT:provided
[INFO] \- log4j:log4j:jar:1.2.16:compile (scope managed from provided)
Maven 2/3:
[INFO] [dependency:list {execution: default-cli}]
[INFO]
[INFO] The following files have been resolved:
[INFO] log4j:log4j:jar:1.2.16:compile
[INFO] org.example.jboss-sar-test:jar-module:jar:0.0.1-SNAPSHOT:provided
{noformat}
Where they do no longer agree is when the plugin asks for all artifacts that
belong to the runtime classpath of the project ({{@requiresDependencyResolution
runtime}}). Maven 3 says {{log4j:log4j:jar:1.2.16:compile}} is in, Maven 2 says
it's out. This discrepancy is due to the way scope filtering is implemented,
Maven 3 only looks at the scope of the current artifact, whereas Maven 2 looks
at the scope of the artifact and all its parent artifacts from the dependency
tree (jar-module being a parent of log4j and being in provided which doesn't
match the runtime classpath causes exclusion of log4j).
> Transitive dependencies specified in dependencyManagement section included in
> sar
> ---------------------------------------------------------------------------------
>
> Key: MJBOSSPACK-40
> URL: https://jira.codehaus.org/browse/MJBOSSPACK-40
> Project: Maven 2.x JBoss Packaging Plugin
> Issue Type: Bug
> Components: sar
> Affects Versions: 2.2
> Environment: Windows 7, Maven 3.0.3, JDK 1.6.0.24 x64
> Reporter: Oleg Koptelov
> Assignee: Anders Hammar
> Attachments: jboss-sar-test.zip
>
>
> Parent project contains 2 modules: sar-module and jar-module. sar-module
> depends on jar-module with scope=provided. jar-module depends on 3rd party
> jar with scope=compile. Dependency on the 3rd party jar specified in
> dependencyManagement section of the parent pom. Execution of mvn clean
> package command produces sar which contains the 3rd party jar in the lib
> directory. If the jar removed from dependencyManagement, the jar is not
> included in the sar.
> Zip with the setup to reproduce the issue is attached.
--
This message is automatically generated by JIRA.
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