Skip to content

Instantly share code, notes, and snippets.

@beckje01
Created July 23, 2013 14:30
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 beckje01/6062791 to your computer and use it in GitHub Desktop.
Save beckje01/6062791 to your computer and use it in GitHub Desktop.
Example Pom reusing all unit test details and code coverage.
<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/xsd/maven-4.0.0.xsd'>
<modelVersion>4.0.0</modelVersion>
<groupId>com.greatconf</groupId>
<artifactId>example-api</artifactId>
<version>0.1</version>
<packaging>pom</packaging>
<name>example-api</name>
<build>
<sourceDirectory>
grails-app/controllers,grails-app/services,grails-app/utils,grails-app/domain,grails-app/taglib
</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<Target>1.6</Target>
<excludes>
<exclude>**/*.*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/groovy</source>
<source>src/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<sonar.language>grvy</sonar.language>
<sonar.dynamicAnalysis>true</sonar.dynamicAnalysis>
<sonar.surefire.reportsPath>target/test-reports</sonar.surefire.reportsPath>
<sonar.cobertura.reportPath>target/test-reports/cobertura/coverage.xml</sonar.cobertura.reportPath>
<sonar.phase>generate-sources</sonar.phase>
</properties>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment