Inconsistent dependency scope resolution
----------------------------------------

                 Key: MNG-2779
                 URL: http://jira.codehaus.org/browse/MNG-2779
             Project: Maven 2
          Issue Type: Bug
          Components: Dependencies, Reactor and workspace
    Affects Versions: 2.0.4
            Reporter: Chris Eldredge
            Priority: Minor


Suppose a multi-module project with modules a, b and c:

module a depends on commons-lang (scope compile)
module b depends on commons-lang (scope provided)
module c depends on module a (scope test)
module c depends on module b (scope provided)

If I run mvn on the top level pom (with a moduleSet containing a, b and c) the 
compile of module c fails because commons-lang is included transitively with 
"test" scope (meaning that source code in src/main/java does not have 
commons-lang in the classpath).

If I run mvn on module c only, commons-lang is included transitively with 
"provided" scope, and everything works fine.

Changing module a's dependency on commons-lang to "provided" scope resolved 
this issue, but the inconsistency is there nonetheless.

The inconsistency seems to be that in a reactor build, module dependencies are 
provided by MavenProject instances, whereas when the individual module is 
built, the module dependency is processed like any other from the pom in the 
repository.  So I think the bug is in how module dependencies are processed.

-- 
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

        

Reply via email to