-
1. Re: Maven dependencies still not working properly.
pgier Aug 24, 2007 10:55 AM (in response to adrian.brock)For some reason, transitive deps show up in the classpath before direct dependencies, so you get issues like this. It's something I will eventually try to fix in maven, because I think direct deps should come first.
For now, you can exclude the transitive dep on jbossxb by adding this to the container dependency.<dependency> <groupId>org.jboss.microcontainer</groupId> <artifactId>jboss-container</artifactId> <version>2.0.0-SNAPSHOT</version> <scope>compile</scope> <exclusions> <exclusion> <groupId>jboss</groupId> <artifactId>jbossxb</artifactId> </exclusion> </exclusions> </dependency>
-
2. Re: Maven dependencies still not working properly.
adrian.brock Aug 24, 2007 11:24 AM (in response to adrian.brock)Thanks that worked. I put a FIXME in the pom.
-
3. Re: Maven dependencies still not working properly.
adrian.brock Aug 29, 2007 10:35 AM (in response to adrian.brock)This doesn't appear to be a generic fix.
e.g. see this related problem
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079196#4079196
where Ales and I are getting different build dependencies. -
4. Re: Maven dependencies still not working properly.
pgier Aug 29, 2007 11:17 AM (in response to adrian.brock)I changed the container pom to exclude it's transitive dependency (through jbossxb) on jboss-common-core. This seems to give the correct dependencies at compile time.
To find this, I used "mvn project-info-reports:dependencies" which creates an html page that shows the dependency tree.
I also used "mvn dependency:analyze" which currently gives me these warnings:
[INFO] Used declared dependencies:
[INFO] jboss:jbossxb:jar:2.0.0.CR3:compile
[INFO] junit:junit:jar:3.8.1:test
[INFO] jboss.profiler.jvmti:jboss-profiler-jvmti:jar:1.0.0.CR5:test
[INFO] org.jboss:jboss-common-core:jar:2.2.1-20070828.111252-2:compile
[INFO] org.jboss:jboss-test:jar:1.0.4-SNAPSHOT:test
[INFO] org.jboss:javassist:jar:3.6-beta:compile
[INFO] Used undeclared dependencies:
[WARNING] jboss:jboss-common-core:jar:2.0.4.GA:test
[WARNING] jboss:jboss-common-logging-spi:jar:2.0.4.GA:compile
[WARNING] apache-xerces:xml-apis:jar:2.7.1:compile
[INFO] Unused declared dependencies:
[INFO] jboss:jboss-vfs:jar:2.0.4.snapshot:compile
[INFO] jboss:jboss-logging-spi:jar:2.0.3.GA:compile
[WARNING] Potential problems discovered.
[INFO] Found Resolved Dependency / DependencyManagement mismatches:
[INFO] Ignoring Direct Dependencies.
[INFO] jboss:jboss-common-core:jar was excluded in DepMgt, but version 2.0.4.GA has been found in the dependency tree.
[WARNING] Potential problems found in Dependency Management
I'm going to update the dependencies in container to clean up these warnings.