aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pom.xml142
1 files changed, 141 insertions, 1 deletions
diff --git a/pom.xml b/pom.xml
index e9a68a5..49dce9f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,6 +37,12 @@
<properties>
<java.version>11</java.version>
<minimum-coverage>0.8</minimum-coverage>
+ <cps.checkstyle.version>1.0.1</cps.checkstyle.version>
+ <cps.spotbugs.version>1.0.1</cps.spotbugs.version>
+ <oparent.version>3.2.0</oparent.version>
+ <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
+ <spotbugs.slf4j.version>1.8.0-beta4</spotbugs.slf4j.version>
+ <spotbugs.version>4.2.0</spotbugs.version>
</properties>
<dependencyManagement>
@@ -142,6 +148,141 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>onap-license</id>
+ <goals>
+ <goal>check</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>
+ </configuration>
+ </execution>
+ <execution>
+ <id>onap-java-style</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>process-sources</phase>
+ <configuration>
+ <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
+ <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>
+ </configuration>
+ </execution>
+ <execution>
+ <id>cps-java-style</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>process-sources</phase>
+ <configuration>
+ <configLocation>cps-java-style.xml</configLocation>
+ <sourceDirectories>
+ <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ </sourceDirectories>
+ <includeResources>true</includeResources>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <includeTestResources>true</includeTestResources>
+ <consoleOutput>true</consoleOutput>
+ <violationSeverity>warning</violationSeverity>
+ <failOnViolation>true</failOnViolation>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.oparent</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>${oparent.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.cps</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>${cps.checkstyle.version}</version>
+ </dependency>
+ </dependencies>
+ </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>org.onap.cps</groupId>
+ <artifactId>spotbugs</artifactId>
+ <version>${cps.spotbugs.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>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!--suppress UnresolvedMavenProperty -->
@@ -206,5 +347,4 @@
</plugin>
</plugins>
</build>
-
</project>