diff --git a/hbase-build-configuration/pom.xml b/hbase-build-configuration/pom.xml index b98f54b4ff2..f76c15e4293 100644 --- a/hbase-build-configuration/pom.xml +++ b/hbase-build-configuration/pom.xml @@ -55,4 +55,58 @@ audience-annotations + + + + errorProne + + false + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven.compiler.version} + + javac-with-errorprone + true + true + + -XepDisableWarningsInGeneratedCode + -Xep:FallThrough:OFF + + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + org.codehaus.plexus + plexus-compiler-javac-errorprone + ${plexus.errorprone.javac.version} + + + + com.google.errorprone + error_prone_core + ${error-prone.version} + + + org.apache.hbase + hbase-error-prone + ${project.version} + + + + + + + diff --git a/hbase-build-support/hbase-error-prone/pom.xml b/hbase-build-support/hbase-error-prone/pom.xml new file mode 100644 index 00000000000..10af82788a0 --- /dev/null +++ b/hbase-build-support/hbase-error-prone/pom.xml @@ -0,0 +1,68 @@ + + + + 4.0.0 + + hbase-build-support + org.apache.hbase + 2.0.0-beta-1.SNAPSHOT + .. + + hbase-error-prone + 2.0.0-beta-1.SNAPSHOT + Apache HBase - Error Prone Rules + Module to hold error prone custom rules for HBase. + + + + com.google.errorprone + error_prone_annotation + ${error-prone.version} + provided + + + + com.google.auto.service + auto-service + 1.0-rc3 + true + + + com.google.errorprone + error_prone_check_api + ${error-prone.version} + provided + + + com.google.code.findbugs + jsr305 + + + + + com.google.errorprone + javac + 9-dev-r4023-3 + provided + + + diff --git a/hbase-build-support/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java b/hbase-build-support/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java new file mode 100644 index 00000000000..5778f2df8e3 --- /dev/null +++ b/hbase-build-support/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java @@ -0,0 +1,44 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.errorprone; + +import com.google.auto.service.AutoService; +import com.google.errorprone.BugPattern; +import com.google.errorprone.VisitorState; +import com.google.errorprone.bugpatterns.BugChecker; +import com.google.errorprone.fixes.Fix; +import com.google.errorprone.fixes.SuggestedFix; +import com.google.errorprone.matchers.Description; +import com.google.errorprone.matchers.Matcher; +import com.sun.source.tree.CompilationUnitTree; +import com.sun.source.tree.ImportTree; + +@AutoService(BugChecker.class) +@BugPattern(name = "AlwaysPasses", + category = BugPattern.Category.JDK, + summary = "A placeholder rule that never matches.", + severity = BugPattern.SeverityLevel.ERROR, + suppressibility = BugPattern.Suppressibility.UNSUPPRESSIBLE, + linkType = BugPattern.LinkType.NONE) +public class AlwaysPasses extends BugChecker implements BugChecker.CompilationUnitTreeMatcher { + @Override + public Description matchCompilationUnit(CompilationUnitTree tree, VisitorState state) { + return Description.NO_MATCH; + } +} \ No newline at end of file diff --git a/hbase-build-support/pom.xml b/hbase-build-support/pom.xml new file mode 100644 index 00000000000..335d8aca341 --- /dev/null +++ b/hbase-build-support/pom.xml @@ -0,0 +1,78 @@ + + + + 4.0.0 + + hbase + org.apache.hbase + 2.0.0-beta-1.SNAPSHOT + .. + + + hbase-build-support + Apache HBase - Build Support + Parent module for build-support artifacts + + pom + + + true + + true + + true + + + hbase-error-prone + + + + + + + org.codehaus.mojo + findbugs-maven-plugin + + ${project.basedir}/../../dev-support/findbugs-exclude.xml + + + + + maven-assembly-plugin + + true + + + + + + + + maven-assembly-plugin + + true + + + + + diff --git a/pom.xml b/pom.xml index a64d56c0811..23301ab431b 100644 --- a/pom.xml +++ b/pom.xml @@ -61,6 +61,7 @@ + hbase-build-support hbase-build-configuration hbase-replication hbase-mapreduce @@ -1375,6 +1376,7 @@ 1.4 6.18 1.6.0 + 2.1.1 1.3.9-1 3.0.4 2.4.2 @@ -1393,6 +1395,7 @@ 3.4 3.0.1 1.5.0.Final + 2.8.2 3.2.2 1.0 3.1.0-RC3