|
29 | 29 | <artifactId>hbase-examples</artifactId> |
30 | 30 | <name>Apache HBase - Examples</name> |
31 | 31 | <description>Examples of HBase usage</description> |
32 | | - <!--REMOVE--> |
| 32 | + <properties> |
| 33 | + <!--Version of protobuf that hbase uses internally (we shade our pb) |
| 34 | + Must match what is out in hbase-thirdparty include. |
| 35 | + --> |
| 36 | + <internal.protobuf.version>3.11.4</internal.protobuf.version> |
| 37 | + </properties> |
33 | 38 | <build> |
34 | 39 | <plugins> |
35 | 40 | <plugin> |
|
62 | 67 | <goals> |
63 | 68 | <goal>compile</goal> |
64 | 69 | </goals> |
| 70 | + <configuration> |
| 71 | + <protocArtifact>com.google.protobuf:protoc:${internal.protobuf.version}:exe:${os.detected.classifier}</protocArtifact> |
| 72 | + <checkStaleness>true</checkStaleness> |
| 73 | + </configuration> |
65 | 74 | </execution> |
66 | 75 | </executions> |
67 | 76 | </plugin> |
| 77 | + <plugin> |
| 78 | + <groupId>com.google.code.maven-replacer-plugin</groupId> |
| 79 | + <artifactId>replacer</artifactId> |
| 80 | + <version>1.5.3</version> |
| 81 | + <executions> |
| 82 | + <execution> |
| 83 | + <phase>process-sources</phase> |
| 84 | + <goals> |
| 85 | + <goal>replace</goal> |
| 86 | + </goals> |
| 87 | + </execution> |
| 88 | + </executions> |
| 89 | + <configuration> |
| 90 | + <basedir>${basedir}/target/generated-sources/</basedir> |
| 91 | + <includes> |
| 92 | + <include>**/*.java</include> |
| 93 | + </includes> |
| 94 | + <!-- Ignore errors when missing files, because it means this build |
| 95 | + was run with -Dprotoc.skip and there is no -Dreplacer.skip --> |
| 96 | + <ignoreErrors>true</ignoreErrors> |
| 97 | + <replacements> |
| 98 | + <replacement> |
| 99 | + <token>([^\.])com.google.protobuf</token> |
| 100 | + <value>$1org.apache.hbase.thirdparty.com.google.protobuf</value> |
| 101 | + </replacement> |
| 102 | + <replacement> |
| 103 | + <token>(public)(\W+static)?(\W+final)?(\W+class)</token> |
| 104 | + <value>@javax.annotation.Generated("proto") $1$2$3$4</value> |
| 105 | + </replacement> |
| 106 | + <!-- replacer doesn't support anchoring or negative lookbehind --> |
| 107 | + <replacement> |
| 108 | + <token>(@javax.annotation.Generated\("proto"\) ){2}</token> |
| 109 | + <value>$1</value> |
| 110 | + </replacement> |
| 111 | + </replacements> |
| 112 | + </configuration> |
| 113 | + </plugin> |
68 | 114 | <plugin> |
69 | 115 | <groupId>net.revelc.code</groupId> |
70 | 116 | <artifactId>warbucks-maven-plugin</artifactId> |
|
87 | 133 | <groupId>org.apache.hbase.thirdparty</groupId> |
88 | 134 | <artifactId>hbase-shaded-netty</artifactId> |
89 | 135 | </dependency> |
| 136 | + <dependency> |
| 137 | + <groupId>org.apache.hbase</groupId> |
| 138 | + <artifactId>hbase-protocol-shaded</artifactId> |
| 139 | + </dependency> |
90 | 140 | <dependency> |
91 | 141 | <groupId>org.apache.hbase</groupId> |
92 | 142 | <artifactId>hbase-common</artifactId> |
|
0 commit comments