2 Replies Latest reply on Jul 26, 2007 4:58 PM by genman

    Extraneous pom.xml dependencies in jboss-common and others

    genman

      I've been building my project against the snapshot release of JBoss Microcontainer using Maven and there's 28 libraries that get pulled in, and some of them seem fairly non-relevant to runtime.

      Most of the issues are due to transitive dependencies. Here are a list of dependencies I end up with:

      ? ant\ant\1.6.5\ant-1.6.5.jar
      ? apache-httpclient\commons-httpclient\2.0.2\commons-httpclient-2.0.2.jar
      ? apache-slide\webdavlib\2.0\webdavlib-2.0.jar
      apache-xerces\xercesImpl\2.7.1\xercesImpl-2.7.1.jar
      apache-xerces\xml-apis\2.7.1\xml-apis-2.7.1.jar
      jboss\jboss-common-core\2.0.4.GA\jboss-common-core-2.0.4.GA.jar
      jboss\jboss-common-logging-log4j\2.0.4.GA\jboss-common-logging-log4j-2.0.4.GA.jar
      jboss\jboss-common-logging-spi\2.0.4.GA\jboss-common-logging-spi-2.0.4.GA.jar
      jboss\jboss-logging-spi\2.0.3.GA\jboss-logging-spi-2.0.3.GA.jar
      ? jboss\jboss-test\1.0.4-SNAPSHOT\jboss-test-1.0.4-SNAPSHOT.jar
      jboss\jboss-vfs\2.0.4.snapshot\jboss-vfs-2.0.4.snapshot.jar
      jboss\jbossxb\2.0.0.CR3\jbossxb-2.0.0.CR3.jar
      ? jboss\profiler\jvmti\jboss-profiler-jvmti\1.0.0.CR5\jboss-profiler-jvmti-1.0.0.CR5.jar
      ? org\apache\ant\ant-junit\1.7.0\ant-junit-1.7.0.jar
      ? org\apache\ant\ant-launcher\1.7.0\ant-launcher-1.7.0.jar
      ? org\apache\ant\ant\1.7.0\ant-1.7.0.jar
      org\jboss\javassist\3.6-beta\javassist-3.6-beta.jar
      org\jboss\jboss-aop\2.0.0-SNAPSHOT\jboss-aop-2.0.0-SNAPSHOT.jar
      org\jboss\microcontainer\jboss-aop-mc-int\2.0.0-SNAPSHOT\jboss-aop-mc-int-2.0.0-SNAPSHOT.jar
      org\jboss\microcontainer\jboss-container\2.0.0-SNAPSHOT\jboss-container-2.0.0-SNAPSHOT.jar
      org\jboss\microcontainer\jboss-dependency\2.0.0-SNAPSHOT\jboss-dependency-2.0.0-SNAPSHOT.jar
      org\jboss\microcontainer\jboss-kernel\2.0.0-SNAPSHOT\jboss-kernel-2.0.0-SNAPSHOT.jar
      oswego-concurrent\concurrent\1.3.4\concurrent-1.3.4.jar
      ? qdox\qdox\1.6\qdox-1.6.jar
      sun-jaf\activation\1.0.2\activation-1.0.2.jar
      trove\trove\2.1.1\trove-2.1.1.jar
      wutka-dtdparser\dtdparser121\1.2.1\dtdparser121-1.2.1.jar
      

      Projects with (potential) extraneous dependencies:

      jboss-commons-core: Pulls in apache-httpclient and apache-slide:webdavlib. Seems like the "web" portion of commons belongs someplace else.
      jboss-aop: Pulls in Ant, plus qdox. These are compile tools, but not needed for runtime, I think.
      org.jboss.microcontainer: compile depends on junit, probably should be "test"

      I'm not sure why I end up with jboss-test, seems like the Maven2 plugin from Eclipse might be confused.

      I'm going to see if I can't fix the microcontainer dependencies, I hope nobody gets mad.

      A useful tool I've found is: http://www.jfrog.org/sites/dep-analyzer/1.0/ , but only seems to work when built from source. The GUI maps out where the dependencies you get come from, so you can follow the chain.