Skip to content

Instantly share code, notes, and snippets.

@umermansoor
Created November 18, 2012 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umermansoor/4107595 to your computer and use it in GitHub Desktop.
Save umermansoor/4107595 to your computer and use it in GitHub Desktop.
<!-- Need this to detect source files in target/generated-sources folder -->
<!-- If used with a parent POM, the build-helper plugin stays with the child POM -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-test-sources/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment