| Funny - I made one of these just a couple of days ago, and was going to ask the same question, with regards to interest. A few things I noticed along the way: the rev property from svn info is local. You can commit files to the repository and the rev stays the same (locally) until you update. So I made the plugin check to see if you have locally modified files, and unless you suppress the behaviour with -Dmaven.buildnumber.skipcheck=true, it will fail, saying you need to deal with your changes. The second thing it does, again unless suppressed, is update your working copy. This way you get the proper revision number. So I don't know if that was the best way to approach that part, or if I missed anything in my logic up there, but it's working nicely now. Obviously it only works for svn at the moment. I just wanted to have a unique build number for every 1.0-SNAPSHOT (or whatever) build I ever create. The build number is added to the MANIFEST.MF file in jars and wars, and can be included in the version or finalname elements of the pom if needed. Of course, I'm happy to contribute anything I can, in whatever way I can. I'll publish it on Monday so that anyone who is interested can take a look. J On Feb 10, 2006, at 4:35 PM, Miguel Griffa wrote:
|
- [mojo-dev] BuildNumber plugin Miguel Griffa
- Re: [mojo-dev] BuildNumber plugin John Casey
- Re: [mojo-dev] BuildNumber plugin Trygve Laugstøl
- Re: [mojo-dev] BuildNumber plugin Miguel Griffa
- Re: [mojo-dev] BuildNumber plugin Trygve Laugstøl
- Re: [mojo-dev] BuildNumber plugin jerome lacoste
- Re: [mojo-dev] BuildNumber plugin Julian Wood
- Re: [mojo-dev] BuildNumber plugin Trygve Laugstøl
- Re: [mojo-dev] BuildNumber plugin Julian Wood
- Re: [mojo-dev] BuildNumber plug... Trygve Laugstøl
- Re: [mojo-dev] BuildNumber plugin Joakim Erdfelt
- Re: [mojo-dev] BuildNumber plugin Julian Wood
- Re: [mojo-dev] BuildNumber plugin Julian Wood
- Re: [mojo-dev] BuildNumber plugin Emmanuel Venisse
- Re: [mojo-dev] BuildNumber plugin Julian Wood
- Re: [mojo-dev] BuildNumber plug... Emmanuel Venisse
- Re: [mojo-dev] BuildNumber ... dan tran
