[jira] [Updated] (MDEP-558) Dependency version from test scope leaks into compile scope

2017-04-29 Thread Andrei Tomashpolskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/MDEP-558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Tomashpolskiy updated MDEP-558:
--
Attachment: mvn_package.txt

> Dependency version from test scope leaks into compile scope
> ---
>
> Key: MDEP-558
> URL: https://issues.apache.org/jira/browse/MDEP-558
> Project: Maven Dependency Plugin
>  Issue Type: Bug
>  Components: tree
>Affects Versions: 2.8, 2.10, 3.0.0
>Reporter: Andrei Tomashpolskiy
> Attachments: mvn_package.txt
>
>
> Despite test scope being non-transitive [1] it's still used to resolve 
> versions of compile dependencies. This might be causing issues in IDEs that 
> rely on the Dependency plugin to assemble the application's classpath.
> E.g. for the following project configuration *javax.servlet-api* version is 
> resolved to *3.0.1* (using nearest-first strategy to resolve conflicts):
> {noformat}
> project1
> |-- project2:compile
> |..|-- jetty-server:compile
> ||-- javax.servlet-api:3.1.0:compile
> |-- jersey-test-framework-core:test
> |..|-- javax.servlet-api:3.0.1:compile
> {noformat}
> My understanding is that it should rather be resolved to 3.1.0, because 
> version 3.0.1 stems from the test scope and should be ignored (AFAIK Maven 
> Shade plugin works in that way).
> Please see a runnable code example in 
> https://github.com/atomashpolskiy/maven-transitive-test-dependencies
> Thank you!
> [1] 
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MDEP-558) Dependency version from test scope leaks into compile scope

2017-04-29 Thread Andrei Tomashpolskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/MDEP-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989801#comment-15989801
 ] 

Andrei Tomashpolskiy commented on MDEP-558:
---

[~michael-o], I've just checked, and it does look the same. I've attached the 
output for `mvn -X package`.

> Dependency version from test scope leaks into compile scope
> ---
>
> Key: MDEP-558
> URL: https://issues.apache.org/jira/browse/MDEP-558
> Project: Maven Dependency Plugin
>  Issue Type: Bug
>  Components: tree
>Affects Versions: 2.8, 2.10, 3.0.0
>Reporter: Andrei Tomashpolskiy
> Attachments: mvn_package.txt
>
>
> Despite test scope being non-transitive [1] it's still used to resolve 
> versions of compile dependencies. This might be causing issues in IDEs that 
> rely on the Dependency plugin to assemble the application's classpath.
> E.g. for the following project configuration *javax.servlet-api* version is 
> resolved to *3.0.1* (using nearest-first strategy to resolve conflicts):
> {noformat}
> project1
> |-- project2:compile
> |..|-- jetty-server:compile
> ||-- javax.servlet-api:3.1.0:compile
> |-- jersey-test-framework-core:test
> |..|-- javax.servlet-api:3.0.1:compile
> {noformat}
> My understanding is that it should rather be resolved to 3.1.0, because 
> version 3.0.1 stems from the test scope and should be ignored (AFAIK Maven 
> Shade plugin works in that way).
> Please see a runnable code example in 
> https://github.com/atomashpolskiy/maven-transitive-test-dependencies
> Thank you!
> [1] 
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MDEP-558) Dependency version from test scope leaks into compile scope

2017-04-29 Thread Andrei Tomashpolskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/MDEP-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989813#comment-15989813
 ] 

Andrei Tomashpolskiy commented on MDEP-558:
---

https://issues.apache.org/jira/browse/MNG-1378
https://issues.apache.org/jira/browse/MNG-4675
https://issues.apache.org/jira/browse/MNG-6058
Seems like it is a known issue

> Dependency version from test scope leaks into compile scope
> ---
>
> Key: MDEP-558
> URL: https://issues.apache.org/jira/browse/MDEP-558
> Project: Maven Dependency Plugin
>  Issue Type: Bug
>  Components: tree
>Affects Versions: 2.8, 2.10, 3.0.0
>Reporter: Andrei Tomashpolskiy
> Attachments: mvn_package.txt
>
>
> Despite test scope being non-transitive [1] it's still used to resolve 
> versions of compile dependencies. This might be causing issues in IDEs that 
> rely on the Dependency plugin to assemble the application's classpath.
> E.g. for the following project configuration *javax.servlet-api* version is 
> resolved to *3.0.1* (using nearest-first strategy to resolve conflicts):
> {noformat}
> project1
> |-- project2:compile
> |..|-- jetty-server:compile
> ||-- javax.servlet-api:3.1.0:compile
> |-- jersey-test-framework-core:test
> |..|-- javax.servlet-api:3.0.1:compile
> {noformat}
> My understanding is that it should rather be resolved to 3.1.0, because 
> version 3.0.1 stems from the test scope and should be ignored (AFAIK Maven 
> Shade plugin works in that way).
> Please see a runnable code example in 
> https://github.com/atomashpolskiy/maven-transitive-test-dependencies
> Thank you!
> [1] 
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MDEP-558) Dependency version from test scope leaks into compile scope

2017-04-29 Thread Andrei Tomashpolskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/MDEP-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989815#comment-15989815
 ] 

Andrei Tomashpolskiy commented on MDEP-558:
---

Also see https://issues.apache.org/jira/browse/MNG-5188
The last comment says that it has been fixed in 3.1.0 and newer. I'm using 
3.3.9, so apparently the issue was re-introduced at some point.

> Dependency version from test scope leaks into compile scope
> ---
>
> Key: MDEP-558
> URL: https://issues.apache.org/jira/browse/MDEP-558
> Project: Maven Dependency Plugin
>  Issue Type: Bug
>  Components: tree
>Affects Versions: 2.8, 2.10, 3.0.0
>Reporter: Andrei Tomashpolskiy
> Attachments: mvn_package.txt
>
>
> Despite test scope being non-transitive [1] it's still used to resolve 
> versions of compile dependencies. This might be causing issues in IDEs that 
> rely on the Dependency plugin to assemble the application's classpath.
> E.g. for the following project configuration *javax.servlet-api* version is 
> resolved to *3.0.1* (using nearest-first strategy to resolve conflicts):
> {noformat}
> project1
> |-- project2:compile
> |..|-- jetty-server:compile
> ||-- javax.servlet-api:3.1.0:compile
> |-- jersey-test-framework-core:test
> |..|-- javax.servlet-api:3.0.1:compile
> {noformat}
> My understanding is that it should rather be resolved to 3.1.0, because 
> version 3.0.1 stems from the test scope and should be ignored (AFAIK Maven 
> Shade plugin works in that way).
> Please see a runnable code example in 
> https://github.com/atomashpolskiy/maven-transitive-test-dependencies
> Thank you!
> [1] 
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (MNG-5188) Test scope dependency incorrectly promoted to compile scope

2017-04-29 Thread Andrei Tomashpolskiy (JIRA)

[ 
https://issues.apache.org/jira/browse/MNG-5188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15989869#comment-15989869
 ] 

Andrei Tomashpolskiy commented on MNG-5188:
---

[~rfscholte],
Apparently this is broken again (checked in 3.3.9 and 3.5.0). See MDEP-558 for 
a runnable example.
Also see MNG-6058 in case this task cannot be re-opened.

> Test scope dependency incorrectly promoted to compile scope
> ---
>
> Key: MNG-5188
> URL: https://issues.apache.org/jira/browse/MNG-5188
> Project: Maven
>  Issue Type: Bug
>  Components: Dependencies
>Affects Versions: 3.0.3
> Environment: Linux 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 
> UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
> java version "1.6.0_23"
> OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre10-0ubuntu5)
> OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
>Reporter: Harald Wellmann
>Assignee: Robert Scholte
> Fix For: 3.1.0
>
> Attachments: junit-transitive.zip
>
>
> I'm having a strange issue where a module with three dependencies has an 
> unexpected transitive dependency on JUnit with compile scope (where test 
> scope would be expected).
> I've isolated this problem in a small example project which is attached. 
> My module2 depends on 
> 1) module1
> 2) test-deps
> 3) module1:test-jar
> module1 depends on Apache OpenJPA which has a compile scope transitive 
> dependency on JUnit (not really needed, I think, but that's the way it was 
> released). module1 also has a test scope dependency on JUnit for its own 
> JUnit tests.
> As I don't want a compile scope dependency on JUnit in my module2, I use an 
>  for JUnit.
> test-deps has POM packaging, it simply collects the test dependencies I 
> normally need in all modules of my project. test-deps uses the default 
> compile scope for each dependency (junit and spring-test in this example). 
> module2 has a test scope dependency on test-deps, so by Maven transitive 
> scope resolution, the junit dependency is propagated to module2 with test 
> scope.
> Since some of the module2 JUnit tests are derived from base classes in module 
> 1, module2 depends on the test-jar of module1 with scope test.
> Thus, none of the three dependencies should cause a compile scope dependency 
> on junit, but the combination of the three seems to have some fatal effect.
> This looks like a bug in Maven's dependency scope resolution.
> To reproduce, unpack the attachment, cd to junit-transitive, run mvn -X clean 
> install and look at the compile classpath for module2 in the log.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (MDEP-558) Dependency version from test scope leaks into compile scope

2017-03-13 Thread Andrei Tomashpolskiy (JIRA)
Andrei Tomashpolskiy created MDEP-558:
-

 Summary: Dependency version from test scope leaks into compile 
scope
 Key: MDEP-558
 URL: https://issues.apache.org/jira/browse/MDEP-558
 Project: Maven Dependency Plugin
  Issue Type: Bug
  Components: analyze
Affects Versions: 3.0.0, 2.10, 2.8
Reporter: Andrei Tomashpolskiy


Despite test scope being non-transitive [1] it's still used to resolve versions 
of compile dependencies. This might be causing issues in IDEs that rely on the 
Dependency plugin to assemble the application's classpath.

E.g. for the following project configuration *javax.servlet-api* version is 
resolved to *3.0.1* (using nearest-first strategy to resolve conflicts):
{noformat}
project1
|-- project2:compile
|..|-- jetty-server:compile
||-- javax.servlet-api:3.1.0:compile
|-- jersey-test-framework-core:test
|..|-- javax.servlet-api:3.0.1:compile
{noformat}

My understanding is that it should rather be resolved to 3.1.0, because version 
3.0.1 stems from the test scope and should be ignored (AFAIK Maven Shade plugin 
works in that way).

Please see a runnable code example in 
https://github.com/atomashpolskiy/maven-transitive-test-dependencies

Thank you!

[1] 
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (MDEP-558) Dependency version from test scope leaks into compile scope

2017-03-16 Thread Andrei Tomashpolskiy (JIRA)

 [ 
https://issues.apache.org/jira/browse/MDEP-558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Tomashpolskiy updated MDEP-558:
--
Component/s: (was: analyze)
 tree

> Dependency version from test scope leaks into compile scope
> ---
>
> Key: MDEP-558
> URL: https://issues.apache.org/jira/browse/MDEP-558
> Project: Maven Dependency Plugin
>  Issue Type: Bug
>  Components: tree
>Affects Versions: 2.8, 2.10, 3.0.0
>Reporter: Andrei Tomashpolskiy
>
> Despite test scope being non-transitive [1] it's still used to resolve 
> versions of compile dependencies. This might be causing issues in IDEs that 
> rely on the Dependency plugin to assemble the application's classpath.
> E.g. for the following project configuration *javax.servlet-api* version is 
> resolved to *3.0.1* (using nearest-first strategy to resolve conflicts):
> {noformat}
> project1
> |-- project2:compile
> |..|-- jetty-server:compile
> ||-- javax.servlet-api:3.1.0:compile
> |-- jersey-test-framework-core:test
> |..|-- javax.servlet-api:3.0.1:compile
> {noformat}
> My understanding is that it should rather be resolved to 3.1.0, because 
> version 3.0.1 stems from the test scope and should be ignored (AFAIK Maven 
> Shade plugin works in that way).
> Please see a runnable code example in 
> https://github.com/atomashpolskiy/maven-transitive-test-dependencies
> Thank you!
> [1] 
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)