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

stoty pushed a commit to branch 4.x
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x by this push:
     new ba8fc17  PHOENIX-6475 Use org.openlabtesting.protobuf:protoc when 
building on Linux ARM64
ba8fc17 is described below

commit ba8fc174f654120559848318253ef989973843e9
Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org>
AuthorDate: Wed May 19 14:15:04 2021 +0300

    PHOENIX-6475 Use org.openlabtesting.protobuf:protoc when building on Linux 
ARM64
    
    Stock Protobuf-Java adds aarch64 protoc binary in 3.5.0.
    To be able to build on Linux ARM64 with Protobuf 2.x we should use 
https://github.com/theopenlab/protobuf
---
 phoenix-core/pom.xml |  3 +--
 pom.xml              | 19 ++++++++++++++++++-
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 62085c7..143be81 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -196,8 +196,7 @@
               <goal>compile</goal>
             </goals>
             <configuration>
-              
<protocArtifact>com.google.protobuf:protoc:${protobuf-java.version}:exe:${os.detected.classifier}
-              </protocArtifact>
+              
<protocArtifact>${protobuf.group}:protoc:${protoc.version}:exe:${os.detected.classifier}</protocArtifact>
               <protoSourceRoot>${basedir}/src/main/protobuf/</protoSourceRoot>
               <clearOutputDirectory>false</clearOutputDirectory>
               <checkStaleness>true</checkStaleness>
diff --git a/pom.xml b/pom.xml
index 62eba61..408954c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -107,9 +107,12 @@
     <log4j.version>1.2.17</log4j.version>
     <disruptor.version>3.3.6</disruptor.version>
     <slf4j.version>1.6.4</slf4j.version>
-    <protobuf-java.version>2.5.0</protobuf-java.version>
     <commons-io.version>2.1</commons-io.version>
     <commons-lang.version>2.5</commons-lang.version>
+    <!-- com.google repo will be used except on Aarch64 platform. -->
+    <protobuf.group>com.google.protobuf</protobuf.group>
+    <protobuf-java.version>2.5.0</protobuf-java.version>
+    <protoc.version>2.5.0</protoc.version>
     <commons-csv.version>1.0</commons-csv.version>
     <sqlline.version>1.5.0</sqlline.version>
     <guava.version>13.0.1</guava.version>
@@ -1343,6 +1346,20 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>linux-aarch64</id>
+      <activation>
+        <os>
+          <family>linux</family>
+          <arch>aarch64</arch>
+        </os>
+      </activation>
+      <properties>
+        <!-- PHOENIX-6475 Use custom protoc for Linux ARM64 -->
+        <protobuf.group>org.openlabtesting.protobuf</protobuf.group>
+        <protoc.version>2.5.0.2</protoc.version>
+      </properties>
+    </profile>
   </profiles>
 
  <reporting>

Reply via email to