You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Fabien Coppens <fa...@free.fr> on 2008/05/09 10:42:11 UTC

Inherited jar scope strangely changed to provided (Maven 2.0.9)

Hi.
I'm using Maven 2.0.9.
I have a module called BUSINESSLAYER-CORE which declares a dependency 
with a root module called COMMONS.
The COMMONS module declares a dependency to Spring, i.e. :
<dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring</artifactId>
         <version>2.5.3</version>
</dependency>

But strangely when I look at the dependency tree for BUSINESSLAYER-CORE 
(see below),
the dependency to Spring is mysteriously switched to provided along with 
the following message :
\- org.springframework:spring:jar:2.5.3:provided (scope not updated to 
compile)

Here is the dependency tree :
[INFO] [dependency:tree]
[INFO] com.acme.biz:JAR-BUSINESSLAYER-CORE:jar:0.0.1-SNAPSHOT
[INFO] +- com.acme.persistence:JAR-PERSISTENCE:jar:0.0.1-SNAPSHOT:compile
[INFO] |  +- com.acme.commons:JAR-COMMONS:jar:0.0.1-SNAPSHOT:compile
[INFO] |  +- cglib:cglib:jar:2.1_3:compile
[INFO] |  |  \- asm:asm:jar:1.5.3:compile
[INFO] |  +- commons-lang:commons-lang:jar:2.4:compile
[INFO] |  +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] |  +- commons-dbcp:commons-dbcp:jar:1.2.1:compile
[INFO] |  |  +- commons-collections:commons-collections:jar:2.1:compile
[INFO] |  |  \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] |  +- concurrent:concurrent:jar:1.0:compile
[INFO] |  +- commons-pool:commons-pool:jar:1.2:compile
[INFO] |  +- org.hibernate:hibernate:jar:3.2.6.ga:compile
[INFO] |  |  +- net.sf.ehcache:ehcache:jar:1.2.3:compile
[INFO] |  |  +- asm:asm-attrs:jar:1.5.3:compile
[INFO] |  |  +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |  |  \- antlr:antlr:jar:2.7.6:compile
[INFO] |  +- org.hibernate:hibernate-annotations:jar:3.3.0.ga:compile
[INFO] |  |  \- javax.persistence:persistence-api:jar:1.0:compile
[INFO] |  +- org.hibernate:hibernate-entitymanager:jar:3.3.1.ga:compile
[INFO] |  |  +- 
org.hibernate:hibernate-commons-annotations:jar:3.0.0.ga:compile
[INFO] |  |  +- org.hibernate:hibernate-validator:jar:3.0.0.ga:compile
[INFO] |  |  +- jboss:javassist:jar:3.3.ga:compile
[INFO] |  |  \- jboss:jboss-common-core:jar:2.0.4.GA:compile
[INFO] |  \- mysql:mysql-connector-java:jar:5.1.6:compile
[INFO] +- com.acme.biz:JAR-BUSINESSLAYER-API:jar:0.0.1-SNAPSHOT:compile
[INFO] +- com.acme.commons.tests:JAR-COMMONTESTS:jar:0.0.1-SNAPSHOT:test
[INFO] +- javax.transaction:jta:jar:1.0.1B:test
[INFO] +- junit:junit:jar:4.3.1:test
[INFO] +- org.springframework:spring-mock:jar:2.0.8:test
[INFO] +- log4j:log4j:jar:1.2.14:provided
[INFO] \- org.springframework:spring:jar:2.5.3:provided (scope not 
updated to compile)


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


Re: Inherited jar scope strangely changed to provided (Maven 2.0.9)

Posted by Fabien Coppens <fa...@free.fr>.
Will try that command, but actually I am not using dependencyManagement 
anywhere.

Jörg Schaible wrote:

>Fabien Coppens wrote:
>
>  
>
>>More info on this problem.
>>I tried setting the dependency to Spring explicitly in the POM of
>>BUSINESSLAYER-CORE
>>and now it is seen correctly with scope compile in the dependency tree
>>of BUSINESSLAYER-CORE.
>>BUT : if I look at the dependency tree of the project that has
>>BUSINESSLAYER-CORE in its dependencies,
>>then again I see : \- org.springframework:spring:jar:2.5.3:provided
>>(scope not updated to compile) .
>>Seems that Maven changes the scope of that jar in all projects that have
>>a dependency to the project
>>in which the Spring jar is explicitly declared as a dependency.
>>Any ideas, folks ?
>>    
>>
>
>Use
>
>mvn help:effective-pom
>
>to see the complete POM. You might have a dependecnyManagement section that
>defines this.
>
>- Jörg
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
>  
>


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


Re: Inherited jar scope strangely changed to provided (Maven 2.0.9)

Posted by Jörg Schaible <jo...@gmx.de>.
Fabien Coppens wrote:

> More info on this problem.
> I tried setting the dependency to Spring explicitly in the POM of
> BUSINESSLAYER-CORE
> and now it is seen correctly with scope compile in the dependency tree
> of BUSINESSLAYER-CORE.
> BUT : if I look at the dependency tree of the project that has
> BUSINESSLAYER-CORE in its dependencies,
> then again I see : \- org.springframework:spring:jar:2.5.3:provided
> (scope not updated to compile) .
> Seems that Maven changes the scope of that jar in all projects that have
> a dependency to the project
> in which the Spring jar is explicitly declared as a dependency.
> Any ideas, folks ?

Use

mvn help:effective-pom

to see the complete POM. You might have a dependecnyManagement section that
defines this.

- Jörg


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


Re: Inherited jar scope strangely changed to provided (Maven 2.0.9)

Posted by Fabien Coppens <fa...@free.fr>.
More info on this problem.
I tried setting the dependency to Spring explicitly in the POM of 
BUSINESSLAYER-CORE
and now it is seen correctly with scope compile in the dependency tree 
of BUSINESSLAYER-CORE.
BUT : if I look at the dependency tree of the project that has 
BUSINESSLAYER-CORE in its dependencies,
then again I see : \- org.springframework:spring:jar:2.5.3:provided 
(scope not updated to compile) .
Seems that Maven changes the scope of that jar in all projects that have 
a dependency to the project
in which the Spring jar is explicitly declared as a dependency.
Any ideas, folks ?

Fabien Coppens wrote:

> Hi.
> I'm using Maven 2.0.9.
> I have a module called BUSINESSLAYER-CORE which declares a dependency 
> with a root module called COMMONS.
> The COMMONS module declares a dependency to Spring, i.e. :
> <dependency>
>         <groupId>org.springframework</groupId>
>         <artifactId>spring</artifactId>
>         <version>2.5.3</version>
> </dependency>
>
> But strangely when I look at the dependency tree for 
> BUSINESSLAYER-CORE (see below),
> the dependency to Spring is mysteriously switched to provided along 
> with the following message :
> \- org.springframework:spring:jar:2.5.3:provided (scope not updated to 
> compile)
>
> Here is the dependency tree :
> [INFO] [dependency:tree]
> [INFO] com.acme.biz:JAR-BUSINESSLAYER-CORE:jar:0.0.1-SNAPSHOT
> [INFO] +- com.acme.persistence:JAR-PERSISTENCE:jar:0.0.1-SNAPSHOT:compile
> [INFO] |  +- com.acme.commons:JAR-COMMONS:jar:0.0.1-SNAPSHOT:compile
> [INFO] |  +- cglib:cglib:jar:2.1_3:compile
> [INFO] |  |  \- asm:asm:jar:1.5.3:compile
> [INFO] |  +- commons-lang:commons-lang:jar:2.4:compile
> [INFO] |  +- commons-logging:commons-logging:jar:1.1.1:compile
> [INFO] |  +- commons-dbcp:commons-dbcp:jar:1.2.1:compile
> [INFO] |  |  +- commons-collections:commons-collections:jar:2.1:compile
> [INFO] |  |  \- xml-apis:xml-apis:jar:1.0.b2:compile
> [INFO] |  +- concurrent:concurrent:jar:1.0:compile
> [INFO] |  +- commons-pool:commons-pool:jar:1.2:compile
> [INFO] |  +- org.hibernate:hibernate:jar:3.2.6.ga:compile
> [INFO] |  |  +- net.sf.ehcache:ehcache:jar:1.2.3:compile
> [INFO] |  |  +- asm:asm-attrs:jar:1.5.3:compile
> [INFO] |  |  +- dom4j:dom4j:jar:1.6.1:compile
> [INFO] |  |  \- antlr:antlr:jar:2.7.6:compile
> [INFO] |  +- org.hibernate:hibernate-annotations:jar:3.3.0.ga:compile
> [INFO] |  |  \- javax.persistence:persistence-api:jar:1.0:compile
> [INFO] |  +- org.hibernate:hibernate-entitymanager:jar:3.3.1.ga:compile
> [INFO] |  |  +- 
> org.hibernate:hibernate-commons-annotations:jar:3.0.0.ga:compile
> [INFO] |  |  +- org.hibernate:hibernate-validator:jar:3.0.0.ga:compile
> [INFO] |  |  +- jboss:javassist:jar:3.3.ga:compile
> [INFO] |  |  \- jboss:jboss-common-core:jar:2.0.4.GA:compile
> [INFO] |  \- mysql:mysql-connector-java:jar:5.1.6:compile
> [INFO] +- com.acme.biz:JAR-BUSINESSLAYER-API:jar:0.0.1-SNAPSHOT:compile
> [INFO] +- com.acme.commons.tests:JAR-COMMONTESTS:jar:0.0.1-SNAPSHOT:test
> [INFO] +- javax.transaction:jta:jar:1.0.1B:test
> [INFO] +- junit:junit:jar:4.3.1:test
> [INFO] +- org.springframework:spring-mock:jar:2.0.8:test
> [INFO] +- log4j:log4j:jar:1.2.14:provided
> [INFO] \- org.springframework:spring:jar:2.5.3:provided (scope not 
> updated to compile)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>


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