Skip to main content


Showing posts from July, 2006

Build Numbers in jars build with Maven

Build Numbers for Maven builds using Cruise Control.

Maven is a very useful tool. For the most part, you can get it to do whatever you want, but the trick is finding out how. One issue that my team had was:
We're using Cruise ControlWe'd like to have the CC build number in the Jar ManifestsWe're using Maven to build.There are a couple of ways that you could do this, using ant from within maven, but that seems like extra work or at least extra complexity. The solution we found was:

Configure the project POM file to add a manifest to the jar. Most of the following is just using the maven Plugin. There is a great guide to manifests on the maven site so I'll only show the parts relevant to configuring the manifest to add a cruise control build number. <plugin>


I'm not going to claim that this blog will have a theme. But one thing I've been meaning to collect was tips and tricks for using tools that help software teams to work more effectively. One such tool is Maven. In the right context, maven2 is a wonderful tool. The trick is trying to find out how to do things. And once I find out, I tend to forget until a friend asks me a related question. So one thing I hope to do is to collect interesting things that I've discovered. Along the way I'll probably also have some opinions to express. If you found your way here, I hope that you find something useful.