You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris Eldredge <ch...@comcast.net> on 2007/01/12 16:25:44 UTC

[m2] Scoping inconsistency with multi-module build

I've noticed the following problem:

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 module set) the compile of 
module c fails because the test scope wins (meaning that source code in 
src/main/java does not have commons-lang in the classpath).

If I run mvn on module c only, the provided scope wins, and everything 
works fine.

Changing module a to depend on commons-lang (scope provided) 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.

Should I open an issue in JIRA?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Scoping inconsistency with multi-module build

Posted by Chris Eldredge <ch...@comcast.net>.
Created MNG-2779.

Thanks,

Chris Eldredge

franz see wrote:
> Good day to you, Chris,
> 
> Open an issue in [1], probably under the Dependencies component.
> 
> Thanks,
> Franz
> 
> [1] http://jira.codehaus.org/browse/MNG
> 
> 
> Chris Eldredge wrote:


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Scoping inconsistency with multi-module build

Posted by franz see <fr...@gmail.com>.
Good day to you, Chris,

Open an issue in [1], probably under the Dependencies component.

Thanks,
Franz

[1] http://jira.codehaus.org/browse/MNG


Chris Eldredge wrote:
> 
> I've noticed the following problem:
> 
> 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 module set) the compile of 
> module c fails because the test scope wins (meaning that source code in 
> src/main/java does not have commons-lang in the classpath).
> 
> If I run mvn on module c only, the provided scope wins, and everything 
> works fine.
> 
> Changing module a to depend on commons-lang (scope provided) 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.
> 
> Should I open an issue in JIRA?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-m2--Scoping-inconsistency-with-multi-module-build-tf2966519s177.html#a8312862
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org