You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jean-Luc Wasmer <jl...@lists.wasmer.ca> on 2007/03/19 21:05:38 UTC
Howto run a command at the begining of a lifecycle?
-- repost since original post had incomplete subject
Hi,
My project's version is defined as:
<version>${env.SVNVERSION}-SNAPSHOT</version>
where the SVNVERSION environment variable is set before hand by a shell
script.
How can I embed the script inside maven's build lifecycle? (it should
run before anything else)
Right now the shell script is called by the mvn script before the JVM
invocation but I'd rather make it an Ant task or even write a plugin
just for that.
Jean-Luc
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Howto run a command at the begining of a lifecycle?
Posted by Stephane Nicoll <st...@gmail.com>.
On 3/19/07, Jean-Luc Wasmer <jl...@lists.wasmer.ca> wrote:
> -- repost since original post had incomplete subject
>
> Hi,
>
> My project's version is defined as:
>
> <version>${env.SVNVERSION}-SNAPSHOT</version>
>
> where the SVNVERSION environment variable is set before hand by a shell
> script.
>
> How can I embed the script inside maven's build lifecycle? (it should
> run before anything else)
You can't. You have to understand that the pom is read before starting
anything else (and variables are resolved/interpoloated at that
point).
I am not sure that customizing the version that way is a best practice anyway.
HTH,
Stéphane
>
> Right now the shell script is called by the mvn script before the JVM
> invocation but I'd rather make it an Ant task or even write a plugin
> just for that.
>
>
> Jean-Luc
>
> ---------------------------------------------------------------------
> 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