Sure. Here's an example:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <id>proc</id>
            <phase>process-resources</phase>
            <configuration>
              <tasks>
                <echo>this is maven-antrun-plugin : process-resources</echo>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
          <execution>
            <id>pkg</id>
            <phase>package</phase>
            <configuration>
              <copy file="${basedir}/../Lib/target/lib-2.1.2.jar"
tofile="${basedir}/target/classes/lib/lib-2.1.2.jar"/>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
          <execution>
            <id>dep</id>
            <phase>deploy</phase>
            <configuration>
              <tasks>
                <echo message="Deploying..."/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>

You'll want to make something similar with Executions and
Configurations specific to your usage.

Wayne


On 3/10/06, Brian Burridge <[EMAIL PROTECTED]> wrote:
> Is it possible to have different configurations for a plugin based on
> lifecycle phase?
>
> Here is an example, with using the tomcat plugin.
> I currently have the following configuration which allows me to deploy the
> Maven built WAR into my local tomcat server:
>
>    *<plugin>*
>            *<groupId>*org.codehaus.mojo*</groupId>*
>            *<artifactId>*tomcat-maven-plugin*</artifactId>*
>            *<version>*1.0-SNAPSHOT*</version>*
>            *<configuration>*
>                    *<server>*MyLocalTomcatServer*</server>*
>            *</configuration>*
>    *</plugin>*
>
> I would like it to be configured that way up until the integration-test
> phase, when I would like to change the server specified so that it switches
> to deploy the WAR remotely.
>
> Brian N. Burridge
>
>

Reply via email to