[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Migration to maven

Kevin.Conner@jboss.com do-not-reply at jboss.com
Mon Apr 2 10:49:23 EDT 2007


"pgier" wrote : I changed the aop dependency so that it does not transitively include jboss-container, and jboss-dependency.
The versions I am downloading still have them included albeit at version 2.0.0-SNAPSHOT.  There is no present conflict between those and the MC dependencies but the potential still exists.
"pgier" wrote : Do you have some ideas for a better long term solution?
My understanding of the 2.0.5 transitive dependency resolution is that it depends on two factors
- the depth of the dependency, in other words how many indirects in the chain
- the order in which they are encountered, for those at the same depth

Precedence goes to the dependency with the shortest path and, for those at the same depth, the one encountered first.

There are three possible solutions that I can think of
- declare the dependency
- declare peer projects prior to other dependencies
- specify exclusions on the other dependencies

I do not believe the second solution is a good one as it relies on the depth of the dependency.  I would therefore suggest explicit declaration or exclusions.  Exclusions would look as follows
<dependency>
  |   <groupId>jboss</groupId>
  |   <artifactId>jboss-aop</artifactId>
  |   <version>2.0.0-SNAPSHOT</version>
  |   <exclusions>
  |     <exclusion>
  |       <groupId>jboss</groupId>
  |       <artifactId>jboss-dependency</artifactId>
  |     </exclusion>
  |   </exclusions>
  | </dependency>
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033712#4033712

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033712



More information about the jboss-dev-forums mailing list