hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject hbase git commit: HBASE-12350 Backport error-prone build support to branch-1 and branch-2
Date Thu, 09 Nov 2017 22:32:51 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-2 4970b0ad0 -> 6938ac274


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/6938ac27
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6938ac27
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6938ac27

Branch: refs/heads/branch-2
Commit: 6938ac274a29101ae4f49fb8be23a9a9edd5e1fc
Parents: 4970b0a
Author: Andrew Purtell <apurtell@apache.org>
Authored: Thu Nov 9 13:57:11 2017 -0800
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Thu Nov 9 14:32:43 2017 -0800

----------------------------------------------------------------------
 hbase-build-configuration/pom.xml               | 54 ++++++++++++++
 hbase-build-support/hbase-error-prone/pom.xml   | 68 +++++++++++++++++
 .../hadoop/hbase/errorprone/AlwaysPasses.java   | 44 +++++++++++
 hbase-build-support/pom.xml                     | 78 ++++++++++++++++++++
 pom.xml                                         |  3 +
 5 files changed, 247 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6938ac27/hbase-build-configuration/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-build-configuration/pom.xml b/hbase-build-configuration/pom.xml
index b98f54b..f76c15e 100644
--- a/hbase-build-configuration/pom.xml
+++ b/hbase-build-configuration/pom.xml
@@ -55,4 +55,58 @@
       <artifactId>audience-annotations</artifactId>
     </dependency>
   </dependencies>
+
+  <profiles>
+    <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.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/6938ac27/hbase-build-support/hbase-error-prone/pom.xml
----------------------------------------------------------------------
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 0000000..10af827
--- /dev/null
+++ b/hbase-build-support/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-build-support</artifactId>
+    <groupId>org.apache.hbase</groupId>
+    <version>2.0.0-beta-1.SNAPSHOT</version>
+    <relativePath>..</relativePath>
+  </parent>
+  <artifactId>hbase-error-prone</artifactId>
+  <version>2.0.0-beta-1.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/6938ac27/hbase-build-support/hbase-error-prone/src/main/java/org/apache/hadoop/hbase/errorprone/AlwaysPasses.java
----------------------------------------------------------------------
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 0000000..5778f2d
--- /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

http://git-wip-us.apache.org/repos/asf/hbase/blob/6938ac27/hbase-build-support/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-build-support/pom.xml b/hbase-build-support/pom.xml
new file mode 100644
index 0000000..335d8ac
--- /dev/null
+++ b/hbase-build-support/pom.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0"?>
+<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/xsd/maven-4.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>2.0.0-beta-1.SNAPSHOT</version>
+    <relativePath>..</relativePath>
+  </parent>
+
+  <artifactId>hbase-build-support</artifactId>
+  <name>Apache HBase - Build Support</name>
+  <description>Parent module for build-support artifacts</description>
+
+  <packaging>pom</packaging>
+  <properties>
+    <!-- Don't make a test-jar -->
+    <maven.test.skip>true</maven.test.skip>
+    <!-- Don't make a source-jar -->
+    <source.skip>true</source.skip>
+    <!-- Don't make a site -->
+    <maven.site.skip>true</maven.site.skip>
+  </properties>
+  <modules>
+    <module>hbase-error-prone</module>
+  </modules>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <!-- This entry overrides the excludeFileFilter element in the findbugs
+             configuration of the hbase/pom.xml file. This override specifies that
+             the excluded-filter-file is found TWO levels up from a grandchild project. -->
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>findbugs-maven-plugin</artifactId>
+          <configuration>
+            <excludeFilterFile>${project.basedir}/../../dev-support/findbugs-exclude.xml</excludeFilterFile>
+          </configuration>
+        </plugin>
+        <plugin>
+          <!--Make it so assembly:single does nothing in here-->
+          <artifactId>maven-assembly-plugin</artifactId>
+          <configuration>
+            <skipAssembly>true</skipAssembly>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <!--Make it so assembly:single does nothing in here-->
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <skipAssembly>true</skipAssembly>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/hbase/blob/6938ac27/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a64d56c..23301ab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,6 +61,7 @@
   </licenses>
 
   <modules>
+    <module>hbase-build-support</module>
     <module>hbase-build-configuration</module>
     <module>hbase-replication</module>
     <module>hbase-mapreduce</module>
@@ -1375,6 +1376,7 @@
     <buildnumber.maven.version>1.4</buildnumber.maven.version>
     <checkstyle.version>6.18</checkstyle.version>
     <exec.maven.version>1.6.0</exec.maven.version>
+    <error-prone.version>2.1.1</error-prone.version>
     <findbugs-annotations>1.3.9-1</findbugs-annotations>
     <findbugs.maven.version>3.0.4</findbugs.maven.version>
     <jamon.plugin.version>2.4.2</jamon.plugin.version>
@@ -1393,6 +1395,7 @@
     <maven.site.version>3.4</maven.site.version>
     <maven.source.version>3.0.1</maven.source.version>
     <os.maven.version>1.5.0.Final</os.maven.version>
+    <plexus.errorprone.javac.version>2.8.2</plexus.errorprone.javac.version>
     <scala.maven.version>3.2.2</scala.maven.version>
     <scalatest.maven.version>1.0</scalatest.maven.version>
     <spotbugs.version>3.1.0-RC3</spotbugs.version>


Mime
View raw message