Skip to content

Instantly share code, notes, and snippets.

@xseignard
Created November 22, 2011 09:39
Show Gist options
  • Save xseignard/1385307 to your computer and use it in GitHub Desktop.
Save xseignard/1385307 to your computer and use it in GitHub Desktop.
build section of my pom.xml
<build>
<plugins>
<!-- Add generated source directory to the build -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/generated/java/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Needed since the default format of cobertura is html and sonar asks for xml -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<format>xml</format>
</configuration>
</plugin>
</plugins>
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment