You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark-E <me...@hbs.edu> on 2008/04/14 20:04:33 UTC

maven-buildnumber-plugin question

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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-buildnumber-plugin question

Posted by Wayne Fay <wa...@gmail.com>.
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 <me...@hbs.edu> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org