Repository: hbase Updated Branches: refs/heads/branch-1 a7447e015 -> 696152657
HBASE-12350 Backport error-prone build support to branch-1 and branch-2 Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/69615265 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/69615265 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/69615265 Branch: refs/heads/branch-1 Commit: 69615265736b38c4df80540683f22f5ca2b75aa2 Parents: a7447e0 Author: Andrew Purtell <apurt...@apache.org> Authored: Thu Nov 9 12:08:01 2017 -0800 Committer: Andrew Purtell <apurt...@apache.org> Committed: Thu Nov 9 15:34:09 2017 -0800 ---------------------------------------------------------------------- hbase-client/pom.xml | 58 +++++++++++++++++ hbase-common/pom.xml | 58 +++++++++++++++++ hbase-error-prone/pom.xml | 68 ++++++++++++++++++++ .../hadoop/hbase/errorprone/AlwaysPasses.java | 44 +++++++++++++ hbase-examples/pom.xml | 58 +++++++++++++++++ hbase-external-blockcache/pom.xml | 58 +++++++++++++++++ hbase-hadoop-compat/pom.xml | 58 +++++++++++++++++ hbase-hadoop2-compat/pom.xml | 58 +++++++++++++++++ hbase-it/pom.xml | 58 +++++++++++++++++ hbase-metrics-api/pom.xml | 58 +++++++++++++++++ hbase-metrics/pom.xml | 58 +++++++++++++++++ hbase-prefix-tree/pom.xml | 58 +++++++++++++++++ hbase-procedure/pom.xml | 58 +++++++++++++++++ hbase-protocol/pom.xml | 58 +++++++++++++++++ hbase-rest/pom.xml | 58 +++++++++++++++++ hbase-rsgroup/pom.xml | 58 +++++++++++++++++ hbase-server/pom.xml | 58 +++++++++++++++++ hbase-thrift/pom.xml | 58 +++++++++++++++++ pom.xml | 18 +++++- 19 files changed, 1056 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-client/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-client/pom.xml b/hbase-client/pom.xml index 9974fee..19ecd68 100644 --- a/hbase-client/pom.xml +++ b/hbase-client/pom.xml @@ -363,5 +363,63 @@ </dependency> </dependencies> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-common/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-common/pom.xml b/hbase-common/pom.xml index 7f31cc3..6b30536 100644 --- a/hbase-common/pom.xml +++ b/hbase-common/pom.xml @@ -424,5 +424,63 @@ </plugins> </build> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-error-prone/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-error-prone/pom.xml b/hbase-error-prone/pom.xml new file mode 100644 index 0000000..4844264 --- /dev/null +++ b/hbase-error-prone/pom.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<!-- +/** + * 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. + */ +--> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>hbase</artifactId> + <groupId>org.apache.hbase</groupId> + <version>1.5.0-SNAPSHOT</version> + <relativePath>..</relativePath> + </parent> + <artifactId>hbase-error-prone</artifactId> + <version>1.5.0-SNAPSHOT</version> + <name>Apache HBase - Error Prone Rules</name> + <description>Module to hold error prone custom rules for HBase.</description> + + <dependencies> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_annotation</artifactId> + <version>${error-prone.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <!--mvn dependency:analyze says this is not used but compile fails + without it; going w/ the compiler's view of the world--> + <groupId>com.google.auto.service</groupId> + <artifactId>auto-service</artifactId> + <version>1.0-rc3</version> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_check_api</artifactId> + <version>${error-prone.version}</version> + <scope>provided</scope> + <exclusions> + <exclusion> + <groupId>com.google.code.findbugs</groupId> + <artifactId>jsr305</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>javac</artifactId> + <version>9-dev-r4023-3</version> + <scope>provided</scope> + </dependency> + </dependencies> +</project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java ---------------------------------------------------------------------- diff --git a/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java b/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java new file mode 100644 index 0000000..5778f2d --- /dev/null +++ b/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 http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-examples/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-examples/pom.xml b/hbase-examples/pom.xml index c93c39e..138ea41 100644 --- a/hbase-examples/pom.xml +++ b/hbase-examples/pom.xml @@ -316,5 +316,63 @@ if we can combine these profiles somehow --> </plugins> </build> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-external-blockcache/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-external-blockcache/pom.xml b/hbase-external-blockcache/pom.xml index b4f070f..165f2b7 100644 --- a/hbase-external-blockcache/pom.xml +++ b/hbase-external-blockcache/pom.xml @@ -312,5 +312,63 @@ </plugins> </build> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-hadoop-compat/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-hadoop-compat/pom.xml b/hbase-hadoop-compat/pom.xml index 049fc28..6992ce6 100644 --- a/hbase-hadoop-compat/pom.xml +++ b/hbase-hadoop-compat/pom.xml @@ -141,6 +141,64 @@ <surefire.skipFirstPart>true</surefire.skipFirstPart> </properties> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-hadoop2-compat/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-hadoop2-compat/pom.xml b/hbase-hadoop2-compat/pom.xml index 1c057c3..f209f21 100644 --- a/hbase-hadoop2-compat/pom.xml +++ b/hbase-hadoop2-compat/pom.xml @@ -216,5 +216,63 @@ limitations under the License. <surefire.skipFirstPart>true</surefire.skipFirstPart> </properties> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-it/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-it/pom.xml b/hbase-it/pom.xml index 8839a9c..dc7cf44 100644 --- a/hbase-it/pom.xml +++ b/hbase-it/pom.xml @@ -427,6 +427,64 @@ </plugins> </build> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> <reporting> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-metrics-api/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-metrics-api/pom.xml b/hbase-metrics-api/pom.xml index 4c090b1..8610553 100644 --- a/hbase-metrics-api/pom.xml +++ b/hbase-metrics-api/pom.xml @@ -108,5 +108,63 @@ <surefire.skipFirstPart>true</surefire.skipFirstPart> </properties> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-metrics/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-metrics/pom.xml b/hbase-metrics/pom.xml index 7edba02..8b1e2da 100644 --- a/hbase-metrics/pom.xml +++ b/hbase-metrics/pom.xml @@ -132,5 +132,63 @@ <surefire.skipFirstPart>true</surefire.skipFirstPart> </properties> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-prefix-tree/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-prefix-tree/pom.xml b/hbase-prefix-tree/pom.xml index 5839079..9d1b472 100644 --- a/hbase-prefix-tree/pom.xml +++ b/hbase-prefix-tree/pom.xml @@ -186,5 +186,63 @@ </dependency> </dependencies> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-procedure/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-procedure/pom.xml b/hbase-procedure/pom.xml index 0375010..e68c0c5 100644 --- a/hbase-procedure/pom.xml +++ b/hbase-procedure/pom.xml @@ -145,5 +145,63 @@ </dependency> </dependencies> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-protocol/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-protocol/pom.xml b/hbase-protocol/pom.xml index a3b9be1..0c5faed 100644 --- a/hbase-protocol/pom.xml +++ b/hbase-protocol/pom.xml @@ -215,5 +215,63 @@ </plugins> </build> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-rest/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-rest/pom.xml b/hbase-rest/pom.xml index 83d0599..f227d46 100644 --- a/hbase-rest/pom.xml +++ b/hbase-rest/pom.xml @@ -440,5 +440,63 @@ </dependency> </dependencies> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-rsgroup/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-rsgroup/pom.xml b/hbase-rsgroup/pom.xml index 5e199af..2bb6958 100644 --- a/hbase-rsgroup/pom.xml +++ b/hbase-rsgroup/pom.xml @@ -274,5 +274,63 @@ </dependency> </dependencies> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-server/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-server/pom.xml b/hbase-server/pom.xml index 9e32783..e1b08d6 100644 --- a/hbase-server/pom.xml +++ b/hbase-server/pom.xml @@ -868,5 +868,63 @@ </plugins> </build> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/hbase-thrift/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-thrift/pom.xml b/hbase-thrift/pom.xml index c930a35..4ad9ccd 100644 --- a/hbase-thrift/pom.xml +++ b/hbase-thrift/pom.xml @@ -600,5 +600,63 @@ </plugins> </build> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <build> + <plugins> + <!-- Turn on error-prone --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven.compiler.version}</version> + <configuration> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + <showWarnings>true</showWarnings> + <compilerArgs> + <arg>-XepDisableWarningsInGeneratedCode</arg> + <arg>-Xep:FallThrough:OFF</arg> <!-- already in findbugs --> + </compilerArgs> + <annotationProcessorPaths> + <path> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${plexus.errorprone.javac.version}</version> + </dependency> + <!-- override plexus-compiler-javac-errorprone's dependency on + Error Prone with the latest version --> + <dependency> + <groupId>com.google.errorprone</groupId> + <artifactId>error_prone_core</artifactId> + <version>${error-prone.version}</version> + </dependency> + <dependency> + <groupId>org.apache.hbase</groupId> + <artifactId>hbase-error-prone</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> http://git-wip-us.apache.org/repos/asf/hbase/blob/69615265/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 83a0ae5..1f331d8 100644 --- a/pom.xml +++ b/pom.xml @@ -485,7 +485,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>2.5.1</version> + <version>${maven.compiler.version}</version> <configuration> <source>${compileSource}</source> <target>${compileSource}</target> @@ -1288,13 +1288,16 @@ <bouncycastle.version>1.46</bouncycastle.version> <kerby.version>1.0.0-RC2</kerby.version> <!-- Plugin Dependencies --> + <error-prone.version>2.1.1</error-prone.version> <maven.assembly.version>2.4</maven.assembly.version> <maven.antrun.version>1.6</maven.antrun.version> + <maven.compiler.version>3.6.1</maven.compiler.version> <jamon.plugin.version>2.4.1</jamon.plugin.version> <findbugs-annotations>1.3.9-1</findbugs-annotations> <checkstyle.version>6.18</checkstyle.version> <javadoc.version>2.10.3</javadoc.version> <asciidoctor.plugin.version>1.5.3</asciidoctor.plugin.version> + <plexus.errorprone.javac.version>2.8.2</plexus.errorprone.javac.version> <spotbugs.version>3.1.0-RC1</spotbugs.version> <maven.dependency.version>3.0.1</maven.dependency.version> <maven.enforcer.version>3.0.0-M1</maven.enforcer.version> @@ -2510,8 +2513,8 @@ </dependency> </dependencies> </dependencyManagement> - </profile> + <!-- profiles for the tests See as well the properties of the project for the values when no profile is active. --> @@ -2698,6 +2701,17 @@ </plugins> </build> </profile> + + <profile> + <id>errorProne</id> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + <modules> + <module>hbase-error-prone</module> + </modules> + </profile> + </profiles> <!-- See http://jira.codehaus.org/browse/MSITE-443 why the settings need to be here and not in pluginManagement. --> <reporting>