Update CPS dependencies as Required for Honolulu release
[cps.git] / cps-parent / pom.xml
old mode 100644 (file)
new mode 100755 (executable)
index d3470df..ecc9898
@@ -1,11 +1,30 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (c) 2021 Pantheon.tech.
+  Modifications Copyright (C) 2021 Bell Canada.
+  ================================================================================
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  ============LICENSE_END=========================================================
+-->
+
 <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <groupId>org.onap.oparent</groupId>
         <artifactId>oparent</artifactId>
-        <version>3.1.0</version>
+        <version>3.2.0</version>
         <relativePath/>
     </parent>
     <modelVersion>4.0.0</modelVersion>
         <app>org.onap.cps.Application</app>
         <base.image>openjdk:11-jre-slim</base.image>
         <java.version>11</java.version>
-        <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
-        <minimum-coverage>0.44</minimum-coverage>
+        <minimum-coverage>0.9</minimum-coverage>
         <nexusproxy>https://nexus.onap.org</nexusproxy>
         <oparent.version>3.1.0</oparent.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
-        <repository.name>nexus3.onap.org:10001/onap/cps-service</repository.name>
         <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
         <spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
         <spotbugs.slf4j.version>1.8.0-beta4</spotbugs.slf4j.version>
         <spotbugs.version>4.2.0</spotbugs.version>
         <swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
         <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
-        <tag.version>${project.version}</tag.version>
+
+        <jacoco.reportDirectory.aggregate>${project.reporting.outputDirectory}/jacoco-aggregate</jacoco.reportDirectory.aggregate>
+        <sonar.coverage.jacoco.xmlReportPaths>
+            ../cps-ri/target/site/jacoco-ut/jacoco.xml,
+            ../cps-ri/target/site/jacoco-aggregate/jacoco.xml,
+            ../cps-service/target/site/jacoco-ut/jacoco.xml,
+            ../cps-service/target/site/jacoco-aggregate/jacoco.xml,
+            ../cps-rest/target/site/jacoco-ut/jacoco.xml,
+            ../cps-rest/target/site/jacoco-aggregate/jacoco.xml,
+            ../cps-nf-proxy-rest/target/site/jacoco-ut/jacoco.xml,
+            ../cps-nf-proxy-rest/target/site/jacoco-aggregate/jacoco.xml,
+            ../cps-application/target/site/jacoco-ut/jacoco.xml,
+            ../cps-application/target/site/jacoco-aggregate/jacoco.xml
+        </sonar.coverage.jacoco.xmlReportPaths>
     </properties>
 
     <distributionManagement>
         </snapshotRepository>
     </distributionManagement>
 
-    <profiles>
-        <profile>
-            <id>docker</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-            </activation>
-            <build>
-                <pluginManagement>
-                    <plugins>
-                        <plugin>
-                            <groupId>com.google.cloud.tools</groupId>
-                            <artifactId>jib-maven-plugin</artifactId>
-                            <version>${jib-maven-plugin.version}</version>
-                            <configuration>
-                                <container>
-                                    <mainClass>${app}</mainClass>
-                                    <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
-                                </container>
-                                <from>
-                                    <image>${base.image}</image>
-                                </from>
-                                <to>
-                                    <image>${repository.name}</image>
-                                    <tags>
-                                        <tag>${tag.version}</tag>
-                                    </tags>
-                                </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>
-        </profile>
-    </profiles>
-
     <dependencyManagement>
         <dependencies>
             <dependency>
                     <groupId>io.swagger.codegen.v3</groupId>
                     <artifactId>swagger-codegen-maven-plugin</artifactId>
                     <version>${swagger-codegen-maven-plugin.version}</version>
-                    <executions>
-                        <execution>
-                            <goals>
-                                <goal>generate</goal>
-                            </goals>
-                            <configuration>
-                                <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
-                                <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
-                                <modelPackage>org.onap.cps.rest.model</modelPackage>
-                                <apiPackage>org.onap.cps.rest.api</apiPackage>
-                                <language>spring</language>
-                                <generateSupportingFiles>false</generateSupportingFiles>
-                                <configOptions>
-                                    <sourceFolder>src/gen/java</sourceFolder>
-                                    <dateLibrary>java11</dateLibrary>
-                                    <interfaceOnly>true</interfaceOnly>
-                                    <useTags>true</useTags>
-                                </configOptions>
-                            </configuration>
-                        </execution>
-                    </executions>
-                </plugin>
-                <plugin>
-                    <groupId>com.google.cloud.tools</groupId>
-                    <artifactId>jib-maven-plugin</artifactId>
-                    <version>${jib-maven-plugin.version}</version>
-                    <configuration>
-                        <container>
-                            <mainClass>${app}</mainClass>
-                            <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
-                        </container>
-                        <from>
-                            <image>${base.image}</image>
-                        </from>
-                        <to>
-                            <image>${repository.name}</image>
-                            <tags>
-                                <tag>${tag.version}</tag>
-                            </tags>
-                        </to>
-                    </configuration>
                 </plugin>
                 <plugin>
                     <groupId>com.github.spotbugs</groupId>
                         <!-- Reports all bugs (other values are medium and max) -->
                         <threshold>Low</threshold>
                         <!-- Build doesn't fail if problems are found -->
-                        <failOnError>false</failOnError>
+                        <failOnError>true</failOnError>
                         <!-- References the excluded rules -->
                         <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
                         <!-- Produces XML report -->
                             </rules>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>report</id>
+                        <goals>
+                            <goal>report-aggregate</goal>
+                        </goals>
+                        <phase>verify</phase>
+                        <configuration>
+                            <dataFileIncludes>
+                                <fileInclude>**/code-coverage/jacoco-ut.exec</fileInclude>
+                            </dataFileIncludes>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>
             <plugin>
                 <groupId>com.github.spotbugs</groupId>
                 <artifactId>spotbugs-maven-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.sonarsource.scanner.maven</groupId>
+                <artifactId>sonar-maven-plugin</artifactId>
+            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file