Skip to content

Commit

Permalink
Merge branch 'code-coverage' of https://github.com/mgencur/jcr into m…
Browse files Browse the repository at this point in the history
…gencur-code-coverage
  • Loading branch information
George Gastaldi committed Mar 11, 2011
2 parents 28e0b2e + 2a6970e commit 3c44c1c
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 8 deletions.
38 changes: 33 additions & 5 deletions impl/pom.xml
Expand Up @@ -46,14 +46,42 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>emma-maven-plugin</artifactId>
<executions>
<execution>
<id>instrumentation</id>
<phase>process-classes</phase>
<goals>
<goal>instrument</goal>
</goals>
<configuration>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.sonatype.maven.plugin</groupId>
<artifactId>emma4it-maven-plugin</artifactId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>complete-classpath-for-tests</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<delete dir="${project.build.directory}/classes" />
<mkdir dir="${project.build.directory}/classes" />
<copy todir="${project.build.directory}/classes" overwrite="true">
<fileset dir="${project.build.directory}/generated-classes/emma/classes">
<include name="**/*"/>
</fileset>
</copy>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
31 changes: 31 additions & 0 deletions pom.xml
Expand Up @@ -30,6 +30,7 @@
<seam.version>3.0.0.CR1</seam.version>
<jboss.spec.version>1.0.0.CR1</jboss.spec.version>
<jcr.version>2.0</jcr.version>
<emma.version>2.0.5312</emma.version>
</properties>

<prerequisites>
Expand Down Expand Up @@ -147,6 +148,36 @@
</pluginRepository>
</pluginRepositories>
</profile>
<profile>
<id>code-coverage</id>
<dependencies>
<dependency>
<groupId>emma</groupId>
<artifactId>emma</artifactId>
<version>${emma.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/</directory>
<includes>
<include>**/*.ec</include>
<include>**/*.em</include>
<include>**/transaction.log</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<issueManagement>
Expand Down
7 changes: 6 additions & 1 deletion tests/jackrabbit/pom.xml
Expand Up @@ -27,4 +27,9 @@
<version>${jackrabbit.core.version}</version>
</dependency>
</dependencies>
</project>
<profiles>
<profile>
<id>code-coverage</id>
</profile>
</profiles>
</project>
60 changes: 59 additions & 1 deletion tests/modeshape/pom.xml
Expand Up @@ -28,4 +28,62 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>
<profiles>
<profile>
<id>code-coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.maven.plugin</groupId>
<artifactId>emma4it-maven-plugin</artifactId>
<executions>
<execution>
<id>merge</id>
<phase>post-integration-test</phase>
<goals>
<goal>merge</goal>
</goals>
<configuration>
<searchPath>${project.parent.build.directory}/../../</searchPath>
</configuration>
</execution>
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<sourceSets>
<sourceSet>
<directory>${project.parent.build.directory}/../../impl/src/main/java</directory>
</sourceSet>
</sourceSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>retrieve-coverage-files</id>
<phase>post-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy file="${project.parent.build.directory}/../../impl/target/coverage.em"
todir="${basedir}" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
2 changes: 1 addition & 1 deletion tests/pom.xml
Expand Up @@ -78,4 +78,4 @@
</dependencies>
</dependencyManagement>

</project>
</project>

0 comments on commit 3c44c1c

Please sign in to comment.