[jboss-dev-forums] [Design of JBoss Build System] - Strange dependency issue

adrian@jboss.org do-not-reply at jboss.com
Fri Nov 23 10:39:02 EST 2007


When I resynched with the microcontainer project this morning,
it was giving me all lots of errors running the aop-mc-int tests.
(This was on a clean build).

I figured out it was building against the wrong version jboss-container
(a snapshot from a couple of days ago).

I decided to go through and fix the problems reported by
dependecy:analyze
but it is giving me a strange message related to jboss-container in aop-mc-int
which is probably related to what I saw, although I can't reproduce it now.


  | [INFO] ----------------------------------------------------------------------------
  | [INFO] Building JBoss Microcontainer AOP MC INT
  | [INFO]    task-segment: [dependency:analyze]
  | [INFO] ----------------------------------------------------------------------------
  | [INFO] Preparing dependency:analyze
  | [INFO] [resources:resources]
  | [INFO] Using default encoding to copy filtered resources.
  | [INFO] [compiler:compile]
  | [INFO] Nothing to compile - all classes are up to date
  | [INFO] [resources:testResources]
  | [INFO] Using default encoding to copy filtered resources.
  | [INFO] [compiler:testCompile]
  | [INFO] Nothing to compile - all classes are up to date
  | [INFO] [dependency:analyze]
  | [INFO] Used declared dependencies:
  | [INFO]    org.jboss:jbossxb:jar:2.0.0.CR4:compile
  | [INFO]    junit:junit:jar:3.8.1:compile
  | [INFO]    org.jboss:jboss-test:jar:1.0.4.GA:compile
  | [INFO]    org.jboss:javassist:jar:3.6.0.GA:compile
  | [INFO]    apache-xerces:xml-apis:jar:2.7.1:compile
  | [INFO]    org.jboss.microcontainer:jboss-dependency:jar:2.0.0-SNAPSHOT:compile
  | [INFO]    org.jboss.microcontainer:jboss-kernel:jar:2.0.0-SNAPSHOT:compile
  | [INFO]    jboss:jboss-logging-spi:jar:2.0.3.GA:compile
  | [INFO]    org.jboss.aop:jboss-aop:jar:2.0.0.beta1:compile
  | [INFO]    org.jboss.microcontainer:jboss-kernel:test-jar:tests:2.0.0-SNAPSHOT:test
  | [INFO]    org.jboss:jboss-common-core:jar:2.2.1.GA:compile
  | [INFO] Used undeclared dependencies:
  | [WARNING]    org.jboss.microcontainer:jboss-container:jar:2.0.0-SNAPSHOT:compile
  | [INFO] Unused declared dependencies:
  | [INFO]    None
  | [WARNING] Potential problems discovered.
  | [INFO] Found Resolved Dependency / DependencyManagement mismatches:
  | [INFO]  Ignoring Direct Dependencies.
  | [INFO]    None
  | 

jboss-container is explicitly declared.

I'd guess this has something to do with it being excluded on the aop artifact?
But jboss-dependency is also excluded there and comes in via the same
dependency/artifact, jboss-kernel.

If I exclude it from the jboss-dependency and jboss-kernel artifacts,
the spurious error goes away. e.g. see the commented out sections in the pom

  |     <dependency>
  |       <groupId>org.jboss.microcontainer</groupId>
  |       <artifactId>jboss-dependency</artifactId>
  |       <!-- HERE exclusions>
  |         <exclusion>
  |           <groupId>org.jboss.microcontainer</groupId>
  |           <artifactId>jboss-container</artifactId>
  |         </exclusion>
  |       </exclusions-->
  |     </dependency>
  |     <dependency>
  |       <groupId>org.jboss.microcontainer</groupId>
  |       <artifactId>jboss-kernel</artifactId>
  |       <!-- HERE exclusions>
  |         <exclusion>
  |           <groupId>org.jboss.microcontainer</groupId>
  |           <artifactId>jboss-container</artifactId>
  |         </exclusion>
  |       </exclusions-->
  |     </dependency>
  | 

But why don't I also need to exclude jboss-dependency from jboss-kernel
in the same way?
Or more accurately, why do I need to exclude anything since these
are in the build.

When do we get the ability to

  | <exclude-all-transitive/>
  | 
  |   | so we're forced to specify consistent dependencies in build/pom.xml
  |   | instead of getting "random" dependencies from unknown places.
  |   | 
  |   | It's a real pain going though all the poms changing, e.g.
  |   | 
  |   |   |     <dependency>
  |   |   |       <groupId>org.jboss</groupId>
  |   |   |       <artifactId>jbossxb</artifactId>
  |   |   |       <exclusions>
  |   |   |         <exclusion>
  |   |   |           <groupId>jboss</groupId>
  |   |   |           <artifactId>jboss-common-core</artifactId>
  |   |   |         </exclusion>
  |   |   |         <exclusion>
  |   |   |           <groupId>jboss</groupId>
  |   |   |           <artifactId>jboss-common-logging-spi</artifactId>
  |   |   |         </exclusion>
  |   |   |       </exclusions>
  |   |   |     </dependency>
  |   |   | 
  |   |   |     <dependency>
  |   |   |       <groupId>org.jboss</groupId>
  |   |   |       <artifactId>jboss-common-core</artifactId>
  |   |   |       <exclusions>
  |   |   |         <exclusion>
  |   |   |           <groupId>jboss</groupId>
  |   |   |           <artifactId>jboss-common-logging-spi</artifactId>
  |   |   |         </exclusion>
  |   |   |       </exclusions>
  |   |   |     </dependency>
  |   |   |     <dependency>
  |   |   |       <groupId>org.jboss</groupId>
  |   |   |       <artifactId>jboss-test</artifactId>
  |   |   |       <exclusions>
  |   |   |         <exclusion>
  |   |   |           <groupId>jboss</groupId>
  |   |   |           <artifactId>jboss-common-core</artifactId>
  |   |   |         </exclusion>
  |   |   |         <exclusion>
  |   |   |           <groupId>jboss</groupId>
  |   |   |           <artifactId>jboss-common-logging-spi</artifactId>
  |   |   |         </exclusion>
  |   |   |       </exclusions>
  |   |   |     </dependency>
  |   |   | 
  |   |   | 
  |   | 
  |   | over and over again.
  |   | 
  |   | The exclusions (to get a consistent set of dependencies across the projects)
  |   | are getting to be most of the poms. :-(

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

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



More information about the jboss-dev-forums mailing list