Fix: Run both sonar and clm scans in parallel
[ccsdk/cds.git] / pom.xml
diff --git a/pom.xml b/pom.xml
index 73a8e1b..476de6f 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -21,17 +21,17 @@ limitations under the License.
 
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
-        <artifactId>spring-boot-starter-parent</artifactId>
-        <version>1.5.1</version>
+        <artifactId>spring-boot-27-starter-parent</artifactId>
+        <version>2.6.1</version>
         <relativePath/>
     </parent>
 
     <groupId>org.onap.ccsdk.cds</groupId>
-    <artifactId>parent</artifactId>
-    <version>0.7.0-SNAPSHOT</version>
+    <artifactId>cds-aggregator</artifactId>
+    <version>1.6.0-SNAPSHOT</version>
     <packaging>pom</packaging>
 
-    <name>CDS Parent</name>
+    <name>Aggregator</name>
     <description>CCSDK Controller Design Studio</description>
     <url>https://wiki.onap.org</url>
     <organization>
@@ -55,98 +55,278 @@ limitations under the License.
         <sonar.inclusions>**/*.java,**/*.kt</sonar.inclusions>
         <!--Specify path to load jacoco XLM report, as Sonar can't load Kotlin coverage from binary report-->
         <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
-        <jacoco.version>0.8.3</jacoco.version>
+        <jacoco.version>0.8.7</jacoco.version>
 
         <!-- Properties for POM Format -->
         <format.skipValidate>false</format.skipValidate>
         <format.skipExecute>true</format.skipExecute>
+
+        <java.version>11</java.version>
+        <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
+        <maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>
+
+        <!-- docker related properties -->
+        <assembly.id>maven</assembly.id>
+        <docker.verbose>true</docker.verbose>
+        <docker.skip.push>false</docker.skip.push>
+        <name.space>org.onap.ccsdk.cds</name.space>
+        <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
+        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+
+        <ccsdk.sli.version>1.5.2</ccsdk.sli.version>
+        <ccsdk.cds.version>${project.version}</ccsdk.cds.version>
+
+        <kotlin.version>1.7.0</kotlin.version>
+        <kotlin.maven.version>1.6.21</kotlin.maven.version>
+        <kotlin.couroutines.version>1.6.4</kotlin.couroutines.version>
+        <kotlinpoet.version>1.11.0</kotlinpoet.version>
+        <apache.httpcomponents.client.version>4.5.13</apache.httpcomponents.client.version>
+
+        <grpc.version>1.29.0</grpc.version>
+        <netty-ssl>2.0.50.Final</netty-ssl>
+        <protobuff.java.version>3.10.0</protobuff.java.version>
+        <protobuff.java.utils.version>3.16.3</protobuff.java.utils.version>
+        <mockk.version>1.12.8</mockk.version>
+
     </properties>
 
     <build>
+        <pluginManagement>
+            <plugins>
+                <!-- Plugin to Format/Validate POM Files -->
+                <plugin>
+                    <groupId>org.codehaus.mojo</groupId>
+                    <artifactId>tidy-maven-plugin</artifactId>
+                    <version>1.1.0</version>
+                    <configuration>
+                        <lineLength>120</lineLength>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <id>format-pom</id>
+                            <phase>process-sources</phase>
+                            <goals>
+                                <goal>pom</goal>
+                            </goals>
+                            <configuration>
+                                <skip>${format.skipExecute}</skip>
+                            </configuration>
+                        </execution>
+                        <execution>
+                            <id>validate-pom</id>
+                            <phase>validate</phase>
+                            <goals>
+                                <goal>check</goal>
+                            </goals>
+                            <configuration>
+                                <skip>${format.skipValidate}</skip>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <!-- Plugin to Format/Validate Kotlin Files -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-antrun-plugin</artifactId>
+                    <version>${maven-antrun-plugin.version}</version>
+                    <executions>
+                        <execution>
+                            <id>validate-kotlin</id>
+                            <phase>validate</phase>
+                            <configuration>
+                                <target name="ktlint">
+                                    <java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true" classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
+                                        <arg value="src/**/*.kt"/>
+                                        <arg value="Scripts/**/*.kt"/>
+                                    </java>
+                                </target>
+                                <skip>${format.skipValidate}</skip>
+                            </configuration>
+                            <goals>
+                                <goal>run</goal>
+                            </goals>
+                        </execution>
+                        <execution>
+                            <id>format-kotlin</id>
+                            <phase>process-sources</phase>
+                            <configuration>
+                                <target name="ktlint">
+                                    <java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true" classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
+                                        <arg value="-F"/>
+                                        <arg value="src/**/*.kt"/>
+                                        <arg value="Scripts/**/*.kt"/>
+                                    </java>
+                                </target>
+                                <skip>${format.skipExecute}</skip>
+                            </configuration>
+                            <goals>
+                                <goal>run</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                    <dependencies>
+                        <dependency>
+                            <groupId>com.pinterest</groupId>
+                            <artifactId>ktlint</artifactId>
+                            <version>0.39.0</version>
+                        </dependency>
+                    </dependencies>
+                </plugin>
+
+                <!-- Plugin to identify root path of the project -->
+                <plugin>
+                    <groupId>org.commonjava.maven.plugins</groupId>
+                    <artifactId>directory-maven-plugin</artifactId>
+                    <version>1.0</version>
+                    <executions>
+                        <execution>
+                            <phase>validate</phase>
+                            <id>directories</id>
+                            <goals>
+                                <goal>highest-basedir</goal>
+                            </goals>
+                            <configuration>
+                                <property>baseDirPath</property>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+
+                <!-- Plugin to Format/Validate Java Classes -->
+                <plugin>
+                    <groupId>net.revelc.code.formatter</groupId>
+                    <artifactId>formatter-maven-plugin</artifactId>
+                    <version>2.17.1</version>
+                    <executions>
+                        <execution>
+                            <id>format-java</id>
+                            <goals>
+                                <goal>format</goal>
+                            </goals>
+                            <phase>process-sources</phase>
+                            <configuration>
+                                <lineEnding>LF</lineEnding>
+                                <skip>${format.skipExecute}</skip>
+                                <sourceDirectory>${project.basedir}</sourceDirectory>
+                                <configFile>${baseDirPath}/ONAP-Java-Code-Style.xml</configFile>
+                                <includes>
+                                    <include>src/**/*.java</include>
+                                </includes>
+                            </configuration>
+                        </execution>
+                        <execution>
+                            <id>validate-java</id>
+                            <goals>
+                                <goal>validate</goal>
+                            </goals>
+                            <phase>validate</phase>
+                            <configuration>
+                                <lineEnding>LF</lineEnding>
+                                <skip>${format.skipValidate}</skip>
+                                <sourceDirectory>${project.basedir}</sourceDirectory>
+                                <configFile>${baseDirPath}/ONAP-Java-Code-Style.xml</configFile>
+                                <includes>
+                                    <include>src/**/*.java</include>
+                                </includes>
+                            </configuration>
+                        </execution>
+                    </executions>
+                    <dependencies>
+                        <dependency>
+                            <groupId>com.fasterxml.jackson.core</groupId>
+                            <artifactId>jackson-annotations</artifactId>
+                            <version>${jackson-bom.version}</version>
+                        </dependency>
+                    </dependencies>
+                </plugin>
+
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>${maven-surefire-plugin.version}</version>
+                    <configuration>
+                        <!-- Sets the VM argument line used when unit tests are run. -->
+                        <argLine>${surefireArgLine}</argLine>
+                        <!-- Excludes integration tests when unit tests are run. -->
+                        <excludes>
+                            <exclude>**/IT*.java</exclude>
+                        </excludes>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-failsafe-plugin</artifactId>
+                    <version>${maven-failsafe-plugin.version}</version>
+                    <executions>
+                        <!-- Ensures that both integration-test and verify goals of the Failsafe Maven plugin are executed. -->
+                        <execution>
+                            <id>integration-tests</id>
+                            <goals>
+                                <goal>integration-test</goal>
+                                <goal>verify</goal>
+                            </goals>
+                            <configuration>
+                                <!-- Sets the VM argument line used when integration tests are run. -->
+                                <argLine>${failsafeArgLine}</argLine>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>org.jetbrains.kotlin</groupId>
+                    <artifactId>kotlin-maven-plugin</artifactId>
+                    <version>${kotlin.maven.version}</version>
+                    <configuration>
+                        <jvmTarget>${java.version}</jvmTarget>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>${maven-compiler-plugin.version}</version>
+                    <configuration>
+                        <release>${java.version}</release>
+                        <!--explicitly remove source and target-->
+                        <source combine.self="override"/>
+                        <target combine.self="override"/>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
         <plugins>
             <plugin>
                 <groupId>org.jacoco</groupId>
                 <artifactId>jacoco-maven-plugin</artifactId>
                 <version>${jacoco.version}</version>
             </plugin>
-
-            <!-- Plugin to Format/Validate POM Files -->
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>tidy-maven-plugin</artifactId>
-                <version>1.1.0</version>
-                <executions>
-                    <execution>
-                        <id>format-pom</id>
-                        <phase>process-sources</phase>
-                        <goals>
-                            <goal>pom</goal>
-                        </goals>
-                        <configuration>
-                            <skip>${format.skipExecute}</skip>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>validate-pom</id>
-                        <phase>validate</phase>
-                        <goals>
-                            <goal>check</goal>
-                        </goals>
-                        <configuration>
-                            <skip>${format.skipValidate}</skip>
-                        </configuration>
-                    </execution>
-                </executions>
             </plugin>
-
-            <!-- Plugin to Format/Validate Kotlin Files -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
-                <version>1.7</version>
-                <executions>
-                    <execution>
-                        <id>validate-kotlin</id>
-                        <phase>validate</phase>
-                        <configuration>
-                            <target name="ktlint">
-                                <java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true"
-                                      classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
-                                    <arg value="src/**/*.kt"/>
-                                </java>
-                            </target>
-                            <skip>${format.skipValidate}</skip>
-                        </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <!-- Built-in formatter So that you wouldn't have to fix all style violations by hand.-->
-                        <id>format-kotlin</id>
-                        <phase>process-sources</phase>
-                        <configuration>
-                            <target name="ktlint">
-                                <java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true"
-                                      classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
-                                    <arg value="-F"/>
-                                    <arg value="src/**/*.kt"/>
-                                </java>
-                            </target>
-                            <skip>${format.skipExecute}</skip>
-                        </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <dependencies>
-                    <dependency>
-                        <groupId>com.pinterest</groupId>
-                        <artifactId>ktlint</artifactId>
-                        <version>0.35.0</version>
-                    </dependency>
-                </dependencies>
+            </plugin>
+            <plugin>
+                <groupId>org.commonjava.maven.plugins</groupId>
+                <artifactId>directory-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>net.revelc.code.formatter</groupId>
+                <artifactId>formatter-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-failsafe-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
             </plugin>
         </plugins>
     </build>