Martin Gilday wrote on Tuesday, September 19, 2006 10:27 AM:
> Hi,
> I have a problem with transitive dependencies with commons-logging and
> trying to figure out if it is a bug or a misunderstanding on my part
> about how transitive works. I have a definition of a top level
> dependency on commons-logging 1.1 <dependency>
> <groupId>commons-logging</groupId>
> <artifactId>commons-logging</artifactId> <version>1.1</version>
> <scope>provided</scope>
> </dependency>
>
> I have the scope as provided as it is a web app and is provided by
> JBoss. I then have a dependency on WebWork 2.2.2. This has a
> transitive dependency on an older version of commons-logging so I add
> an exclusion (I am also laziliy copying and pasting this into other
> POM where I am not using commons-logging, which is another, bad,
> reason for the exclusion) <dependency>
> <groupId>opensymphony</groupId>
> <artifactId>webwork</artifactId>
> <version>2.2.2</version>
> <exclusions>
> <exclusion>
> <groupId>commons-logging</groupId>
> <artifactId>commons-logging</artifactId>
> </exclusion>
> <exclusion>
> <groupId>commons-collections</groupId>
> <artifactId>commons-collections</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.springframework</groupId>
> <artifactId>spring-core</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.springframework</groupId>
> <artifactId>spring-context</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.springframework</groupId>
> <artifactId>spring-beans</artifactId>
> </exclusion>
> <exclusion>
> <groupId>org.springframework</groupId>
> <artifactId>spring-aop</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
>
> My assuption was this exclusion would prevent the commons-logging
> depdency defined in the WebWork POM from bubbling up, but
> then still use
> my top level definition. When I do this and do a "clean
> compile" I get
> compilation errors regarding logging such as cannot find symbol
> LogFactory. If I take the exclusion out then everything is happy.
>
> Has anyone got any pointers as to where my problem lies? Is it a
> problem with the WebWork POM, my POM definition or a bug?
Exclusions work globally in M2.0.4 although this should be fixed now: MNG-1797
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
|