Maven compile-phase bound plugin running to late.

101 views Asked by At

I have two maven plugins configured. One, the exec-maven-plugin, is bound to the compile phase. The other, maven-resources-plugin, is bound to the prepare-package phase. I need exec to run before resources, and I figured this should work because the compile phase comes before the prepare-package phase in the build life-cycle. I must be missing something.

Here are the two configurations:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>exec-maven-plugin</artifactId>
    <version>1.2.1</version>
    <executions>
        <execution>
            <id>build-tracker</id>
            <phase>compile</phase>
            <goals>
                <goal>exec</goal>
            </goals>
            <configuration>
                <!--Config here-->
            </configuration>
        </execution>
    </executions>
</plugin>

And:

<plugin>
    <artifactId>maven-resources-plugin</artifactId>
    <version>2.5</version>
    <executions>
        <execution>
            <id>copy-ftl</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>copy-resources</goal>
            </goals>
            <configuration>
                <!--Config here-->
            </configuration>
        </execution>
    </executions>
</plugin>

Why are these executing out of order?

0

There are 0 answers