<app>org.onap.cps.Application</app>
<base.image>openjdk:11-jre-slim</base.image>
<java.version>11</java.version>
- <jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>
<jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
- <minimum-coverage>0.15</minimum-coverage>
+ <minimum-coverage>0.76</minimum-coverage>
<nexusproxy>https://nexus.onap.org</nexusproxy>
- <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
<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.bug-pattern.version>1.5.0</spotbugs.bug-pattern.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>
- <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
<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,
+ </sonar.coverage.jacoco.xmlReportPaths>
</properties>
<distributionManagement>
</to>
</configuration>
</plugin>
+ <plugin>
+ <groupId>com.github.spotbugs</groupId>
+ <artifactId>spotbugs-maven-plugin</artifactId>
+ <version>${spotbugs-maven-plugin.version}</version>
+ <dependencies>
+ <dependency>
+ <groupId>com.github.spotbugs</groupId>
+ <artifactId>spotbugs</artifactId>
+ <version>${spotbugs.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>spotbugs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <!-- The SpotBugs Maven plugin uses SLF4J 1.8 beta 2 -->
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>${spotbugs.slf4j.version}</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <plugins>
+ <plugin>
+ <groupId>jp.skypencil.findbugs.slf4j</groupId>
+ <artifactId>bug-pattern</artifactId>
+ <version>1.5.0</version>
+ </plugin>
+ </plugins>
+ <!--
+ Enables analysis which takes more memory but finds more bugs.
+ If you run out of memory, changes the value of the effort element
+ to 'Low'.
+ -->
+ <effort>Max</effort>
+ <!-- Reports all bugs (other values are medium and max) -->
+ <threshold>Low</threshold>
+ <!-- Build doesn't fail if problems are found -->
+ <failOnError>true</failOnError>
+ <!-- References the excluded rules -->
+ <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
+ <!-- Produces XML report -->
+ <xmlOutput>true</xmlOutput>
+ <!-- Configures the directory in which the XML report is created -->
+ <xmlOutputDirectory>${project.build.directory}/spotbugs</xmlOutputDirectory>
+ </configuration>
+ <executions>
+ <!--
+ Ensures that SpotBugs inspects source code when project is compiled.
+ -->
+ <execution>
+ <id>analyze-compile</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>3.0.0-M5</version>
<configuration>
- <argLine>@{argLine}</argLine>
+ <!--suppress UnresolvedMavenProperty -->
+ <argLine>${surefireArgLine}</argLine>
<useFile>false</useFile>
<includes>
<include>**/*Spec.java</include>
<include>**/*Test.java</include> <!-- Just in case of having also "normal" JUnit tests -->
</includes>
+ <excludes>
+ <exclude>**/IT*.java</exclude>
+ </excludes>
+ <environmentVariables>
+ <!--
+ disable privileged container usage to cleanup the test containers;
+ these will be removed automatically on jvm termination;
+ see https://www.testcontainers.org/features/configuration/#disabling-ryuk
+ -->
+ <TESTCONTAINERS_RYUK_DISABLED>true</TESTCONTAINERS_RYUK_DISABLED>
+ </environmentVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goal>check</goal>
</goals>
<configuration>
+ <excludes>
+ <exclude>org/onap/cps/rest/model/*</exclude>
+ </excludes>
+ <dataFile>${project.build.directory}/code-coverage/jacoco-ut.exec</dataFile>
<rules>
<rule>
<element>BUNDLE</element>
</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