This is a nice solution. I wonder if there's any way to trigger this behaviour on demand. Or maybe I should just change the plugin to always be an aggregator. I wonder if anyone depends on it running once per module?

J

On 28-Feb-07, at 2:12 PM, fgarsombke wrote:


I got around this by making the build-number-plugin @aggregator style.

I just changed the javadoc tag in the plugin and rebuilt it.


/**
* This mojo is designed to give you a build number. So when you might make
100 builds of version
* 1.0-SNAPSHOT, you can differentiate between them all. The build number is
based on the revision
* number retrieved from scm. It only works with subversion, currently. This
mojo can also check to make
* sure that you have checked everything into scm, before issuing the build
number. That behaviour can be suppressed,
* and then the latest local build number is used. Build numbers are not
reflected
* in your artifact's filename (automatically), but can be added to the
metadata. You can access the build
 * number in your pom with ${buildNumber}.
 *
 * @author  mailto:[EMAIL PROTECTED] Julian Wood
* @version $Id: BuildNumberMojo.java,v 1.0 Feb 7, 2006 11:43:08 AM woodj
Exp $
 * @goal create
 * @requiresProject
 * @aggregator
* @description create a build number from scm if possible, otherwise a
timestamp
 */

It then only increments the build number once per the entire build.


Franz Garsombke
--

--
Julian Wood <[EMAIL PROTECTED]>

Software Engineer
Teaching & Learning Centre
University of Calgary

http://tlc.ucalgary.ca


Reply via email to