Author: veithen
Date: Sun Sep 15 17:56:45 2013
New Revision: 1523467
URL: http://svn.apache.org/r1523467
Log:
Don't configure JaCoCo if there are no test cases. This should also solve an
issue occurring with recent versions of the Surefire plugin in conjunction with
certain versions of Maven (e.g. 3.0.4) where the build fails because of a
missing attached artifact.
Modified:
webservices/axiom/trunk/pom.xml
Modified: webservices/axiom/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/webservices/axiom/trunk/pom.xml?rev=1523467&r1=1523466&r2=1523467&view=diff
==============================================================================
--- webservices/axiom/trunk/pom.xml (original)
+++ webservices/axiom/trunk/pom.xml Sun Sep 15 17:56:45 2013
@@ -553,11 +553,16 @@
new File(project.build.directory,
'tmp').mkdirs()
<!-- Skip Jacoco if necessary -->
- if (project.packaging == 'pom' ||
project.properties['skipTests'] == 'true') {
+ if (project.packaging == 'pom') {
+ println 'Disabling JaCoCo for project with
packaging "pom"'
project.properties['skipJacoco'] = 'true'
- }
- <!-- JaCoCo doesn't work on Java 1.8 -->
- if
(System.properties['java.specification.version'] == '1.8') {
+ } 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'
}