diff --git a/BUILDING.txt b/BUILDING.txt index 9bbb6dbf891..821056f81de 100644 --- a/BUILDING.txt +++ b/BUILDING.txt @@ -139,7 +139,7 @@ Maven build goals: * Compile : mvn compile [-Pnative] * Run tests : mvn test [-Pnative] [-Pshelltest] * Create JAR : mvn package - * Run spotbugs : mvn compile spotbugs:spotbugs + * Run findbugs : mvn compile findbugs:findbugs * Run checkstyle : mvn compile checkstyle:checkstyle * Install JAR in M2 cache : mvn install * Deploy JAR to Maven repo : mvn deploy diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile index 5d1b775a8ae..1703d0153bf 100644 --- a/dev-support/Jenkinsfile +++ b/dev-support/Jenkinsfile @@ -120,11 +120,11 @@ pipeline { YETUS_ARGS+=("--proclimit=5500") YETUS_ARGS+=("--dockermemlimit=22g") - # -1 spotbugs issues that show up prior to the patch being applied - YETUS_ARGS+=("--spotbugs-strict-precheck") + # -1 findbugs issues that show up prior to the patch being applied + YETUS_ARGS+=("--findbugs-strict-precheck") # rsync these files back into the archive dir - YETUS_ARGS+=("--archive-list=checkstyle-errors.xml,spotbugsXml.xml") + YETUS_ARGS+=("--archive-list=checkstyle-errors.xml,findbugsXml.xml") # URL for user-side presentation in reports and such to our artifacts # (needs to match the archive bits below) diff --git a/dev-support/bin/hadoop.sh b/dev-support/bin/hadoop.sh index beebea8c97f..3343014aae8 100755 --- a/dev-support/bin/hadoop.sh +++ b/dev-support/bin/hadoop.sh @@ -482,7 +482,7 @@ function personality_file_tests fi if [[ ${filename} =~ \.java$ ]]; then - add_test spotbugs + add_test findbugs fi } @@ -550,7 +550,7 @@ function shadedclient_rebuild echo_and_redirect "${logfile}" \ "${MAVEN}" "${MAVEN_ARGS[@]}" verify -fae --batch-mode -am \ "${modules[@]}" \ - -Dtest=NoUnitTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true + -Dtest=NoUnitTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dfindbugs.skip=true count=$("${GREP}" -c '\[ERROR\]' "${logfile}") if [[ ${count} -gt 0 ]]; then diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile index 20cbbf8a042..cf442902d3d 100644 --- a/dev-support/docker/Dockerfile +++ b/dev-support/docker/Dockerfile @@ -44,6 +44,7 @@ RUN apt-get -q update \ cmake \ curl \ doxygen \ + findbugs \ fuse \ g++ \ gcc \ @@ -90,16 +91,7 @@ RUN apt-get -q update \ ENV MAVEN_HOME /usr # JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003) ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 - -####### -# Install SpotBugs 4.0.6 -####### -RUN mkdir -p /opt/spotbugs \ - && curl -L -s -S https://github.com/spotbugs/spotbugs/releases/download/4.0.6/spotbugs-4.0.6.tgz \ - -o /opt/spotbugs.tgz \ - && tar xzf /opt/spotbugs.tgz --strip-components 1 -C /opt/spotbugs \ - && chmod +x /opt/spotbugs/bin/* -ENV SPOTBUGS_HOME /opt/spotbugs +ENV FINDBUGS_HOME /usr ####### # Install Boost 1.72 (1.71 ships with Focal) diff --git a/dev-support/docker/Dockerfile_aarch64 b/dev-support/docker/Dockerfile_aarch64 index 8f95df8ee8c..bdf9e0c7e59 100644 --- a/dev-support/docker/Dockerfile_aarch64 +++ b/dev-support/docker/Dockerfile_aarch64 @@ -48,6 +48,7 @@ RUN apt-get -q update \ cmake \ curl \ doxygen \ + findbugs \ fuse \ g++ \ gcc \ @@ -94,16 +95,7 @@ RUN apt-get -q update \ ENV MAVEN_HOME /usr # JAVA_HOME must be set in Maven >= 3.5.0 (MNG-6003) ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-arm64 - -####### -# Install SpotBugs 4.0.6 -####### -RUN mkdir -p /opt/spotbugs \ - && curl -L -s -S https://github.com/spotbugs/spotbugs/releases/download/4.0.6/spotbugs-4.0.6.tgz \ - -o /opt/spotbugs.tgz \ - && tar xzf /opt/spotbugs.tgz --strip-components 1 -C /opt/spotbugs \ - && chmod +x /opt/spotbugs/bin/* -ENV SPOTBUGS_HOME /opt/spotbugs +ENV FINDBUGS_HOME /usr ####### # Install Boost 1.72 (1.71 ships with Focal) diff --git a/hadoop-cloud-storage-project/hadoop-cos/pom.xml b/hadoop-cloud-storage-project/hadoop-cos/pom.xml index fa47e354c79..d18b09f4504 100644 --- a/hadoop-cloud-storage-project/hadoop-cos/pom.xml +++ b/hadoop-cloud-storage-project/hadoop-cos/pom.xml @@ -64,9 +64,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${basedir}/dev-support/findbugs-exclude.xml diff --git a/hadoop-common-project/hadoop-auth/pom.xml b/hadoop-common-project/hadoop-auth/pom.xml index 8e8526c7450..10e0b9c8256 100644 --- a/hadoop-common-project/hadoop-auth/pom.xml +++ b/hadoop-common-project/hadoop-auth/pom.xml @@ -237,8 +237,8 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin ${basedir}/dev-support/findbugsExcludeFile.xml diff --git a/hadoop-common-project/hadoop-kms/pom.xml b/hadoop-common-project/hadoop-kms/pom.xml index 9de8b9caf6e..338af127f8b 100644 --- a/hadoop-common-project/hadoop-kms/pom.xml +++ b/hadoop-common-project/hadoop-kms/pom.xml @@ -237,8 +237,8 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin ${basedir}/dev-support/findbugsExcludeFile.xml diff --git a/hadoop-common-project/hadoop-minikdc/pom.xml b/hadoop-common-project/hadoop-minikdc/pom.xml index c292aebbe36..c76abf750b7 100644 --- a/hadoop-common-project/hadoop-minikdc/pom.xml +++ b/hadoop-common-project/hadoop-minikdc/pom.xml @@ -53,8 +53,8 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin ${basedir}/dev-support/findbugsExcludeFile.xml diff --git a/hadoop-common-project/hadoop-nfs/pom.xml b/hadoop-common-project/hadoop-nfs/pom.xml index f5de8407a09..b3c727910e7 100644 --- a/hadoop-common-project/hadoop-nfs/pom.xml +++ b/hadoop-common-project/hadoop-nfs/pom.xml @@ -107,8 +107,8 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin ${basedir}/dev-support/findbugsExcludeFile.xml diff --git a/hadoop-common-project/hadoop-registry/pom.xml b/hadoop-common-project/hadoop-registry/pom.xml index 0058832e611..5e3e2edcb96 100644 --- a/hadoop-common-project/hadoop-registry/pom.xml +++ b/hadoop-common-project/hadoop-registry/pom.xml @@ -163,9 +163,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${project.basedir}/dev-support/findbugs-exclude.xml Max diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml b/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml index 1916ef0e3b7..de711227088 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/pom.xml @@ -337,8 +337,8 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin ${basedir}/dev-support/findbugsExcludeFile.xml diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml b/hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml index 55940ae4ff7..0d76285cded 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/pom.xml @@ -157,9 +157,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${mr.basedir}/dev-support/findbugs-exclude.xml Max diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml b/hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml index 48cf27efe43..ec3a0514b26 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml +++ b/hadoop-mapreduce-project/hadoop-mapreduce-examples/pom.xml @@ -138,9 +138,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${mr.examples.basedir}/dev-support/findbugs-exclude.xml Max diff --git a/hadoop-mapreduce-project/pom.xml b/hadoop-mapreduce-project/pom.xml index 09b4d426061..5ec1db63240 100644 --- a/hadoop-mapreduce-project/pom.xml +++ b/hadoop-mapreduce-project/pom.xml @@ -178,9 +178,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${mr.basedir}/dev-support/findbugs-exclude.xml Max @@ -298,9 +299,12 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + + 2.3.2 + true true diff --git a/hadoop-project-dist/pom.xml b/hadoop-project-dist/pom.xml index 10a0526519d..410ec8635ee 100644 --- a/hadoop-project-dist/pom.xml +++ b/hadoop-project-dist/pom.xml @@ -89,10 +89,11 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin ${basedir}/dev-support/findbugsExcludeFile.xml + true 2048 diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml index 482ecb64ed1..c3a52d32af8 100644 --- a/hadoop-project/pom.xml +++ b/hadoop-project/pom.xml @@ -101,6 +101,7 @@ 3.5.6 4.2.0 3.0.5 + 4.0.6 2.1.7 27.0-jre @@ -1853,6 +1854,18 @@ maven-war-plugin ${maven-war-plugin.version} + + org.codehaus.mojo + findbugs-maven-plugin + ${findbugs.version} + + + com.github.spotbugs + spotbugs + ${spotbugs.version} + + + org.codehaus.mojo make-maven-plugin @@ -2086,6 +2099,10 @@ + + org.codehaus.mojo + findbugs-maven-plugin + org.apache.maven.plugins maven-antrun-plugin diff --git a/hadoop-tools/hadoop-aliyun/pom.xml b/hadoop-tools/hadoop-aliyun/pom.xml index 8a68d9b4f7d..284c6517821 100644 --- a/hadoop-tools/hadoop-aliyun/pom.xml +++ b/hadoop-tools/hadoop-aliyun/pom.xml @@ -58,9 +58,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${basedir}/dev-support/findbugs-exclude.xml diff --git a/hadoop-tools/hadoop-archive-logs/pom.xml b/hadoop-tools/hadoop-archive-logs/pom.xml index 3caa26c52f8..10bc9a08332 100644 --- a/hadoop-tools/hadoop-archive-logs/pom.xml +++ b/hadoop-tools/hadoop-archive-logs/pom.xml @@ -194,9 +194,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${basedir}/dev-support/findbugs-exclude.xml diff --git a/hadoop-tools/hadoop-aws/pom.xml b/hadoop-tools/hadoop-aws/pom.xml index 0cab5ada216..f6d70230944 100644 --- a/hadoop-tools/hadoop-aws/pom.xml +++ b/hadoop-tools/hadoop-aws/pom.xml @@ -399,9 +399,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${basedir}/dev-support/findbugs-exclude.xml diff --git a/hadoop-tools/hadoop-azure/pom.xml b/hadoop-tools/hadoop-azure/pom.xml index d5d0f1fcd73..4176305c32c 100644 --- a/hadoop-tools/hadoop-azure/pom.xml +++ b/hadoop-tools/hadoop-azure/pom.xml @@ -50,9 +50,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${basedir}/dev-support/findbugs-exclude.xml diff --git a/hadoop-tools/hadoop-datajoin/pom.xml b/hadoop-tools/hadoop-datajoin/pom.xml index ec77281b663..e26fa5dc333 100644 --- a/hadoop-tools/hadoop-datajoin/pom.xml +++ b/hadoop-tools/hadoop-datajoin/pom.xml @@ -108,9 +108,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${basedir}/dev-support/findbugs-exclude.xml diff --git a/hadoop-tools/hadoop-fs2img/pom.xml b/hadoop-tools/hadoop-fs2img/pom.xml index 9a273621cfa..6f268ca616f 100644 --- a/hadoop-tools/hadoop-fs2img/pom.xml +++ b/hadoop-tools/hadoop-fs2img/pom.xml @@ -87,9 +87,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${basedir}/dev-support/findbugs-exclude.xml Max diff --git a/hadoop-tools/hadoop-gridmix/pom.xml b/hadoop-tools/hadoop-gridmix/pom.xml index f383ecad641..afa9cf5d367 100644 --- a/hadoop-tools/hadoop-gridmix/pom.xml +++ b/hadoop-tools/hadoop-gridmix/pom.xml @@ -123,9 +123,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${basedir}/dev-support/findbugs-exclude.xml Max diff --git a/hadoop-tools/hadoop-kafka/pom.xml b/hadoop-tools/hadoop-kafka/pom.xml index a6f854a1ec2..8789b13c51a 100644 --- a/hadoop-tools/hadoop-kafka/pom.xml +++ b/hadoop-tools/hadoop-kafka/pom.xml @@ -39,9 +39,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true Max diff --git a/hadoop-tools/hadoop-openstack/pom.xml b/hadoop-tools/hadoop-openstack/pom.xml index e1065883feb..a4624c54e68 100644 --- a/hadoop-tools/hadoop-openstack/pom.xml +++ b/hadoop-tools/hadoop-openstack/pom.xml @@ -66,9 +66,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${basedir}/dev-support/findbugs-exclude.xml diff --git a/hadoop-tools/hadoop-rumen/pom.xml b/hadoop-tools/hadoop-rumen/pom.xml index fd3b5c9a1b8..6afc51c1f21 100644 --- a/hadoop-tools/hadoop-rumen/pom.xml +++ b/hadoop-tools/hadoop-rumen/pom.xml @@ -102,9 +102,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${basedir}/dev-support/findbugs-exclude.xml Max diff --git a/hadoop-tools/hadoop-sls/pom.xml b/hadoop-tools/hadoop-sls/pom.xml index 5bb5a415d90..ce9197cd21d 100644 --- a/hadoop-tools/hadoop-sls/pom.xml +++ b/hadoop-tools/hadoop-sls/pom.xml @@ -108,9 +108,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${basedir}/dev-support/findbugs-exclude.xml Max diff --git a/hadoop-tools/hadoop-streaming/pom.xml b/hadoop-tools/hadoop-streaming/pom.xml index f03eb001450..a419e10d753 100644 --- a/hadoop-tools/hadoop-streaming/pom.xml +++ b/hadoop-tools/hadoop-streaming/pom.xml @@ -129,9 +129,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${basedir}/dev-support/findbugs-exclude.xml Max diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/pom.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/pom.xml index 12b01126803..072e70a894d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/pom.xml +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/pom.xml @@ -389,8 +389,8 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin true diff --git a/hadoop-yarn-project/hadoop-yarn/pom.xml b/hadoop-yarn-project/hadoop-yarn/pom.xml index dff9a2b08a9..c8d9ddd9d00 100644 --- a/hadoop-yarn-project/hadoop-yarn/pom.xml +++ b/hadoop-yarn-project/hadoop-yarn/pom.xml @@ -39,9 +39,10 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + true true ${yarn.basedir}/dev-support/findbugs-exclude.xml Max diff --git a/hadoop-yarn-project/pom.xml b/hadoop-yarn-project/pom.xml index ae40fef3f71..d05d1df2c54 100644 --- a/hadoop-yarn-project/pom.xml +++ b/hadoop-yarn-project/pom.xml @@ -204,9 +204,12 @@ - com.github.spotbugs - spotbugs-maven-plugin + org.codehaus.mojo + findbugs-maven-plugin + + 2.3.2 + true true diff --git a/pom.xml b/pom.xml index 4ec386979d7..7e94cfb8ad0 100644 --- a/pom.xml +++ b/pom.xml @@ -113,8 +113,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x 3.1.0 8.29 1.4.3 - 4.0.6 - 4.0.4 bash @@ -344,18 +342,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x dependency-check-maven ${dependency-check-maven.version} - - com.github.spotbugs - spotbugs-maven-plugin - ${spotbugs-maven-plugin.version} - - - com.github.spotbugs - spotbugs - ${spotbugs.version} - - - @@ -457,10 +443,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/x dependency-check-maven ${dependency-check-maven.version} - - com.github.spotbugs - spotbugs-maven-plugin -