Maven phase executing twice

I require to generate some sources, so i attached a plugin goal to the generate-sources lifecycle phase.

When I run mvn package it works fine, but when I run mvn install I noticed that my source generation plugin executes twice.

        <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
                <execution>
                    <id>generate-sources-id</id>
                    <phase>generate-sources</phase>
                    <configuration>
                        <tasks>
                            <property name="build.compiler" value="extJavac" />

                            <ant target="generate-sources-from-ant" />
                        </tasks>
                    </configuration>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

Any ideas to fix the problem ?

11
задан tubaguy50035 5 July 2012 в 21:59
поделиться