[
https://issues.apache.org/jira/browse/MNG-5460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov closed MNG-5460.
-------------------------------
Resolution: Cannot Reproduce
Cannot reproduce with recent Maven version:
{noformat}
$ /d/Entwicklung/Programme/apache-maven-3.3.9/bin/mvn -V dependency:tree
-Pmyprofile
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5;
2015-11-10T17:41:47+01:00)
Maven home: D:\Entwicklung\Programme\apache-maven-3.3.9
Java version: 1.8.0_112, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_112\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] myProject
[INFO] modA
[INFO] modB
[INFO] modC
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myProject 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ myProject ---
[INFO] com.mycompany.app:myProject:pom:1.0-SNAPSHOT
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building modA 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ modA ---
[INFO] com.mycompany.app:modA:jar:1.0-SNAPSHOT
[INFO] \- junit:junit:jar:4.11:test
[INFO] \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building modB 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ modB ---
[INFO] com.mycompany.app:modB:jar:1.0-SNAPSHOT
[INFO] +- com.mycompany.app:modA:jar:1.0-SNAPSHOT:provided
[INFO] \- junit:junit:jar:4.11:test
[INFO] \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building modC 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ modC ---
[INFO] com.mycompany.app:modC:jar:1.0-SNAPSHOT
[INFO] +- com.mycompany.app:modB:jar:1.0-SNAPSHOT:compile
[INFO] \- junit:junit:jar:4.11:test
[INFO] \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] myProject .......................................... SUCCESS [ 0.538 s]
[INFO] modA ............................................... SUCCESS [ 0.024 s]
[INFO] modB ............................................... SUCCESS [ 0.012 s]
[INFO] modC ............................................... SUCCESS [ 0.005 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.767 s
[INFO] Finished at: 2016-12-18T01:30:14+01:00
[INFO] Final Memory: 12M/241M
[INFO] ------------------------------------------------------------------------
{noformat}
> Transitive dependency with variable scope
> ------------------------------------------
>
> Key: MNG-5460
> URL: https://issues.apache.org/jira/browse/MNG-5460
> Project: Maven
> Issue Type: Bug
> Components: Dependencies
> Affects Versions: 3.0
> Environment: Windows xp
> Reporter: Continuus Auchan
> Attachments: myproject.zip
>
>
> We have a bad transitivity resolution when using variable scopes in our
> project hierarchy on maven 3.
> The same test on maven 2 gives us a correct behavior.
> I've got a pom parent project with 3 modules.
> In the parent pom I define :
> -a property "myscope" with value "compile"
> -a profile "myprofile" with a property "myscope" with value "provided"
> The moduleA depends on nothing
> The moduleB depends on moduleA with scope equals to myscope
> The moduleC depends on moduleB with scope equals provided
> When I enter the command "mvn dependency:tree -P myprofile" I've got
> {quote}
> --- maven-dependency-plugin:2.1:tree (default-cli) @ modB ---
> com.mycompany.app:modB:jar:1.0-SNAPSHOT
> \- com.mycompany.app:modA:jar:1.0-SNAPSHOT:provided
> {quote}
> which is OK, but I also have
> {quote}
> --- maven-dependency-plugin:2.1:tree (default-cli) @ modC ---
> com.mycompany.app:modC:jar:1.0-SNAPSHOT
> \- com.mycompany.app:modB:jar:1.0-SNAPSHOT:compile
> \- com.mycompany.app:modA:jar:1.0-SNAPSHOT:compile
> {quote}
> where i do not excpect modA to appear.....
> You 'll find in attachment the sample project.
> Note that the command "mvn dependency:tree" has the correct hehavior.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)