It also seems that this has nothing to do with whatever lifecycle is the
task bound to. Even if the POM looks like below, it runs twice:

  <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <id>generate-wireformats</id>
            <phase>validate</phase>
            <configuration>
              <target>
                <echo message="executing"/>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
...

On Fri, Dec 17, 2010 at 10:25 AM, Mate Varga <[email protected]> wrote:

> Hello,
>
> I've got an Ant task which is bound to 'generate-resources' phase. If I try
> to deploy the project, the task gets executed twice (before and after the
> tests).
> Any ideas about how could I prevent that?
>
> # 'release' and 'local' are my own profiles.
>
> (~/)\>mvn -P release,-local clean deploy -DskipTests=true
>
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building xxx 43
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ cache ---
>  [INFO] Deleting /xxx
> [INFO]
> [INFO] --- maven-antrun-plugin:1.6:run (generate-wireformats) @ cache ---
> [INFO] Executing tasks
>
> main:
>      [echo] compile classpath: ${maven.compile.classpath}
> [generator] Writing wireformat config file with classloader URLs: /xxx
> [generator] Writing wireformat config file with relative file URLs: /xxx
>
> [INFO] Executed tasks
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @
> cache ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 3 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cache
> ---
> [INFO] Compiling 100 source files to /xxx
> [INFO]
> [INFO] --- maven-resources-plugin:2.4.3:testResources
> (default-testResources) @ cache ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 2 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @
> cache ---
> [INFO] Compiling 20 source files to /xxx
> [INFO]
> [INFO] --- maven-surefire-plugin:2.5:test (default-test) @ cache ---
> [INFO] Tests are skipped.
> [INFO]
> [INFO] --- maven-antrun-plugin:1.6:run (generate-wireformats) @ cache ---
> [INFO] Executing tasks
>
>
> Thanks,
> Mate
>

Reply via email to