Add a profile that enables findbugs checks at build time. Use -Penablefindbugs to enable findbugs.

Add a bit of reporting configuration so the mvn site target includes javadoc and a findbugs report
This commit is contained in:
Hugo Trippaers 2014-01-23 09:03:22 +01:00
parent d19157fbb1
commit 9d735dd288

75
pom.xml
View File

@ -469,6 +469,19 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<executions>
<execution>
<id>cloudstack-findbugs</id>
<phase>none</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
@ -577,6 +590,15 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<configuration>
<port>9000</port>
<tempWebappDirectory>${basedir}/target/site/tempdir</tempWebappDirectory>
</configuration>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings only.
It has no influence on the Maven build itself. -->
<plugin>
@ -840,9 +862,44 @@
</formats>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<effort>Max</effort>
<threshold>High</threshold>
<xmlOutput>true</xmlOutput>
<failOnError>false</failOnError>
</configuration>
<executions>
<execution>
<id>cloudstack-findbugs</id>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<threshold>Low</threshold><!-- High|Normal|Low|Exp|Ignore -->
<effort>Default</effort><!-- Min|Default|Max -->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>awsapi</id>
@ -916,5 +973,23 @@
</plugins>
</build>
</profile>
<profile>
<id>enablefindbugs</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<executions>
<execution>
<id>cloudstack-findbugs</id>
<phase>process-classes</phase>
<inherited>true</inherited>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>