Maven -> Maven 2
December 18th, 2005 by HenSo it’s time to learn about the maven1 to maven2 migration route. As always, start with osjava and then take that education elsewhere (maybe Commons if no one has done it by the time I grok the various bits).
First off, turn your project.xml into a pom.xml. Mostly this is search and replace, or bits to delete. Apparantly there’s a tool out there to do this, and someone suggested writing an xslt file. Currently I’m just using a bash script of perl -pi -e’s. Gets me mostly there.
Next, transitive dependencies + legalities bite your arse. Simple-JNDI depends on Commons-dbcp and it depends on jdbc-stdext, and maven quite rightly throws a fit when it’s not available. Luckily I found the jar on my server as it’s a pain in the arse to find otherwise. You install it with mvn install:install-file -Dfile=jdbc2_0-stdext.jar -DgroupId=javax.sql -DartifactId=jdbc-stdext -Dversion=2.0 -Dpackaging=jar and then things will work. I’m looking forward to the Glassfish versions of these jars appearing on ibiblio, though I have a sneaky feeling that the jdbc-stdext jar won’t be there.
Knowing what to type at the command line is a surprising blocker. Well it is if you skip the ‘getting started’ to dig into the maven 1 and 2 differences
Anyway, the goals to remember are compile, test, package, install.
Not exactly a lot of education, but time is short etc
Roller migration to do and I just remembered that the Jakarta board report is due.
