Archive for category Maven
Managing multiple Maven versions
Posted by Chris Custine in Java, Maven, development on November 2nd, 2009
Lately I’ve been using Apache Maven 3.0 snapshots to test build compatibility on ServiceMix, Karaf and some of the other projects I work on. I’m also using 2.0.9, 2.0.10, and 2.2.1 to replicate customer environments and build servers, so it gets to be a real pain in the ass to change these around all the time. To make my life easier, this weekend I hacked up a Maven version of the awesome setjdk and defaultjdk commands written by David Blevins for Mac OSX (if you’re on a Mac and not using these scripts, you should be). Read the rest of this entry »
Maven dependency troubleshooting tip
Posted by Chris Custine in Java, Maven on February 25th, 2008
I have already passed this little gem off to a few people this past week and everyone seems to find it indispensable so I thought I would share it. The Maven team has released version 2.0 of the maven-dependency-plugin with a little present for anyone who has spent time troubleshooting transient dependencies. The new dependency:tree goal breaks down all of the declared dependencies and shows the transitives that are pulled in by each declared dependency.
Try running this on your favorite project to see the eye candy, and if you get a message that says “Required goal not found…” then try this following command line and it *should* update your plugin.
mvn -cpu org.apache.maven.plugins:maven-dependency-plugin:2.0:tree
$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'dependency'.
[INFO] ------------------------------------------------------------------------
[INFO] Building ServiceMix :: Samples :: Basic
[INFO] task-segment: [dependency:tree]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:tree]
[INFO] org.apache.servicemix.samples:basic:jar:3.2.2-SNAPSHOT
[INFO] +- org.apache.activemq:activemq-ra:jar:4.1.1:compile
[INFO] | \- org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:jar:1.1:compile (version managed from 1.0)
[INFO] +- org.jencks:jencks-amqpool:jar:2.1:compile
[INFO] +- org.apache.servicemix:servicemix-jms:jar:3.2.2-SNAPSHOT:compile
[INFO] | +- org.apache.servicemix:servicemix-shared:jar:3.2.2-SNAPSHOT:compile
[INFO] | | +- org.apache.servicemix:servicemix-common:jar:3.2.2-SNAPSHOT:compile
[INFO] | | | \- wsdl4j:wsdl4j:jar:1.6.1:compile
[INFO] | | +- org.apache.servicemix:servicemix-soap:jar:3.2.2-SNAPSHOT:compile
[INFO] | | | +- wss4j:wss4j:jar:1.5.1:compile
[INFO] | | | +- bouncycastle:bcprov-jdk14:jar:136:compile
[INFO] | | | +- org.opensaml:opensaml:jar:1.1:compile
[INFO] | | | \- xml-security:xmlsec:jar:1.3.0:compile
[INFO] | | \- org.apache.servicemix:servicemix-soap2:jar:3.2.2-SNAPSHOT:compile
[INFO] | | +- org.apache.ws.commons.schema:XmlSchema:jar:1.3.2:compile
[INFO] | | \- org.apache.woden:woden:jar:1.0.0M6:compile
[INFO] | | +- xerces:xercesImpl:jar:2.8.1:compile (version managed from 2.8.0)
[INFO] | | \- xml-apis:xml-apis:jar:1.3.04:compile
[INFO] | +- org.jencks:jencks:jar:2.1:compile
[INFO] | | +- commons-collections:commons-collections:jar:3.1:compile
[INFO] | | +- org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.1:compile (version managed from 1.0.1)
[INFO] | | +- org.apache.geronimo.components:geronimo-transaction:jar:2.0.1:compile
[INFO] | | | \- org.objectweb.howl:howl:jar:1.0.1-1:compile
[INFO] | | +- org.apache.geronimo.components:geronimo-connector:jar:2.0.1:compile
[INFO] | | +- commons-dbcp:commons-dbcp:jar:1.2.1:runtime (version managed from 1.2)
[INFO] | | +- commons-pool:commons-pool:jar:1.2:compile
[INFO] | | \- org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.0:compile
[INFO] | \- org.springframework:spring-jms:jar:2.0.6:compile
[INFO] | +- org.springframework:spring-context:jar:2.0.6:compile
[INFO] | \- org.springframework:spring-support:jar:2.0.6:compile
[INFO] +- quartz:quartz:jar:1.5.2:compile
[INFO] | \- commons-logging:commons-logging:jar:1.1:compile
[INFO] | \- log4j:log4j:jar:1.2.13:compile (version managed from 1.2.12)
[INFO] +- org.springframework:spring-jca:jar:2.0.6:compile
[INFO] | +- org.springframework:spring-beans:jar:2.0.6:compile
[INFO] | +- org.springframework:spring-core:jar:2.0.6:compile
[INFO] | \- org.springframework:spring-dao:jar:2.0.6:compile
[INFO] | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- org.apache.servicemix:servicemix-components:jar:3.2.2-SNAPSHOT:compile
[INFO] \- org.apache.activemq:activemq-core:jar:4.1.1:compile
[INFO] +- backport-util-concurrent:backport-util-concurrent:jar:2.2:compile (version managed from 2.1)
[INFO] +- org.apache.activemq:activeio-core:jar:3.0.0-incubator:compile
[INFO] +- org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1:compile (version managed from 1.0)
[INFO] \- org.apache.geronimo.specs:geronimo-j2ee-management_1.0_spec:jar:1.1:compile (version managed from 1.0)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Sun Feb 24 19:41:16 MST 2008
[INFO] Final Memory: 18M/161M
[INFO] ------------------------------------------------------------------------


Recent Comments