From ed932286a8750fdeba3fc4e985b3dfc7d228cab5 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 6 Aug 2014 07:45:21 +0200 Subject: [PATCH] Fix test coverage not being reported in Sonar Change-Id: Id8ff02a986b1bfdab01a481fcb11cef111757de9 Signed-off-by: Robert Varga --- opendaylight/commons/opendaylight/pom.xml | 60 +++++++++++++++++- opendaylight/config/config-manager/pom.xml | 10 --- opendaylight/config/config-util/pom.xml | 10 --- opendaylight/config/pom.xml | 12 ---- .../config/yang-jmx-generator-it/pom.xml | 35 ----------- opendaylight/md-sal/sal-binding-it/pom.xml | 62 ------------------- opendaylight/netconf/netconf-it/pom.xml | 28 --------- 7 files changed, 57 insertions(+), 160 deletions(-) diff --git a/opendaylight/commons/opendaylight/pom.xml b/opendaylight/commons/opendaylight/pom.xml index ff8735a518..4549587383 100644 --- a/opendaylight/commons/opendaylight/pom.xml +++ b/opendaylight/commons/opendaylight/pom.xml @@ -160,15 +160,17 @@ ${user.name}-private-view https://sonar.opendaylight.org/ + 2.4 jacoco java + target/code-coverage/jacoco.exec + target/code-coverage/jacoco-it.exec org.openflow.openflowj,net.sf.jung2,org.opendaylight.controller.protobuff.messages 1.0.0 1.2.1 3.1.4.RELEASE 3.1.3.RELEASE 3.1.3.RELEASE - org.openflow.openflowj,net.sf.jung2 0.4.2-SNAPSHOT 0.4.2-SNAPSHOT 0.5.1-SNAPSHOT @@ -1810,6 +1812,16 @@ + + + + org.codehaus.sonar-plugins.java + sonar-jacoco-listeners + ${sonar-jacoco-listeners.version} + test + + + @@ -2103,6 +2115,30 @@ org.jacoco jacoco-maven-plugin ${jacoco.version} + + + prepare-ut-agent + process-test-classes + + prepare-agent + + + ${sonar.jacoco.reportPath} + jacoco.agent.ut.arg + + + + prepare-it-agent + pre-integration-test + + prepare-agent + + + ${sonar.jacoco.itReportPath} + jacoco.agent.it.arg + + + org.opendaylight.yangtools @@ -2179,13 +2215,20 @@ maven-failsafe-plugin ${failsafe.version} - ${testvm.argLine} + ${testvm.argLine} ${jacoco.agent.it.arg} logback.configurationFile logback.xml + + + + listener + org.sonar.java.jacoco.JUnitListener + + @@ -2209,19 +2252,30 @@ maven-surefire-plugin ${surefire.version} - ${testvm.argLine} + ${testvm.argLine} ${jacoco.agent.ut.arg} logback.configurationFile logback.xml + + + + listener + org.sonar.java.jacoco.JUnitListener + + org.codehaus.mojo build-helper-maven-plugin + + org.jacoco + jacoco-maven-plugin + diff --git a/opendaylight/config/config-manager/pom.xml b/opendaylight/config/config-manager/pom.xml index fc2c0fd85b..c98a47660e 100644 --- a/opendaylight/config/config-manager/pom.xml +++ b/opendaylight/config/config-manager/pom.xml @@ -91,16 +91,6 @@ org.apache.maven.plugins maven-jar-plugin - - org.apache.maven.plugins - maven-surefire-plugin - - 1 - false - false - 1 - - diff --git a/opendaylight/config/config-util/pom.xml b/opendaylight/config/config-util/pom.xml index 7429f4d574..fd9c1b91e3 100644 --- a/opendaylight/config/config-util/pom.xml +++ b/opendaylight/config/config-util/pom.xml @@ -32,16 +32,6 @@ org.apache.maven.plugins maven-jar-plugin - - org.apache.maven.plugins - maven-surefire-plugin - - 1 - false - false - 1 - - org.apache.felix maven-bundle-plugin diff --git a/opendaylight/config/pom.xml b/opendaylight/config/pom.xml index 26fac47e71..343d13e9c1 100644 --- a/opendaylight/config/pom.xml +++ b/opendaylight/config/pom.xml @@ -94,18 +94,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - - true - classes - 1C - false - true - 2 - - org.codehaus.groovy.maven gmaven-plugin diff --git a/opendaylight/config/yang-jmx-generator-it/pom.xml b/opendaylight/config/yang-jmx-generator-it/pom.xml index c91881bd3e..f9e0c7036a 100644 --- a/opendaylight/config/yang-jmx-generator-it/pom.xml +++ b/opendaylight/config/yang-jmx-generator-it/pom.xml @@ -42,39 +42,4 @@ test - - - - - org.apache.maven.plugins - maven-surefire-plugin - - 1 - false - false - - - - default-test - - true - - - - integration-tests - - test - - integration-test - - - **/org/opendaylight/controller/config/yangjmxgenerator/it/*.java - - false - - - - - - diff --git a/opendaylight/md-sal/sal-binding-it/pom.xml b/opendaylight/md-sal/sal-binding-it/pom.xml index 98515966d9..8e47d87a74 100644 --- a/opendaylight/md-sal/sal-binding-it/pom.xml +++ b/opendaylight/md-sal/sal-binding-it/pom.xml @@ -8,12 +8,6 @@ sal-binding-it - - ../sal-binding-broker/target/jacoco-it.exec - - ../sal-binding-broker/target/jacoco.exec - - ch.qos.logback @@ -169,65 +163,9 @@ - - org.jacoco - jacoco-maven-plugin - ${jacoco.version} - - ../sal-binding-broker/target/jacoco-it.exec - - org.opendaylight.controller.* - - - - - pre-test - - prepare-agent - - - - post-test - - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - org.jacoco - jacoco-maven-plugin - - - org.opendaylight.controller.* - - - - - pre-test - - prepare-agent - - - - post-test - - report - - test - - - org.ops4j.pax.exam maven-paxexam-plugin diff --git a/opendaylight/netconf/netconf-it/pom.xml b/opendaylight/netconf/netconf-it/pom.xml index 0e9589d2d2..272b686fc0 100644 --- a/opendaylight/netconf/netconf-it/pom.xml +++ b/opendaylight/netconf/netconf-it/pom.xml @@ -143,34 +143,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - - 1 - false - false - - - - default-test - - true - - - - integration-tests - - test - - integration-test - - false - -Dlogback.configurationFile=${maven.test.dest}/logback.xml - - - - org.ops4j.pax.exam maven-paxexam-plugin -- 2.36.6