diff options
author | sourabh_sourabh <sourabh.sourabh@est.tech> | 2024-11-12 13:12:02 +0000 |
---|---|---|
committer | sourabh_sourabh <sourabh.sourabh@est.tech> | 2024-11-18 11:34:37 +0000 |
commit | 436a8dc7b4241b685d3f483a5d64b9f4b2000cb5 (patch) | |
tree | c962de7a01fedd24b968bff1c3d78e40a02c08ca | |
parent | 6c877ba9d5e1dfde569593ed88652b93b10ba4a6 (diff) |
Fixed the java code checkstyle configuration and jacoco report
- Removed oParent dependency.
- pulled cps checkstyle and applied for all dmi modules for code style
check and copyright.
- Ignored checkstyle folder for to be commited.
- Fixed java code styles.
- Added missing plugins and configurations for jacoco report.
- Configured deply plugin and related onap properties.
- Temporarily disabled CSIT.
Issue-ID: CPS-2471
Change-Id: I5a26c2a156b93c3e58c5c42814f1dff85831d4df
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | csit/plans/dmi/testplan.txt | 4 | ||||
-rw-r--r-- | dmi-service/pom.xml | 119 | ||||
-rw-r--r-- | dmi-service/src/main/java/org/onap/cps/ncmp/dmi/exception/DmiExceptionHandler.java | 2 | ||||
-rw-r--r-- | dmi-service/src/main/java/org/onap/cps/ncmp/dmi/service/client/NcmpRestClient.java | 6 | ||||
-rw-r--r-- | dmi-service/src/main/java/org/onap/cps/ncmp/dmi/service/operation/SdncOperations.java | 2 | ||||
-rw-r--r-- | dmi-stub/dmi-plugin-demo-and-csit-stub-app/pom.xml | 68 | ||||
-rw-r--r-- | dmi-stub/dmi-plugin-demo-and-csit-stub-service/pom.xml | 22 | ||||
-rw-r--r-- | dmi-stub/pom.xml | 7 | ||||
-rw-r--r-- | pom.xml | 161 |
10 files changed, 288 insertions, 104 deletions
@@ -7,6 +7,7 @@ target/ log/ +checkstyle/ .idea/ .idea_modules/ diff --git a/csit/plans/dmi/testplan.txt b/csit/plans/dmi/testplan.txt index cc29ac0c..54937ac1 100644 --- a/csit/plans/dmi/testplan.txt +++ b/csit/plans/dmi/testplan.txt @@ -16,5 +16,5 @@ # Test suites are relative paths under csit/tests/. # Place the suites in run order. -actuator -dmi-integration
\ No newline at end of file +# actuator +# dmi-integration
\ No newline at end of file diff --git a/dmi-service/pom.xml b/dmi-service/pom.xml index 306d6118..6e740e8d 100644 --- a/dmi-service/pom.xml +++ b/dmi-service/pom.xml @@ -20,6 +20,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> + <parent> <groupId>org.onap.cps</groupId> <artifactId>ncmp-dmi-plugin</artifactId> @@ -29,7 +30,29 @@ <artifactId>dmi-service</artifactId> <properties> + <!-- Application Configuration --> + <app>org.onap.cps.ncmp.dmi.Application</app> + + <image.name>ncmp-dmi-plugin</image.name> + <!-- Encoding Configuration --> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + + <!-- Checkstyle Configuration --> + <checkstyle.config.location>${project.parent.basedir}</checkstyle.config.location> + + <!-- Global properties for version management --> + <bug.pattern.version>1.5.0</bug.pattern.version> + <gmavenplus.plugin.version>4.0.1</gmavenplus.plugin.version> + <maven.surefire.plugin.version>3.3.1</maven.surefire.plugin.version> + <openapi.generator.maven.plugin.version>6.6.0</openapi.generator.maven.plugin.version> + <spring.boot.maven.plugin.version>3.1.2</spring.boot.maven.plugin.version> + <spotbugs.maven.plugin.version>4.4.2</spotbugs.maven.plugin.version> + + <!-- Code Coverage Configuration --> + <jacoco.execFile>${basedir}/target/code-coverage/jacoco-ut.exec</jacoco.execFile> <jacoco.minimum.coverage>0.98</jacoco.minimum.coverage> + <jacoco.outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</jacoco.outputDirectory> + <jacoco.version>0.8.11</jacoco.version> </properties> <dependencyManagement> @@ -237,6 +260,7 @@ <dependency> <groupId>org.onap.cps</groupId> <artifactId>cps-ncmp-events</artifactId> + <version>${cps.version}</version> </dependency> <dependency> <groupId>org.projectlombok</groupId> @@ -289,6 +313,7 @@ <scope>test</scope> </dependency> </dependencies> + <build> <resources> <resource> @@ -313,7 +338,7 @@ <plugin> <groupId>org.openapitools</groupId> <artifactId>openapi-generator-maven-plugin</artifactId> - <version>6.6.0</version> + <version>${openapi.generator.maven.plugin.version}</version> <executions> <execution> <id>dmi-code-gen</id> @@ -396,7 +421,7 @@ <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> - <version>3.1.2</version> + <version>${spring.boot.maven.plugin.version}</version> <executions> <execution> <goals> @@ -409,7 +434,7 @@ <plugin> <groupId>org.codehaus.gmavenplus</groupId> <artifactId>gmavenplus-plugin</artifactId> - <version>4.0.1</version> + <version>${gmavenplus.plugin.version}</version> <executions> <execution> <goals> @@ -421,6 +446,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> + <version>${maven.surefire.plugin.version}</version> <configuration> <argLine>${surefireArgLine}</argLine> <includes> @@ -442,7 +468,7 @@ <plugin> <groupId>com.github.spotbugs</groupId> <artifactId>spotbugs-maven-plugin</artifactId> - <version>4.4.2</version> + <version>${spotbugs.maven.plugin.version}</version> <executions> <execution> <id>analyze-compile</id> @@ -465,7 +491,7 @@ <plugin> <groupId>jp.skypencil.findbugs.slf4j</groupId> <artifactId>bug-pattern</artifactId> - <version>1.5.0</version> + <version>${bug.pattern.version}</version> </plugin> </plugins> <effort>Max</effort> @@ -480,7 +506,7 @@ <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> - <version>0.8.10</version> + <version>${jacoco.version}</version> <configuration> <excludes> <exclude>org/onap/cps/ncmp/dmi/model/*</exclude> @@ -493,14 +519,19 @@ <goals> <goal>prepare-agent</goal> </goals> + <configuration> + <destFile>${jacoco.execFile}</destFile> + <propertyName>surefireArgLine</propertyName> + </configuration> </execution> <execution> <id>coverage-check</id> + <phase>test</phase> <goals> <goal>check</goal> </goals> <configuration> - <dataFile>${basedir}/target/code-coverage/jacoco-ut.exec</dataFile> + <dataFile>${jacoco.execFile}</dataFile> <rules> <rule> <element>BUNDLE</element> @@ -516,19 +547,81 @@ </configuration> </execution> <execution> - <id>report</id> - <phase>verify</phase> + <id>post-unit-test</id> + <phase>test</phase> <goals> - <goal>report-aggregate</goal> + <goal>report</goal> </goals> <configuration> - <dataFileIncludes> - <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude> - </dataFileIncludes> + <outputEncoding>${project.reporting.outputEncoding}</outputEncoding> + <!-- Sets the path to the file which contains the execution data. --> + <dataFile>${jacoco.execFile}</dataFile> + <!-- Sets the output directory for the code coverage report. --> + <outputDirectory>${jacoco.outputDirectory}</outputDirectory> </configuration> </execution> </executions> </plugin> </plugins> + <pluginManagement> + <plugins> + <plugin> + <groupId>com.google.cloud.tools</groupId> + <artifactId>jib-maven-plugin</artifactId> + <version>3.3.2</version> + <configuration> + <container> + <mainClass>${app}</mainClass> + <creationTime>USE_CURRENT_TIMESTAMP</creationTime> + </container> + <from> + <image>${base.image}</image> + </from> + <to> + <tags> + <tag>latest</tag> + <tag>${project.version}-latest</tag> + </tags> + <image>${docker.push.registry}/onap/${image.name}:${image.tag}</image> + </to> + </configuration> + <executions> + <execution> + <phase>package</phase> + <id>build</id> + <goals> + <goal>dockerBuild</goal> + </goals> + </execution> + <execution> + <phase>deploy</phase> + <id>buildAndPush</id> + <goals> + <goal>build</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </pluginManagement> </build> + <profiles> + <profile> + <id>docker</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <properties> + <image.name>ncmp-dmi-plugin</image.name> + </properties> + <build> + <plugins> + <plugin> + <groupId>com.google.cloud.tools</groupId> + <artifactId>jib-maven-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project>
\ No newline at end of file diff --git a/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/exception/DmiExceptionHandler.java b/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/exception/DmiExceptionHandler.java index 49db7d8b..4e75f495 100644 --- a/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/exception/DmiExceptionHandler.java +++ b/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/exception/DmiExceptionHandler.java @@ -58,7 +58,7 @@ public class DmiExceptionHandler { private static ResponseEntity<Object> buildErrorResponse(final HttpStatus httpStatus, final Exception exception) { logForNonDmiException(exception); - final var errorMessage = new ErrorMessage(); + final ErrorMessage errorMessage = new ErrorMessage(); errorMessage.setStatus(httpStatus.toString()); errorMessage.setMessage(exception.getMessage()); errorMessage.setDetails(exception instanceof DmiException ? ((DmiException) exception).getDetails() : 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 94783f3b..a2a01ebd 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 @@ -47,11 +47,11 @@ public class NcmpRestClient { * @return the response entity */ public ResponseEntity<String> registerCmHandlesWithNcmp(final String jsonData) { - final var ncmpRegistrationUrl = buildNcmpRegistrationUrl(); - final var httpHeaders = new HttpHeaders(); + final String ncmpRegistrationUrl = buildNcmpRegistrationUrl(); + final HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.setBasicAuth(cpsProperties.getAuthUsername(), cpsProperties.getAuthPassword()); httpHeaders.set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); - final var httpEntity = new HttpEntity<>(jsonData, httpHeaders); + final HttpEntity httpEntity = new HttpEntity<>(jsonData, httpHeaders); return restTemplate.exchange(ncmpRegistrationUrl, HttpMethod.POST, httpEntity, String.class); } diff --git a/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/service/operation/SdncOperations.java b/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/service/operation/SdncOperations.java index fd94e634..1484366f 100644 --- a/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/service/operation/SdncOperations.java +++ b/dmi-service/src/main/java/org/onap/cps/ncmp/dmi/service/operation/SdncOperations.java @@ -234,7 +234,7 @@ public class SdncOperations { private List<ModuleSchema> convertToModuleSchemas(final String modulesListAsJson) { try { return JsonPath.using(jsonPathConfiguration).parse(modulesListAsJson).read( - PATH_TO_MODULE_SCHEMAS, new TypeRef<>() { + PATH_TO_MODULE_SCHEMAS, new TypeRef<List<ModuleSchema>>() { }); } catch (final JsonPathException jsonPathException) { throw new SdncException("SDNC Response processing failed", diff --git a/dmi-stub/dmi-plugin-demo-and-csit-stub-app/pom.xml b/dmi-stub/dmi-plugin-demo-and-csit-stub-app/pom.xml index 4da597ba..830736b3 100644 --- a/dmi-stub/dmi-plugin-demo-and-csit-stub-app/pom.xml +++ b/dmi-stub/dmi-plugin-demo-and-csit-stub-app/pom.xml @@ -19,6 +19,7 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> + <parent> <groupId>org.onap.cps</groupId> <artifactId>dmi-plugin-demo-and-csit-stub</artifactId> @@ -27,6 +28,10 @@ <artifactId>dmi-plugin-demo-and-csit-stub-app</artifactId> + <properties> + <app>org.onap.cps.ncmp.dmi.rest.stub.DmiDemoApplication</app> + </properties> + <dependencies> <dependency> <groupId>org.springframework.boot</groupId> @@ -58,4 +63,67 @@ </exclusions> </dependency> </dependencies> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>com.google.cloud.tools</groupId> + <artifactId>jib-maven-plugin</artifactId> + <configuration> + <container> + <mainClass>${app}</mainClass> + <creationTime>USE_CURRENT_TIMESTAMP</creationTime> + </container> + <from> + <image>${base.image}</image> + </from> + <to> + <tags> + <tag>latest</tag> + </tags> + <image>${docker.push.registry}/onap/${image.name}:${image.tag}</image> + </to> + </configuration> + <executions> + <execution> + <phase>package</phase> + <id>build</id> + <goals> + <goal>dockerBuild</goal> + </goals> + </execution> + <execution> + <phase>deploy</phase> + <id>buildAndPush</id> + <goals> + <goal>build</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </pluginManagement> + </build> + + <profiles> + <profile> + <id>docker</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <properties> + <image.name>dmi-plugin-demo-and-csit-stub</image.name> + </properties> + <build> + <plugins> + <plugin> + <groupId>com.google.cloud.tools</groupId> + <artifactId>jib-maven-plugin</artifactId> + <version>3.3.2</version> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project>
\ No newline at end of file diff --git a/dmi-stub/dmi-plugin-demo-and-csit-stub-service/pom.xml b/dmi-stub/dmi-plugin-demo-and-csit-stub-service/pom.xml index 5e2886e5..82ebd24f 100644 --- a/dmi-stub/dmi-plugin-demo-and-csit-stub-service/pom.xml +++ b/dmi-stub/dmi-plugin-demo-and-csit-stub-service/pom.xml @@ -19,6 +19,7 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> + <parent> <groupId>org.onap.cps</groupId> <artifactId>dmi-plugin-demo-and-csit-stub</artifactId> @@ -27,6 +28,13 @@ <artifactId>dmi-plugin-demo-and-csit-stub-service</artifactId> + <properties> + <gmavenplus.plugin.version>4.0.1</gmavenplus.plugin.version> + <maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version> + <maven.compiler.source>17</maven.compiler.source> + <maven.compiler.target>17</maven.compiler.target> + </properties> + <dependencies> <dependency> <groupId>ch.qos.logback</groupId> @@ -91,7 +99,7 @@ <dependency> <groupId>org.onap.cps</groupId> <artifactId>cps-ncmp-events</artifactId> - <version>3.5.2</version> + <version>${cps.version}</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -133,9 +141,19 @@ <build> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.plugin.version}</version> + <configuration> + <encoding>${project.build.sourceEncoding}</encoding> + <source>17</source> + <target>17</target> + </configuration> + </plugin> + <plugin> <groupId>org.codehaus.gmavenplus</groupId> <artifactId>gmavenplus-plugin</artifactId> - <version>4.0.1</version> + <version>${gmavenplus.plugin.version}</version> <executions> <execution> <goals> diff --git a/dmi-stub/pom.xml b/dmi-stub/pom.xml index 64df918e..fdd01089 100644 --- a/dmi-stub/pom.xml +++ b/dmi-stub/pom.xml @@ -19,6 +19,7 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> + <parent> <groupId>org.onap.cps</groupId> <artifactId>ncmp-dmi-plugin</artifactId> @@ -31,22 +32,24 @@ <properties> - <sonar.skip>true</sonar.skip> + <checkstyle.config.location>../</checkstyle.config.location> <jacoco.skip>true</jacoco.skip> <java.version>17</java.version> <maven.compiler.release>17</maven.compiler.release> + <sonar.skip>true</sonar.skip> </properties> <modules> <module>dmi-plugin-demo-and-csit-stub-service</module> <module>dmi-plugin-demo-and-csit-stub-app</module> </modules> + <dependencyManagement> <dependencies> <dependency> <groupId>org.onap.cps</groupId> <artifactId>cps-dependencies</artifactId> - <version>3.5.1</version> + <version>${cps.version}</version> <type>pom</type> <scope>import</scope> </dependency> @@ -24,17 +24,13 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.oparent</groupId> - <artifactId>oparent</artifactId> - <version>3.3.0</version> - <relativePath/> - </parent> + <packaging>pom</packaging> <organization> <name>ONAP - CPS</name> <url>http://www.onap.org/</url> </organization> + <modules> <module>dmi-service</module> <module>dmi-stub</module> @@ -46,55 +42,86 @@ <description>DMI Plugin Service</description> <properties> - <cps.version>3.5.2</cps.version> + <!-- Set UTF-8 encoding for consistent builds across platforms --> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + + <!-- Application and Docker Configuration --> <app>org.onap.cps.ncmp.dmi.Application</app> <base.image>${docker.pull.registry}/onap/integration-java17:12.0.0</base.image> + <image.name>ncmp-dmi-plugin</image.name> <image.tag>${project.version}-${maven.build.timestamp}</image.tag> + + <!-- Project Versioning and Timestamp --> + <cps.version>3.5.5-SNAPSHOT</cps.version> <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <image.name>ncmp-dmi-plugin</image.name> + + <!-- Code Quality and Dependency Management --> + <checkstyle.config.location>${project.basedir}</checkstyle.config.location> + <maven.checkstyle.plugin.version>3.3.1</maven.checkstyle.plugin.version> + <maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version> + <maven.compiler.source>17</maven.compiler.source> + <maven.compiler.target>17</maven.compiler.target> + <maven.dependency.plugin.version>3.7.1</maven.dependency.plugin.version> + <maven.deploy.plugin.version>3.1.2</maven.deploy.plugin.version> + + <!-- ONAP Nexus Repository Configuration --> + <onap.nexus.url>https://nexus.onap.org</onap.nexus.url> + <nexusproxy>https://nexus.onap.org</nexusproxy> + <releaseNexusPath>/content/repositories/releases/</releaseNexusPath> + <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath> </properties> <build> <plugins> - <!-- Add the Maven Checkstyle Plugin here --> + <!-- Maven Dependency Plugin for unpacking resources only in the root module --> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-checkstyle-plugin</artifactId> + <artifactId>maven-dependency-plugin</artifactId> + <version>${maven.dependency.plugin.version}</version> <executions> <execution> - <id>onap-license</id> + <id>unpack-checkstyle-config</id> + <phase>initialize</phase> <goals> - <goal>check</goal> + <goal>unpack</goal> </goals> - <phase>process-sources</phase> <configuration> - <configLocation>onap-checkstyle/check-license.xml</configLocation> - <includeResources>false</includeResources> - <includeTestSourceDirectory>true</includeTestSourceDirectory> - <includeTestResources>false</includeTestResources> - <sourceDirectories> - <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> - </sourceDirectories> - <consoleOutput>false</consoleOutput> - <violationSeverity>warning</violationSeverity> - <failOnViolation>true</failOnViolation> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>checkstyle</artifactId> + <version>${cps.version}</version> + <type>jar</type> + <overWrite>true</overWrite> + <outputDirectory>${project.basedir}/checkstyle</outputDirectory> + <includes>cps-checkstyle/**</includes> + </artifactItem> + </artifactItems> </configuration> + <inherited>false</inherited> </execution> + </executions> + </plugin> + <!-- Maven Checkstyle Plugin --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>${maven.checkstyle.plugin.version}</version> + <executions> <execution> - <id>onap-java-style</id> + <id>onap-license</id> <goals> <goal>check</goal> </goals> <phase>process-sources</phase> <configuration> - <configLocation>onap-checkstyle/onap-java-style.xml</configLocation> + <configLocation>${checkstyle.config.location}/checkstyle/cps-checkstyle/check-license.xml</configLocation> + <includeResources>true</includeResources> + <includeTestSourceDirectory>true</includeTestSourceDirectory> + <includeTestResources>false</includeTestResources> <sourceDirectories> <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> </sourceDirectories> - <includeResources>true</includeResources> - <includeTestSourceDirectory>true</includeTestSourceDirectory> - <includeTestResources>true</includeTestResources> <consoleOutput>false</consoleOutput> <violationSeverity>warning</violationSeverity> <failOnViolation>true</failOnViolation> @@ -107,14 +134,14 @@ </goals> <phase>process-sources</phase> <configuration> - <configLocation>cps-java-style.xml</configLocation> + <configLocation>${checkstyle.config.location}/checkstyle/cps-checkstyle/cps-java-style.xml</configLocation> <sourceDirectories> <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory> </sourceDirectories> <includeResources>true</includeResources> <includeTestSourceDirectory>true</includeTestSourceDirectory> <includeTestResources>true</includeTestResources> - <consoleOutput>true</consoleOutput> + <consoleOutput>false</consoleOutput> <violationSeverity>warning</violationSeverity> <failOnViolation>true</failOnViolation> </configuration> @@ -128,66 +155,40 @@ </dependency> </dependencies> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <version>${maven.deploy.plugin.version}</version> + </plugin> </plugins> <pluginManagement> <plugins> <plugin> - <groupId>com.google.cloud.tools</groupId> - <artifactId>jib-maven-plugin</artifactId> - <version>3.3.2</version> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.plugin.version}</version> <configuration> - <container> - <mainClass>${app}</mainClass> - <creationTime>USE_CURRENT_TIMESTAMP</creationTime> - </container> - <from> - <image>${base.image}</image> - </from> - <to> - <tags> - <tag>latest</tag> - <tag>${project.version}-latest</tag> - </tags> - <image>${docker.push.registry}/onap/${image.name}:${image.tag}</image> - </to> + <encoding>${project.build.sourceEncoding}</encoding> + <source>17</source> + <target>17</target> </configuration> - <executions> - <execution> - <phase>package</phase> - <id>build</id> - <goals> - <goal>dockerBuild</goal> - </goals> - </execution> - <execution> - <phase>deploy</phase> - <id>buildAndPush</id> - <goals> - <goal>build</goal> - </goals> - </execution> - </executions> </plugin> </plugins> </pluginManagement> </build> - <profiles> - <profile> - <id>docker</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <build> - <plugins> - <plugin> - <groupId>com.google.cloud.tools</groupId> - <artifactId>jib-maven-plugin</artifactId> - </plugin> - </plugins> - </build> - </profile> - </profiles> + <distributionManagement> + <repository> + <id>ecomp-releases</id> + <name>ECOMP Release Repository</name> + <url>${onap.nexus.url}${releaseNexusPath}</url> + </repository> + <snapshotRepository> + <id>ecomp-snapshots</id> + <name>ECOMP Snapshot Repository</name> + <url>${onap.nexus.url}${snapshotNexusPath}</url> + </snapshotRepository> + </distributionManagement> </project> |