You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Julien HENRY <he...@yahoo.fr> on 2010/07/13 11:34:17 UTC

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

Hi,

Have you tried the following configuration?

<build>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>task1</id>
            <phase>yourphase</phase>
            <configuration>
              <tasks>
                <!-- Some task -->
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>your middle plugin</artifactId>
        <executions>
          <execution>
            <id>task2</id>
            <phase>yourphase</phase>
            <configuration>
               ...
            </configuration>
            <goals>
              ...
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>task3</id>
            <phase>yourphase</phase>
            <configuration>
              <tasks>
                <!-- Some other task -->
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
I have not tested so I'm not sure it will work.

Regards,

Julien



----- Message d'origine ----
> De : Wim Deblauwe <wi...@gmail.com>
> À : Maven Users List <us...@maven.apache.org>
> Envoyé le : Mar 13 juillet 2010, 11h 09min 36s
> Objet : Running antrun plugin twice in same phase with another plugin in  
>between?
> 
> 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: Re : Running antrun plugin twice in same phase with another plugin in between?

Posted by Wim Deblauwe <wi...@gmail.com>.
Hi Julien,

yes, I tried that too and it does not work. task1 does not get executed :(

regards,

Wim

2010/7/13 Julien HENRY <he...@yahoo.fr>

> Hi,
>
> Have you tried the following configuration?
>
> <build>
>    <plugins>
>      <plugin>
>        <artifactId>maven-antrun-plugin</artifactId>
>        <executions>
>          <execution>
>            <id>task1</id>
>            <phase>yourphase</phase>
>            <configuration>
>              <tasks>
>                <!-- Some task -->
>              </tasks>
>            </configuration>
>            <goals>
>              <goal>run</goal>
>            </goals>
>          </execution>
>        </executions>
>      </plugin>
>      <plugin>
>        <artifactId>your middle plugin</artifactId>
>        <executions>
>          <execution>
>            <id>task2</id>
>            <phase>yourphase</phase>
>            <configuration>
>               ...
>            </configuration>
>            <goals>
>              ...
>            </goals>
>          </execution>
>        </executions>
>      </plugin>
>      <plugin>
>        <artifactId>maven-antrun-plugin</artifactId>
>        <executions>
>          <execution>
>            <id>task3</id>
>            <phase>yourphase</phase>
>            <configuration>
>              <tasks>
>                <!-- Some other task -->
>              </tasks>
>            </configuration>
>            <goals>
>              <goal>run</goal>
>            </goals>
>          </execution>
>        </executions>
>      </plugin>
>    </plugins>
>  </build>
> I have not tested so I'm not sure it will work.
>
> Regards,
>
> Julien
>
>
>
> ----- Message d'origine ----
> > De : Wim Deblauwe <wi...@gmail.com>
> > À : Maven Users List <us...@maven.apache.org>
> > Envoyé le : Mar 13 juillet 2010, 11h 09min 36s
> > Objet : Running antrun plugin twice in same phase with another plugin in
> >between?
> >
> > 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
>
>