You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2019/03/28 04:11:28 UTC

[hbase] branch branch-2.1 updated: HBASE-22098 Backport HBASE-18667 "Disable error-prone for hbase-protocol-shaded" to branch-2

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 804949c  HBASE-22098 Backport HBASE-18667 "Disable error-prone for hbase-protocol-shaded" to branch-2
804949c is described below

commit 804949ccc9b092729c204feb96f6be2f0b8560ea
Author: zhangduo <zh...@apache.org>
AuthorDate: Wed Mar 27 22:03:59 2019 +0800

    HBASE-22098 Backport HBASE-18667 "Disable error-prone for hbase-protocol-shaded" to branch-2
    
    Signed-off-by: Michael Stack <st...@apache.org>
---
 hbase-protocol-shaded/pom.xml |  9 +++++++++
 hbase-protocol/pom.xml        | 30 ++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/hbase-protocol-shaded/pom.xml b/hbase-protocol-shaded/pom.xml
index 6960668..8f7b8f1 100644
--- a/hbase-protocol-shaded/pom.xml
+++ b/hbase-protocol-shaded/pom.xml
@@ -127,6 +127,15 @@
                 <token>([^\.])com.google.protobuf</token>
                 <value>$1org.apache.hbase.thirdparty.com.google.protobuf</value>
               </replacement>
+              <replacement>
+                <token>(public)(\W+static)?(\W+final)?(\W+class)</token>
+                <value>@javax.annotation.Generated("proto") $1$2$3$4</value>
+              </replacement>
+              <!-- replacer doesn't support anchoring or negative lookbehind -->
+              <replacement>
+                <token>(@javax.annotation.Generated\("proto"\) ){2}</token>
+                <value>$1</value>
+              </replacement>
             </replacements>
         </configuration>
       </plugin>
diff --git a/hbase-protocol/pom.xml b/hbase-protocol/pom.xml
index bc4eeb4..03f5fad 100644
--- a/hbase-protocol/pom.xml
+++ b/hbase-protocol/pom.xml
@@ -79,6 +79,36 @@
         <groupId>net.revelc.code</groupId>
         <artifactId>warbucks-maven-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>com.google.code.maven-replacer-plugin</groupId>
+        <artifactId>replacer</artifactId>
+        <version>1.5.3</version>
+        <executions>
+          <execution>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>replace</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <basedir>${basedir}/target/generated-sources/</basedir>
+            <includes>
+                <include>**/*.java</include>
+            </includes>
+            <replacements>
+              <replacement>
+                <token>(public)(\W+static)?(\W+final)?(\W+class)</token>
+                <value>@javax.annotation.Generated("proto") $1$2$3$4</value>
+              </replacement>
+              <!-- replacer doesn't support anchoring or negative lookbehind -->
+              <replacement>
+                <token>(@javax.annotation.Generated\("proto"\) ){2}</token>
+                <value>$1</value>
+              </replacement>
+            </replacements>
+        </configuration>
+      </plugin>
     </plugins>
     <pluginManagement>
       <plugins>