From ddbc82ad15be746b381b1daa2561b818f7450ce7 Mon Sep 17 00:00:00 2001 From: megala21 Date: Fri, 22 Sep 2017 00:58:16 +0530 Subject: [PATCH 1/4] Adding jacoc unit code coverage generation --- .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../org.wso2.carbon.apimgt.handlers/pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 27 ++ .../pom.xml | 27 ++ .../pom.xml | 27 ++ .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 27 ++ .../org.wso2.carbon.device.mgt.api/pom.xml | 26 ++ .../org.wso2.carbon.device.mgt.common/pom.xml | 26 ++ .../org.wso2.carbon.device.mgt.core/pom.xml | 26 ++ .../pom.xml | 27 ++ .../pom.xml | 26 ++ .../org.wso2.carbon.email.sender.core/pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../pom.xml | 26 ++ .../org.wso2.carbon.policy.mgt.common/pom.xml | 26 ++ .../org.wso2.carbon.policy.mgt.core/pom.xml | 27 +- components/test-coverage/pom.xml | 357 ++++++++++++++++++ pom.xml | 11 + 32 files changed, 1153 insertions(+), 1 deletion(-) create mode 100644 components/test-coverage/pom.xml diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml index 271b2ac433d..5500d6be77c 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/pom.xml @@ -197,6 +197,32 @@ ${project.artifactId} + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml index 994c3f324ad..0c1ef31ea50 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension/pom.xml @@ -119,6 +119,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml index b0a5aafa8ee..27ab9ea61a9 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.handlers/pom.xml @@ -97,6 +97,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml index 548ab3b8a76..a7482344b96 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.integration.client/pom.xml @@ -80,6 +80,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml index 9c372386095..392ec7d80ac 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/pom.xml @@ -172,6 +172,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml index cde1f984996..81f696d7665 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml @@ -49,6 +49,33 @@ api#scep-mgt#v1.0 + + org.jacoco + jacoco-maven-plugin + 0.7.8 + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml index 257eca9d796..6e95bd25b45 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml @@ -49,6 +49,33 @@ api#certificate-mgt#v1.0 + + org.jacoco + jacoco-maven-plugin + 0.7.8 + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index bb24f54ec3a..35e04631399 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -119,6 +119,33 @@ + + org.jacoco + jacoco-maven-plugin + 0.7.8 + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml index 5da145a5b3b..557318b7dc9 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.device.type.deployer/pom.xml @@ -128,6 +128,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml index 535987b8bdd..638fbc28123 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml @@ -94,6 +94,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml index 853348dfcc2..ef71e742932 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm/pom.xml @@ -145,6 +145,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml index bc197efd9cb..aba1a8bc37a 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http/pom.xml @@ -141,6 +141,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml index f73e92f956d..bcb1840d051 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt/pom.xml @@ -150,6 +150,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml index 40f094b65a8..bd66d683f07 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp/pom.xml @@ -149,6 +149,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml index d5e4c7c2cbb..a49aed6fece 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.dashboard/pom.xml @@ -79,6 +79,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml index 053289cfad9..5eaff665993 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.analytics.data.publisher/pom.xml @@ -131,6 +131,33 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml index c3d750a87d7..c06ceec8992 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml @@ -49,6 +49,32 @@ api#device-mgt#v1.0 + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml index 03b6e25d23d..f2adf02c86b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.common/pom.xml @@ -56,6 +56,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index 71303f01787..bf63179194e 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -39,6 +39,32 @@ org.apache.felix maven-scr-plugin + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + org.apache.felix maven-bundle-plugin diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml index 93e3c061eb0..8cdfc89bf47 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.extensions/pom.xml @@ -117,6 +117,33 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml index 2e93235a716..4e2b7fba8d4 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.url.printer/pom.xml @@ -75,6 +75,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml index d9154d6c0c3..a4fcadbbe8e 100644 --- a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml +++ b/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml @@ -93,6 +93,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml index 7a8cd5fa7fd..b98d8ef482e 100644 --- a/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.device.mgt.oauth.extensions/pom.xml @@ -115,6 +115,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml index 4779b292e14..bfc4c8acab5 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.authenticator.backend.oauth/pom.xml @@ -120,6 +120,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml index b9ea740ec5e..f94e55060d6 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml +++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/pom.xml @@ -168,6 +168,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml index 99e2a4a7bbd..910587aad20 100644 --- a/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.complex.policy.decision.point/pom.xml @@ -59,6 +59,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml index c507a6a8d41..4cab3c612d8 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.decision.point/pom.xml @@ -50,6 +50,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml index 2ab26c97799..d1ebc22f8dc 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.information.point/pom.xml @@ -43,6 +43,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml index 36d92c717bd..0cbdcb3da5b 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.common/pom.xml @@ -65,6 +65,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml index f8825aba7c1..30cfc3a5eb4 100644 --- a/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml +++ b/components/policy-mgt/org.wso2.carbon.policy.mgt.core/pom.xml @@ -94,7 +94,32 @@ - + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/components/test-coverage/pom.xml b/components/test-coverage/pom.xml new file mode 100644 index 00000000000..7545f58784e --- /dev/null +++ b/components/test-coverage/pom.xml @@ -0,0 +1,357 @@ + + + + carbon-devicemgt + org.wso2.carbon.devicemgt + 3.0.113-SNAPSHOT + ../../pom.xml + + 4.0.0 + + test-coverage + + + target + coverage-reports + jacoco-unit.exec + classes + src/main/java + + + certificate-mgt + ${basedir}/../${certificate.mgt}/org.wso2.carbon.certificate.mgt.api + + ${basedir}/../${certificate.mgt}/org.wso2.carbon.certificate.mgt.cert.admin.api + + ${basedir}/../${certificate.mgt}/org.wso2.carbon.certificate.mgt.core + + + device-mgt + ${basedir}/../${device.mgt}/org.wso2.carbon.device.mgt.core + ${basedir}/../${device.mgt}/org.wso2.carbon.device.mgt.common + ${basedir}/../${device.mgt}/org.wso2.carbon.device.mgt.api + ${basedir}/../${device.mgt}/org.wso2.carbon.device.mgt.extensions + + ${basedir}/../${device.mgt}/org.wso2.carbon.device.mgt.analytics.dashboard + + ${basedir}/../${device.mgt}/org.wso2.carbon.device.mgt.analytics.data.publisher + + + ${basedir}/../${device.mgt}/org.wso2.carbon.device.mgt.url.printer + + + + apimgt-extensions + + ${basedir}/../${api.extensions}/org.wso2.carbon.apimgt.application.extension + + + ${basedir}/../${api.extensions}/org.wso2.carbon.apimgt.application.extension.api + + ${basedir}/../${api.extensions}/org.wso2.carbon.apimgt.handlers + + ${basedir}/../${api.extensions}/org.wso2.carbon.apimgt.integration.client + + + ${basedir}/../${api.extensions}/org.wso2.carbon.apimgt.webapp.publisher + + + + device-mgt-extensions + + ${basedir}/../${device.extensions}/org.wso2.carbon.device.mgt.extensions.device.type.deployer + + + ${basedir}/../${device.extensions}/org.wso2.carbon.device.mgt.extensions.pull.notification + + + ${basedir}/../${device.extensions}/org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm + + + ${basedir}/../${device.extensions}/org.wso2.carbon.device.mgt.extensions.push.notification.provider.http + + + ${basedir}/../${device.extensions}/org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt + + + ${basedir}/../${device.extensions}/org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp + + + + ${basedir}/../email-sender/org.wso2.carbon.email.sender.core + + + identity-extensions + + ${basedir}/../${identity.extensions}/org.wso2.carbon.device.mgt.oauth.extensions + + + ${basedir}/../${identity.extensions}/org.wso2.carbon.identity.authenticator.backend.oauth + + + ${basedir}/../${identity.extensions}/org.wso2.carbon.identity.jwt.client.extension + + + + policy-mgt + + ${basedir}/../${policy.mgt}/org.wso2.carbon.complex.policy.decision.point + + ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.decision.point + + + ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.information.point + + ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.mgt.common + ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.mgt.core + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + post-integration-test + + run + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.jacoco + org.jacoco.ant + ${jacoco.ant.verision} + + + ant-contrib + ant-contrib + ${ant.contrib.version} + + + ant + ant + + + + + + + + diff --git a/pom.xml b/pom.xml index 29af9ee4901..c8e34d39f9b 100644 --- a/pom.xml +++ b/pom.xml @@ -52,6 +52,7 @@ features/email-sender features/jwt-client features/device-mgt-extensions + components/test-coverage @@ -1691,6 +1692,11 @@ carbon-p2-plugin ${carbon.p2.plugin.version} + + org.jacoco + jacoco-maven-plugin + ${jacoco.maven.plugin.version} + @@ -1969,6 +1975,11 @@ (1.9,2.0] 3.12.1.GA true + + + 0.7.8 + 0.7.5.201505241946 + 1.0b3 From 57830eb06448e12398b5d6de58a8f19ef93a41e5 Mon Sep 17 00:00:00 2001 From: megala21 Date: Fri, 22 Sep 2017 01:34:44 +0530 Subject: [PATCH 2/4] Finalizing the unit test report generation and fixing the maven warnings in build --- .../pom.xml | 4 - .../org.wso2.carbon.device.mgt.api/pom.xml | 15 - components/test-coverage/pom.xml | 294 +++++++++++++----- .../pom.xml | 26 ++ pom.xml | 25 -- 5 files changed, 240 insertions(+), 124 deletions(-) diff --git a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml index 638fbc28123..b58f6cd9185 100644 --- a/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml +++ b/components/device-mgt-extensions/org.wso2.carbon.device.mgt.extensions.pull.notification/pom.xml @@ -50,10 +50,6 @@ org.eclipse.osgi org.eclipse.osgi.services - - org.eclipse.osgi - org.eclipse.osgi.services - org.wso2.carbon.devicemgt org.wso2.carbon.policy.mgt.core diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml index c06ceec8992..0f49928c943 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/pom.xml @@ -203,11 +203,6 @@ org.wso2.carbon.device.mgt.extensions provided - - org.wso2.carbon.devicemgt - org.wso2.carbon.apimgt.integration.client - provided - org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.core @@ -358,16 +353,6 @@ ${carbon.identity.framework.version} provided - - org.wso2.carbon.analytics - org.wso2.carbon.analytics.datasource.commons - provided - - - org.wso2.carbon.analytics - org.wso2.carbon.analytics.api - provided - org.wso2.carbon.analytics org.wso2.carbon.analytics.dataservice.commons diff --git a/components/test-coverage/pom.xml b/components/test-coverage/pom.xml index 7545f58784e..98ec41372b1 100644 --- a/components/test-coverage/pom.xml +++ b/components/test-coverage/pom.xml @@ -1,4 +1,22 @@ - + + + @@ -11,7 +29,7 @@ 4.0.0 test-coverage - + WSO2 Carbon - Unit Test Coverage Generation target coverage-reports @@ -87,9 +105,9 @@ ${basedir}/../${identity.extensions}/org.wso2.carbon.device.mgt.oauth.extensions - + ${basedir}/../${identity.extensions}/org.wso2.carbon.identity.authenticator.backend.oauth - + ${basedir}/../${identity.extensions}/org.wso2.carbon.identity.jwt.client.extension @@ -106,6 +124,11 @@ ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.mgt.common ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.mgt.core + + + + ${basedir}/../webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework + @@ -130,6 +153,7 @@ + @@ -152,6 +176,9 @@ + + + @@ -188,98 +215,155 @@ + + + + + + + - + + + - + + + - + + + + - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -294,34 +378,84 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + - - - - - - + diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml index 07406a0333a..b9608b4bf61 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/pom.xml @@ -129,6 +129,32 @@ + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + diff --git a/pom.xml b/pom.xml index c8e34d39f9b..82eace8b1e8 100644 --- a/pom.xml +++ b/pom.xml @@ -897,11 +897,6 @@ org.wso2.carbon.identity.application.common ${carbon.identity.framework.version} - - org.wso2.carbon.identity - org.wso2.carbon.identity.oauth2.grant.jwt - ${identity.jwt.extension.version} - org.wso2.carbon.identity.framework org.wso2.carbon.user.mgt @@ -1134,16 +1129,6 @@ org.wso2.carbon.application.mgt.stub ${carbon.commons.version} - - org.wso2.carbon.analytics - org.wso2.carbon.analytics.api - ${carbon.analytics.version} - - - org.wso2.carbon.analytics - org.wso2.carbon.analytics.datasource.commons - ${carbon.analytics.version} - org.wso2.carbon.event-processing org.wso2.carbon.event.processor.stub @@ -1374,11 +1359,6 @@ org.wso2.carbon.event.output.adapter.core ${carbon.analytics.common.version} - - org.wso2.carbon.analytics-common - org.wso2.carbon.event.receiver.stub - ${carbon.analytics.common.version} - org.wso2.carbon.analytics org.wso2.carbon.analytics.datasource.commons @@ -1389,11 +1369,6 @@ org.wso2.carbon.analytics.dataservice.commons ${carbon.analytics.version} - - org.wso2.carbon.analytics-common - org.wso2.carbon.event.stream.stub - ${carbon.analytics.common.version} - org.wso2.carbon.analytics-common org.wso2.carbon.event.publisher.stub From 270037a727ed7456419dbea9058f6962eab61fb4 Mon Sep 17 00:00:00 2001 From: megala21 Date: Fri, 22 Sep 2017 01:36:18 +0530 Subject: [PATCH 3/4] Refactoring --- .../certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml | 1 - .../org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml | 1 - .../certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml | 1 - 3 files changed, 3 deletions(-) diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml index 81f696d7665..8e5d55210de 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.api/pom.xml @@ -52,7 +52,6 @@ org.jacoco jacoco-maven-plugin - 0.7.8 ${basedir}/target/coverage-reports/jacoco-unit.exec diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml index 6e95bd25b45..4df49ca205f 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.api/pom.xml @@ -52,7 +52,6 @@ org.jacoco jacoco-maven-plugin - 0.7.8 ${basedir}/target/coverage-reports/jacoco-unit.exec diff --git a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml index 35e04631399..7bb8308c781 100644 --- a/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml +++ b/components/certificate-mgt/org.wso2.carbon.certificate.mgt.core/pom.xml @@ -122,7 +122,6 @@ org.jacoco jacoco-maven-plugin - 0.7.8 ${basedir}/target/coverage-reports/jacoco-unit.exec From 635f40ce2f097a6f4796c3202e34435c0edffe17 Mon Sep 17 00:00:00 2001 From: megala21 Date: Fri, 22 Sep 2017 09:22:40 +0530 Subject: [PATCH 4/4] Refactoring --- components/test-coverage/pom.xml | 219 +++++++++++++++++-------------- 1 file changed, 121 insertions(+), 98 deletions(-) diff --git a/components/test-coverage/pom.xml b/components/test-coverage/pom.xml index 98ec41372b1..bd2e5e90a1f 100644 --- a/components/test-coverage/pom.xml +++ b/components/test-coverage/pom.xml @@ -41,9 +41,11 @@ certificate-mgt ${basedir}/../${certificate.mgt}/org.wso2.carbon.certificate.mgt.api - ${basedir}/../${certificate.mgt}/org.wso2.carbon.certificate.mgt.cert.admin.api + ${basedir}/../${certificate.mgt}/org.wso2.carbon.certificate.mgt.cert.admin.api + - ${basedir}/../${certificate.mgt}/org.wso2.carbon.certificate.mgt.core + ${basedir}/../${certificate.mgt}/org.wso2.carbon.certificate.mgt.core + device-mgt @@ -98,7 +100,7 @@ - ${basedir}/../email-sender/org.wso2.carbon.email.sender.core + ${basedir}/../email-sender/org.wso2.carbon.email.sender.core identity-extensions @@ -115,15 +117,16 @@ policy-mgt - ${basedir}/../${policy.mgt}/org.wso2.carbon.complex.policy.decision.point + ${basedir}/../${policy.mgt}/org.wso2.carbon.complex.policy.decision.point + ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.decision.point - ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.information.point + ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.information.point - ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.mgt.common - ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.mgt.core + ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.mgt.common + ${basedir}/../${policy.mgt}/org.wso2.carbon.policy.mgt.core @@ -146,22 +149,27 @@ + classpathref="maven.plugin.classpath"/> - - - - - + + + + + - + - + @@ -176,22 +184,24 @@ - + - + - + - + - + @@ -199,48 +209,49 @@ - + - + - + - - - + - + - + - + - + - + - + - + @@ -248,218 +259,230 @@ - + - + - + - + - + - - - + - + - + - + - + - + - + - + - + - + - - - + - + - + - + - + - + - + - + - + - + - + - + - - - - + + - + - - + - + - + - + - + - + - + - + - + - + - - - + - + - + - - + + - + - + - + - + - + - + - - + + - + - + - + +