From: sourabh_sourabh Date: Tue, 10 Dec 2024 11:32:35 +0000 (+0000) Subject: ONAP Code Coverage for DMI is not publishing to sonar X-Git-Tag: 1.7.0~14 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=bca7fe8c8f66f0d66c8d47238871e10bb3c8aa96;p=cps%2Fncmp-dmi-plugin.git ONAP Code Coverage for DMI is not publishing to sonar - Added sonar plugin for dmi service. Issue-ID: CPS-2545 Change-Id: Ic779c81dc5db3071010f5b47cd3f4a75a107c494 Signed-off-by: sourabh_sourabh --- diff --git a/dmi-service/pom.xml b/dmi-service/pom.xml index 0686f3ae..3736b76b 100644 --- a/dmi-service/pom.xml +++ b/dmi-service/pom.xml @@ -46,6 +46,7 @@ 3.1.2 3.3.1 6.6.0 + 4.0.0.4121 3.1.2 4.4.2 3.3.1 @@ -55,6 +56,7 @@ 0.98 ${project.reporting.outputDirectory}/jacoco-ut 0.8.11 + ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml https://nexus.onap.org @@ -545,6 +547,7 @@ org/onap/cps/ncmp/dmi/model/* org/onap/cps/ncmp/dmi/datajobs/model/* + **/pom.xml @@ -596,6 +599,12 @@ + + + org.sonarsource.scanner.maven + sonar-maven-plugin + ${sonar.version} + org.apache.maven.plugins maven-deploy-plugin diff --git a/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/service/client/NcmpRestClient.java b/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/service/client/NcmpRestClient.java index a2a01ebd..92165ffb 100644 --- a/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/service/client/NcmpRestClient.java +++ b/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/service/client/NcmpRestClient.java @@ -51,7 +51,7 @@ public class NcmpRestClient { final HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.setBasicAuth(cpsProperties.getAuthUsername(), cpsProperties.getAuthPassword()); httpHeaders.set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); - final HttpEntity httpEntity = new HttpEntity<>(jsonData, httpHeaders); + final HttpEntity httpEntity = new HttpEntity<>(jsonData, httpHeaders); return restTemplate.exchange(ncmpRegistrationUrl, HttpMethod.POST, httpEntity, String.class); }