>The thing is that I don't want to generate "new" builds during
development, overwriting the current snapshot is preferred. But when
processing a project which will be "publicly" available, I want to be
able to identify it >(even a snapshot) with an incremented build number,
but without having to manage the version setting by hand.

IMHO, this is (I mean let's say snapshot numbering) not yet covered well
in m2.

I have requirement also for myself to distunguish two snapshot builds
and here is what I did...

1. I use maestro stuff with continuum and m2. When I do install I have
files like 1.0-SNPASHOT-<BUILD_NUMBER> in repository. BUILD_NUMBER is
always inrementing on 1 when new version is installed into repository.
2. I wrote the plugin which get latest BUILD_NUMBER from repository and
do +1 during for example compile phase. Now I know what build version is
going to be and I put this information into manifest file or war file or
for example jar file. Now I have information inside of the archive that
allows me to distinguish two snapshot versions.

Also you can use
http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/ plugin but
seems having it working requires a lot of manual work, due missing
versions on the repositories of the components listed in the
dependencies.

Best regards,
                              Juri.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 22, 2006 8:30 PM
To: [email protected]
Subject: Auto incrementing a build identifier


A question about version numbering in Subversion.

I am aware of the way subversion handles version information while
releasing. As I have peeked overhere in the Maven repository:

https://svn.apache.org/repos/asf/maven/plugins/tags/maven-release-plugin
-2.0-beta-4/src/main/java/org/apache/maven/plugins/release/versions/Defa
ultVersionInfo.java

Now I am wondering about something. My current contract would like a
build increment value in between two brackets. Which auto increases with
each build delivered to production. I'd say that hooking into the deploy
phase would be a good time for such actions. But then I figure that it
isn't.

I'd say the initialize phase is the correct one. Since I am not
processing resources or sources but the POM.xml. The thing is this, can
I modify the POM then and there and keep the build going or do I need to
modify the POM. And let the user start another run, just like the
release plugin does?

Also, is it possible (by documented API or acceptable convention) to
detect whether or not a build is running up to or past the deploy phase?

The thing is that I don't want to generate "new" builds during
development, overwriting the current snapshot is preferred. But when
processing a project which will be "publicly" available, I want to be
able to identify it (even a snapshot) with an incremented build number,
but without having to manage the version setting by hand.

Any suggestions are greatly apreciated.

Kind regards,
Jeroen Leenarts
http://blog.leenarts.net

Download this as a file


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to