You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Justin Edelson <ju...@gmail.com> on 2010/07/13 15:33:36 UTC

Re: Running antrun plugin twice in same phase with another plugin in between?

You can't do this.

On 7/13/10 5:09 AM, Wim Deblauwe wrote:
> Hi,
> 
> I need to run the antrun plugin twice in the packaging phase. I found this
> on the wiki:
> http://docs.codehaus.org/display/MAVENUSER/MiniGuide-AntMultiPhase
> 
> However, it speaks of different lifecycle phases. I tried with the same
> phase and that works, however, I need to run another plugin in between. Is
> this possible?
> 
> I was hoping that all plugins' executions would be sorted by their id. That
> way, i could use id's like 'step-1-do-something',
> 'step-2-do-something-else', to force a certain order of plugin execution.
> 
> regards,
> 
> Wim
> 


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


Re: Running antrun plugin twice in same phase with another plugin in between?

Posted by Wim Deblauwe <wi...@gmail.com>.
I had a look at the maven 2.2.x code and I created a small patch that does
it. See http://jira.codehaus.org/browse/MNG-4727
All the patch does is sorting the 'MojoExecution' classes based on their id.
It is very few lines of code really.

It is a bit hackish as you need to use "step-" in your <id/> declaration,
but it works perfectly. I hope the maven devs will pick it up under some
form or another.

regards,

Wim

2010/7/13 Wayne Fay <wa...@gmail.com>

> > However, it speaks of different lifecycle phases. I tried with the same
> > phase and that works, however, I need to run another plugin in between.
> Is
> > this possible?
>
> You could:
> release the maven-antrun-plugin under your own artifactId, say
> wim-antrun-plugin
> then use (in order): m-antrun-p, plugin2, w-antrun-p in your pom
>
> But this seems like a lot of extra work to me.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Running antrun plugin twice in same phase with another plugin in between?

Posted by Wayne Fay <wa...@gmail.com>.
> However, it speaks of different lifecycle phases. I tried with the same
> phase and that works, however, I need to run another plugin in between. Is
> this possible?

You could:
release the maven-antrun-plugin under your own artifactId, say wim-antrun-plugin
then use (in order): m-antrun-p, plugin2, w-antrun-p in your pom

But this seems like a lot of extra work to me.

Wayne

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