Repository: hbase Updated Branches: refs/heads/branch-1.4 20ed78e6a -> fb2aab3e3
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/fb2aab3e Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fb2aab3e Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fb2aab3e Branch: refs/heads/branch-1.4 Commit: fb2aab3e389e2b8c1c2a658b07e2662a3716299e Parents: 20ed78e Author: Andrew Purtell <[email protected]> Authored: Thu Nov 9 12:08:01 2017 -0800 Committer: Andrew Purtell <[email protected]> Committed: Thu Nov 9 15:52:31 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/fb2aab3e/hbase-client/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-client/pom.xml b/hbase-client/pom.xml index 0178005..718b6df 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/fb2aab3e/hbase-common/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-common/pom.xml b/hbase-common/pom.xml index c404312..5521fd3 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/fb2aab3e/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..da57ca6 --- /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.4.0-SNAPSHOT</version> + <relativePath>..</relativePath> + </parent> + <artifactId>hbase-error-prone</artifactId> + <version>1.4.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/fb2aab3e/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/fb2aab3e/hbase-examples/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-examples/pom.xml b/hbase-examples/pom.xml index 0a8be15..bcbeb0b 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/fb2aab3e/hbase-external-blockcache/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-external-blockcache/pom.xml b/hbase-external-blockcache/pom.xml index 91fe846..05f5a2d 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/fb2aab3e/hbase-hadoop-compat/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-hadoop-compat/pom.xml b/hbase-hadoop-compat/pom.xml index bdb5d0a..335f7e9 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/fb2aab3e/hbase-hadoop2-compat/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-hadoop2-compat/pom.xml b/hbase-hadoop2-compat/pom.xml index 54a31b6..9fc6f6a 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/fb2aab3e/hbase-it/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-it/pom.xml b/hbase-it/pom.xml index 46f251c..9ef8c65 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/fb2aab3e/hbase-metrics-api/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-metrics-api/pom.xml b/hbase-metrics-api/pom.xml index cf55905..7c471eb 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/fb2aab3e/hbase-metrics/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-metrics/pom.xml b/hbase-metrics/pom.xml index e32db77..77b5358 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/fb2aab3e/hbase-prefix-tree/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-prefix-tree/pom.xml b/hbase-prefix-tree/pom.xml index e8a7daa..20b5a64 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/fb2aab3e/hbase-procedure/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-procedure/pom.xml b/hbase-procedure/pom.xml index eef31d7..23552fa 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/fb2aab3e/hbase-protocol/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-protocol/pom.xml b/hbase-protocol/pom.xml index a389d78..f8295a3 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/fb2aab3e/hbase-rest/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-rest/pom.xml b/hbase-rest/pom.xml index 882e6d1..435bd02 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/fb2aab3e/hbase-rsgroup/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-rsgroup/pom.xml b/hbase-rsgroup/pom.xml index ac1d6b3..f2d9aa0 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/fb2aab3e/hbase-server/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-server/pom.xml b/hbase-server/pom.xml index e765b1d..23acf39 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/fb2aab3e/hbase-thrift/pom.xml ---------------------------------------------------------------------- diff --git a/hbase-thrift/pom.xml b/hbase-thrift/pom.xml index febc3d4..1a49c8f 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/fb2aab3e/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index ad574f7..1381a41 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>
