Skip to content

Instantly share code, notes, and snippets.

@sachin-handiekar
Created November 25, 2013 11:10
Show Gist options
  • Save sachin-handiekar/7639788 to your computer and use it in GitHub Desktop.
Save sachin-handiekar/7639788 to your computer and use it in GitHub Desktop.
Prevent Maven generate-sources phase to run twice.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
...
...
...
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources-no-fork</id>
<inherited>true</inherited>
<phase>generate-sources</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment