HDDS-2149. Replace findbugs with spotbugs
Signed-off-by: Anu Engineer <aengineer@apache.org>
This commit is contained in:
parent
0371e953ac
commit
9bf7a6e5b2
@ -274,8 +274,8 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
|
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -55,9 +55,8 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
<version>1.16</version>
|
<version>1.16</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs</artifactId>
|
<artifactId>spotbugs</artifactId>
|
||||||
<version>3.0.1</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@ -93,8 +92,8 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
|
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -195,13 +195,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
<version>${junit.jupiter.version}</version>
|
<version>${junit.jupiter.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
|
||||||
<artifactId>findbugs</artifactId>
|
|
||||||
<version>3.0.1</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -307,14 +300,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
</excludes>
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
|
||||||
<version>3.0.4</version>
|
|
||||||
<configuration>
|
|
||||||
<excludeFilterFile combine.self="override"></excludeFilterFile>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
@ -101,8 +101,8 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
<artifactId>bcprov-jdk15on</artifactId>
|
<artifactId>bcprov-jdk15on</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs</artifactId>
|
<artifactId>spotbugs</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -154,8 +154,8 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
|
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -176,8 +176,8 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
|
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
|
||||||
</excludeFilterFile>
|
</excludeFilterFile>
|
||||||
|
@ -16,7 +16,12 @@
|
|||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
cd "$DIR/../../.." || exit 1
|
cd "$DIR/../../.." || exit 1
|
||||||
|
|
||||||
mvn -B compile -fn findbugs:check -Dfindbugs.failOnError=false -f pom.ozone.xml
|
if ! type unionBugs >/dev/null 2>&1 || ! type convertXmlToText >/dev/null 2>&1; then
|
||||||
|
mvn -B -fae compile spotbugs:check -f pom.ozone.xml
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
mvn -B -fae compile spotbugs:spotbugs -f pom.ozone.xml
|
||||||
|
|
||||||
REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/findbugs"}
|
REPORT_DIR=${OUTPUT_DIR:-"$DIR/../../../target/findbugs"}
|
||||||
mkdir -p "$REPORT_DIR"
|
mkdir -p "$REPORT_DIR"
|
||||||
@ -24,8 +29,9 @@ REPORT_FILE="$REPORT_DIR/summary.txt"
|
|||||||
|
|
||||||
touch "$REPORT_FILE"
|
touch "$REPORT_FILE"
|
||||||
|
|
||||||
find hadoop-ozone -name findbugsXml.xml -print0 | xargs -0 -n1 convertXmlToText | tee -a "${REPORT_FILE}"
|
find hadoop-hdds hadoop-ozone -name spotbugsXml.xml -print0 | xargs -0 unionBugs -output "${REPORT_DIR}"/summary.xml
|
||||||
find hadoop-hdds -name findbugsXml.xml -print0 | xargs -0 -n1 convertXmlToText | tee -a "${REPORT_FILE}"
|
convertXmlToText "${REPORT_DIR}"/summary.xml | tee -a "${REPORT_FILE}"
|
||||||
|
convertXmlToText -html:fancy-hist.xsl "${REPORT_DIR}"/summary.xml "${REPORT_DIR}"/summary.html
|
||||||
|
|
||||||
wc -l "$REPORT_FILE" | awk '{print $1}'> "$REPORT_DIR/failures"
|
wc -l "$REPORT_FILE" | awk '{print $1}'> "$REPORT_DIR/failures"
|
||||||
|
|
||||||
|
@ -92,9 +92,8 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
<version>1.19</version>
|
<version>1.19</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs</artifactId>
|
<artifactId>spotbugs</artifactId>
|
||||||
<version>3.0.1</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -118,8 +117,8 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
|
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
|
||||||
</excludeFilterFile>
|
</excludeFilterFile>
|
||||||
|
@ -57,9 +57,8 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs</artifactId>
|
<artifactId>spotbugs</artifactId>
|
||||||
<version>3.0.1</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -58,8 +58,8 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -120,8 +120,8 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -136,9 +136,8 @@
|
|||||||
<artifactId>httpclient</artifactId>
|
<artifactId>httpclient</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs</artifactId>
|
<artifactId>spotbugs</artifactId>
|
||||||
<version>3.0.1</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -296,14 +296,6 @@
|
|||||||
</excludes>
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
|
||||||
<version>3.0.4</version>
|
|
||||||
<configuration>
|
|
||||||
<excludeFilterFile combine.self="override"/>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
@ -77,8 +77,8 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
|
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml</excludeFilterFile>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
@ -210,9 +210,8 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs</artifactId>
|
<artifactId>spotbugs</artifactId>
|
||||||
<version>3.0.1</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -101,9 +101,8 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
<version>1.11.615</version>
|
<version>1.11.615</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs</artifactId>
|
<artifactId>spotbugs</artifactId>
|
||||||
<version>3.0.1</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -133,8 +132,8 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
|
<excludeFilterFile>${basedir}/dev-support/findbugsExcludeFile.xml
|
||||||
</excludeFilterFile>
|
</excludeFilterFile>
|
||||||
|
@ -34,9 +34,8 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||||||
<artifactId>hadoop-hdds-common</artifactId>
|
<artifactId>hadoop-hdds-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs</artifactId>
|
<artifactId>spotbugs</artifactId>
|
||||||
<version>3.0.1</version>
|
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -144,7 +144,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
|
|||||||
|
|
||||||
<curator.version>2.12.0</curator.version>
|
<curator.version>2.12.0</curator.version>
|
||||||
<findbugs.version>3.0.0</findbugs.version>
|
<findbugs.version>3.0.0</findbugs.version>
|
||||||
<spotbugs.version>3.1.0-RC1</spotbugs.version>
|
<spotbugs.version>3.1.12</spotbugs.version>
|
||||||
<dnsjava.version>2.1.7</dnsjava.version>
|
<dnsjava.version>2.1.7</dnsjava.version>
|
||||||
|
|
||||||
<guava.version>11.0.2</guava.version>
|
<guava.version>11.0.2</guava.version>
|
||||||
@ -1210,6 +1210,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
|
|||||||
<artifactId>hadoop-cloud-storage</artifactId>
|
<artifactId>hadoop-cloud-storage</artifactId>
|
||||||
<version>${hadoop.version}</version>
|
<version>${hadoop.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.spotbugs</groupId>
|
||||||
|
<artifactId>spotbugs</artifactId>
|
||||||
|
<version>${spotbugs.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.google.code.findbugs</groupId>
|
||||||
<artifactId>jsr305</artifactId>
|
<artifactId>jsr305</artifactId>
|
||||||
@ -1571,16 +1577,13 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
|
|||||||
<version>${maven-war-plugin.version}</version>
|
<version>${maven-war-plugin.version}</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>com.github.spotbugs</groupId>
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
<artifactId>spotbugs-maven-plugin</artifactId>
|
||||||
<version>${findbugs.version}</version>
|
<version>${spotbugs.version}</version>
|
||||||
<dependencies>
|
<configuration>
|
||||||
<dependency>
|
<maxHeap>1024</maxHeap>
|
||||||
<groupId>com.github.spotbugs</groupId>
|
<xmlOutput>true</xmlOutput>
|
||||||
<artifactId>spotbugs</artifactId>
|
</configuration>
|
||||||
<version>${spotbugs.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
@ -1674,10 +1677,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
|
|||||||
</filesets>
|
</filesets>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>findbugs-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-remote-resources-plugin</artifactId>
|
<artifactId>maven-remote-resources-plugin</artifactId>
|
||||||
|
Loading…
Reference in New Issue
Block a user