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 2013/09/29 19:53:15 UTC
svn commit: r1527369 - /webservices/axiom/trunk/pom.xml
Author: veithen
Date: Sun Sep 29 17:53:15 2013
New Revision: 1527369
URL: http://svn.apache.org/r1527369
Log:
Implemented a smarter way to skip attaching the jacoco.exec artifact if there are no test cases.
Modified:
webservices/axiom/trunk/pom.xml
Modified: webservices/axiom/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/pom.xml?rev=1527369&r1=1527368&r2=1527369&view=diff
==============================================================================
--- webservices/axiom/trunk/pom.xml (original)
+++ webservices/axiom/trunk/pom.xml Sun Sep 29 17:53:15 2013
@@ -565,9 +565,6 @@
} else if (project.properties['skipTests'] == 'true') {
println 'Disabling JaCoCo because tests are skipped'
project.properties['skipJacoco'] = 'true'
- } else if (!new File(project.build.testSourceDirectory).exists()) {
- println 'Disabling JaCoCo because there are no tests'
- project.properties['skipJacoco'] = 'true'
} else if (System.properties['java.specification.version'] == '1.8') {
println 'WARNING: Java 1.8 not supported; disabling JaCoCo'
project.properties['skipJacoco'] = 'true'
@@ -575,6 +572,20 @@
</source>
</configuration>
</execution>
+ <execution>
+ <id>check-jacoco-exec</id>
+ <phase>package</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>
+ if (project.properties['skipJacoco'] == 'true' || !new File(project.build.directory, 'jacoco.exec').exists()) {
+ project.properties['skipJacocoAttach'] = 'true'
+ }
+ </source>
+ </configuration>
+ </execution>
</executions>
</plugin>
<plugin>
@@ -654,12 +665,12 @@
<executions>
<execution>
<id>attach-jacoco-exec</id>
- <phase>test</phase>
+ <phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
- <skipAttach>${skipJacoco}</skipAttach>
+ <skipAttach>${skipJacocoAttach}</skipAttach>
<artifacts>
<artifact>
<file>${project.build.directory}/jacoco.exec</file>