aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Incrementing project build number in Maven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Incrementing project build number in Maven" Watch "Incrementing project build number in Maven" New topic
Author

Incrementing project build number in Maven

Tim Francisco
Greenhorn

Joined: Apr 03, 2010
Posts: 12
Hello,
I am looking at Maven as a build/dependency tool reading information in post/blogs. One of things that I still don't know is how to manage the project build number. I would appreciate if someone could explain me or show me some references/examples for best practices to managing it.

Thank you.
Tim
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Manage it how?
Tim Francisco
Greenhorn

Joined: Apr 03, 2010
Posts: 12
David Newton wrote:Manage it how?


Sorry about my question being not clear enough.

My question was HOW to have Maven increment the project build number?

Thank you.
T
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Have you tried this?

http://mojo.codehaus.org/buildnumber-maven-plugin/
http://mojo.codehaus.org/buildnumber-maven-plugin/usage.html
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

There's also a maven "build" goal that's used by a lot of the Jakarta projects. It bumps build numbers, supports both snapshot and release builds, and even ensures that everything's been checked into the source code repository. At its extreme, it will even build and deploy a project management site. Which is how most of the Jakarta sub-sites are constructed.


Customer surveys are for companies who didn't pay proper attention to begin with.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Oh, I didn't know it did build numbers, too. I thought it was the "release" plugin, though--I can't keep track of all those Maveny things.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

David Newton wrote:Oh, I didn't know it did build numbers, too. I thought it was the "release" plugin, though--I can't keep track of all those Maveny things.

+1 :)


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Incrementing project build number in Maven