Realistically you would need to put this in a profile and activate it when you need to (which just so happens to coincide with calling "mvn package").
So you would call "mvn compile" or "mvn test" and then when you want to increment the number, you'd call "mvn package -Pincrement" or whatever. Wayne On 4/14/08, Mark-E <[EMAIL PROTECTED]> wrote: > > Hello, > I am using version 0.9.6 of this plugin and I have a question. As I > currently have the plugin setup, using the phase of <validate>, when I run a > mvn compile, it incrememnts the number. I only want the build number to > increment if I run a mvn package. Now I looked at setting the phase to > <package> but it builds the jar first then runs this so the jar version is > null. > > Does anyone know how to set this up so that it only runs when I do a mvn > package and it runs before the jar is created? I looked into the phase of > pre-package but that does not work in maven 2.0.9. > > Thanks, > Mark > > > -- > View this message in context: > http://www.nabble.com/maven-buildnumber-plugin-question-tp16682676s177p16682676.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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]