You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2012/12/30 22:14:24 UTC
svn commit: r1426991 - in /webservices/commons/trunk/modules/axiom:
code-coverage/ code-coverage/pom.xml modules/axiom-dom/pom.xml
modules/axiom-impl/pom.xml pom.xml src/site/site.xml
Author: veithen
Date: Sun Dec 30 21:14:23 2012
New Revision: 1426991
URL: http://svn.apache.org/viewvc?rev=1426991&view=rev
Log:
Added automatic code coverage reporting based on Jacoco.
Added:
webservices/commons/trunk/modules/axiom/code-coverage/ (with props)
webservices/commons/trunk/modules/axiom/code-coverage/pom.xml (with props)
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-dom/pom.xml
webservices/commons/trunk/modules/axiom/modules/axiom-impl/pom.xml
webservices/commons/trunk/modules/axiom/pom.xml
webservices/commons/trunk/modules/axiom/src/site/site.xml
Propchange: webservices/commons/trunk/modules/axiom/code-coverage/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Dec 30 21:14:23 2012
@@ -0,0 +1 @@
+target
Added: webservices/commons/trunk/modules/axiom/code-coverage/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/code-coverage/pom.xml?rev=1426991&view=auto
==============================================================================
--- webservices/commons/trunk/modules/axiom/code-coverage/pom.xml (added)
+++ webservices/commons/trunk/modules/axiom/code-coverage/pom.xml Sun Dec 30 21:14:23 2012
@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.ws.commons.axiom</groupId>
+ <artifactId>axiom</artifactId>
+ <version>1.2.15-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>code-coverage</artifactId>
+ <name>Code Coverage Report</name>
+ <packaging>pom</packaging>
+ <dependencies>
+ <!--
+ For each project that should appear in the coverage report, add the following dependencies:
+ * The main artifact if it is not shaded, or the original (unshaded) artifact.
+ * The sources JAR.
+
+ For each project that contributes code coverage, add a dependency to the jacoco.exec file
+ (i.e. classifier=jacoco and type=exec).
+ -->
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-api</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-api</artifactId>
+ <version>${project.version}</version>
+ <classifier>jacoco</classifier>
+ <type>exec</type>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-common-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-common-impl</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-common-impl</artifactId>
+ <version>${project.version}</version>
+ <classifier>jacoco</classifier>
+ <type>exec</type>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-impl</artifactId>
+ <version>${project.version}</version>
+ <classifier>original</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-impl</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-impl</artifactId>
+ <version>${project.version}</version>
+ <classifier>jacoco</classifier>
+ <type>exec</type>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-dom</artifactId>
+ <version>${project.version}</version>
+ <classifier>original</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-dom</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-dom</artifactId>
+ <version>${project.version}</version>
+ <classifier>jacoco</classifier>
+ <type>exec</type>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-jaxb</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-jaxb</artifactId>
+ <version>${project.version}</version>
+ <classifier>sources</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-jaxb</artifactId>
+ <version>${project.version}</version>
+ <classifier>jacoco</classifier>
+ <type>exec</type>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-tests</artifactId>
+ <version>${project.version}</version>
+ <classifier>jacoco</classifier>
+ <type>exec</type>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-integration</artifactId>
+ <version>${project.version}</version>
+ <classifier>jacoco</classifier>
+ <type>exec</type>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-osgi-tests</artifactId>
+ <version>${project.version}</version>
+ <classifier>jacoco</classifier>
+ <type>exec</type>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>axiom-samples</artifactId>
+ <version>${project.version}</version>
+ <classifier>jacoco</classifier>
+ <type>exec</type>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-jacoco-exec</id>
+ <phase>site</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/jacoco/exec</outputDirectory>
+ <includeClassifiers>jacoco</includeClassifiers>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-sources</id>
+ <phase>site</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/jacoco/sources</outputDirectory>
+ <includeClassifiers>sources</includeClassifiers>
+ </configuration>
+ </execution>
+ <execution>
+ <id>copy-classes</id>
+ <phase>site</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/jacoco/classes</outputDirectory>
+ <includeTypes>jar</includeTypes>
+ <excludeClassifiers>sources</excludeClassifiers>
+ <excludeTransitive>true</excludeTransitive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jacoco-report</id>
+ <phase>site</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <taskdef name="report" classname="org.jacoco.ant.ReportTask"/>
+ <report>
+ <executiondata>
+ <fileset dir="${project.build.directory}/jacoco/exec"/>
+ </executiondata>
+ <structure name="Coverage Report">
+ <classfiles>
+ <fileset dir="${project.build.directory}/jacoco/classes"/>
+ </classfiles>
+ <sourcefiles>
+ <fileset dir="${project.build.directory}/jacoco/sources"/>
+ </sourcefiles>
+ </structure>
+ <html destdir="${project.reporting.outputDirectory}" />
+ </report>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.ant</artifactId>
+ <version>${jacoco.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: webservices/commons/trunk/modules/axiom/code-coverage/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-dom/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-dom/pom.xml?rev=1426991&r1=1426990&r2=1426991&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-dom/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-dom/pom.xml Sun Dec 30 21:14:23 2012
@@ -183,6 +183,27 @@
</dependency>
</dependencies>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-original-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/original-${project.build.finalName}.jar</file>
+ <classifier>original</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<!-- Attach a JAR with the test classes so that we can reuse them in other modules
(see http://maven.apache.org/guides/mini/guide-attached-tests.html). -->
<plugin>
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/pom.xml?rev=1426991&r1=1426990&r2=1426991&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/pom.xml Sun Dec 30 21:14:23 2012
@@ -166,6 +166,27 @@
</dependency>
</dependencies>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-original-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/original-${project.build.finalName}.jar</file>
+ <classifier>original</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<!-- Attach a JAR with the test classes so that we can reuse them in other modules
(see http://maven.apache.org/guides/mini/guide-attached-tests.html). -->
<plugin>
Modified: webservices/commons/trunk/modules/axiom/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/pom.xml?rev=1426991&r1=1426990&r2=1426991&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/pom.xml Sun Dec 30 21:14:23 2012
@@ -399,6 +399,7 @@
<stax.impl.version>1.2.0</stax.impl.version>
-->
<shade.plugin.version>1.6</shade.plugin.version>
+ <jacoco.version>0.6.1.201212231917</jacoco.version>
</properties>
<build>
<extensions>
@@ -450,7 +451,7 @@
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
- <version>2.1</version>
+ <version>2.6</version>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
@@ -553,6 +554,46 @@
<attach>true</attach>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>${jacoco.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <!-- Anonymize the session ID (by default it contains the name of the host executing the build) -->
+ <sessionId>mvn:${project.groupId}:${project.artifactId}:${project.version}</sessionId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <!-- Note that the execution will not fail if the file to be attached is not present.
+ Therefore it is safe to execute this for all projects. -->
+ <id>attach-jacoco-exec</id>
+ <phase>test</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/jacoco.exec</file>
+ <classifier>jacoco</classifier>
+ <type>exec</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<profiles>
@@ -649,5 +690,6 @@
<module>userguide</module>
<module>apidocs</module>
<module>distribution</module>
+ <module>code-coverage</module>
</modules>
</project>
Modified: webservices/commons/trunk/modules/axiom/src/site/site.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/src/site/site.xml?rev=1426991&r1=1426990&r2=1426991&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/src/site/site.xml (original)
+++ webservices/commons/trunk/modules/axiom/src/site/site.xml Sun Dec 30 21:14:23 2012
@@ -52,6 +52,7 @@
<item name="Javadocs" href="/apidocs/index.html"/>
<item name="FAQ" href="faq.html"/>
<item name="View Source" href="http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/?root=Apache-SVN"/>
+ <item name="Code Coverage" href="code-coverage/index.html"/>
</menu>
<menu name="Apache">
<item name="License" href="http://www.apache.org/licenses/"/>