You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Prabu Krishnakumar <pr...@gmail.com> on 2006/12/27 16:23:07 UTC

maven 2 goal decoration

Hi,
 We came across goal decoration in
http://docs.codehaus.org/display/MAVEN/Maven2+Goal+Decoration, but the
latest maven 2 version does not seem to support this.
We have a requirement where we have to persist the version info in a file on
cvs checkout.Planned to do this on the postgoal of scm:checkout through a
custom plugin.Is there any alternative in maven 2 for goal decoration.

Thanks,
Prabu

Re: maven 2 goal decoration

Posted by franz see <fr...@gmail.com>.
Good day to you, Prabu,

In Maven2, pregoal and postgoal no longer exists. In it's place a built in
lifecycle is introduce containing several phases. 

To do you what you wan, you can set your custom plugin @execute phase="<some
phase>" where <some phase> is a phase after your scm:checkout's phase.
However, since scm:checkout is not bound to any phase (by default), it would
be a bit hard to know before hand what <some phase> would be. Thus, i
suggest you do not bind your custom plugin a default phase as well.

Instead, using your pom, just bind scm:checkout in one phase,  and your
custom plugin's goal in another phase (after your scm:checkout's phase).
Either that, or bind them in the same phase but declare scm:checkout first,
followed by your custom plugin's goal ( if that does not seem to work, you
may want to use maven 2.1-SNAPSHOT since it is fixed there ).

And if that kind of setup is used through out several projects, then you may
want to create a parent pom ( if you don't already have one ) and declare
the phase binding of your scm:checkout and custom plugin's goal there. And
have your projects inherit that parent project.

For more information about lifecycles, phases, and goals, kindly take a look
at [1]. 

Cheers,
Franz

[1] http://docs.codehaus.org/display/MAVENUSER/introduction-to-the-lifecycle


Prabu Krishnakumar wrote:
> 
> Hi,
>  We came across goal decoration in
> http://docs.codehaus.org/display/MAVEN/Maven2+Goal+Decoration, but the
> latest maven 2 version does not seem to support this.
> We have a requirement where we have to persist the version info in a file
> on
> cvs checkout.Planned to do this on the postgoal of scm:checkout through a
> custom plugin.Is there any alternative in maven 2 for goal decoration.
> 
> Thanks,
> Prabu
> 
> 

-- 
View this message in context: http://www.nabble.com/maven-2-goal-decoration-tf2887847s177.html#a8074126
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