Thursday, October 30, 2008

Maven 2 Cargo Plugin: Version-Hell

I'm working on a small architectural spike, and I want the ability to run my WAR project in a container.  In past projects, I've configured Cargo's Maven 2 plugin to launch Tomcat, both for manual testing and for integration tests.  While I don't really need integration tests on this spike, I prefer to have the build-integrated option to launch a container rather than deploying the WAR to a container manually.


Maven 2 is Configuration-Over-Convention: configuring Cargo for a Maven 2 build takes a page of XML.  Rather than compose it from scratch, I just grab it from past projects.  After doing so, I refine it for any project specifics, and while I was in the fancy m2eclipse dependency editor, I did a quick check to see if 1.0-alpha-6 was still the current version.  Seem's not -- the dialog shows me that there's a 1.0-beta-1 version available.

I prefer to use the most recent version unless there are significant changes, so I thought I'd best check to see what's changed, only to discover that getting that information is nigh-impossible:
  • The home page lists the 'current version' of the Maven2 Plugin as "0.3", despite the fact that that version is a year old, and there's been a series of alphas and now betas since then.
  • The 'news' section is even older, showing that 'Version 0.2' of the cargo-maven2-plugin has been released, same as the announcements mailing list.
  • Although Cargo seems to use different version numbers for its various components, their Jira is configured with a Cargo project and the Maven2 plugin as a component.  In order to address the overlapping version space, they've created versions like 1.0-maven2.
If anyone knows what changed from alpha-6 to beta-1, please feel free to comment.  I give up.

2 comments:

Anonymous said...

Can you post the pom.XML your using to launch cargo. I have tried to use cargo but have had problems redeploying wars on a windows machine with file locking issues.

Thanks in advance.

Geoffrey Wiseman said...

Sure, I'll write a follow-up post to cover the configuration I typically use.