You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by st...@apache.org on 2020/11/11 18:08:35 UTC
[phoenix-omid] branch master updated: OMID-120 Utilize
protobuf-maven-plugin for build
This is an automated email from the ASF dual-hosted git repository.
stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix-omid.git
The following commit(s) were added to refs/heads/master by this push:
new ebe39cd OMID-120 Utilize protobuf-maven-plugin for build
ebe39cd is described below
commit ebe39cd3ae755ad7ee65842e6f634feeaf51fda5
Author: Chia-Ping Tsai <ch...@gmail.com>
AuthorDate: Wed Nov 11 19:46:34 2020 +0800
OMID-120 Utilize protobuf-maven-plugin for build
---
.travis.yml | 5 -----
common/pom.xml | 36 +++++++++++++++---------------------
pom.xml | 3 ++-
3 files changed, 17 insertions(+), 27 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index dbfc9e3..535f249 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,11 +28,6 @@ before_script:
- git config --global user.email "dev@omid.incubator.apache.org"
- git config --global user.name "Omid CI"
- REPO_DIR=$(pwd)
- # Install protobuf to genearte TSO client-server protocol in each compilation
- - cd ..
- - wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz
- - tar -xzvf protobuf-2.5.0.tar.gz
- - cd protobuf-2.5.0 && ./configure --prefix=/usr && make && sudo make install
- cd $REPO_DIR
script:
diff --git a/common/pom.xml b/common/pom.xml
index bfef674..e39a276 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -88,37 +88,31 @@
</dependencies>
<build>
+ <extensions>
+ <extension>
+ <groupId>kr.motd.maven</groupId>
+ <artifactId>os-maven-plugin</artifactId>
+ <version>${os.plugin.version}</version>
+ </extension>
+ </extensions>
<plugins>
<plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>${maven-antrun-plugin.version}</version>
+ <groupId>org.xolstice.maven.plugins</groupId>
+ <artifactId>protobuf-maven-plugin</artifactId>
+ <version>${protobuf.plugin.version}</version>
<executions>
<execution>
+ <id>compile-protoc</id>
<phase>generate-sources</phase>
- <id>default-cli</id>
- <configuration>
- <target>
- <mkdir dir="${project.build.directory}/generated-sources/proto" />
- <path id="proto.path">
- <fileset dir="src/main/proto">
- <include name="**/*.proto" />
- </fileset>
- </path>
- <pathconvert pathsep=" " property="proto.files" refid="proto.path" />
- <exec executable="${protoc.path}protoc" failonerror="true">
- <arg value="--java_out=${project.build.directory}/generated-sources/proto" />
- <arg value="-I${project.basedir}/src/main/proto" />
- <arg line="${proto.files}" />
- </exec>
- </target>
- </configuration>
<goals>
- <goal>run</goal>
+ <goal>compile</goal>
</goals>
+ <configuration>
+ <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+ </configuration>
</execution>
</executions>
</plugin>
-
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
diff --git a/pom.xml b/pom.xml
index 788f3a0..fa25a57 100644
--- a/pom.xml
+++ b/pom.xml
@@ -182,7 +182,8 @@
<log4j.version>1.2.17</log4j.version>
<netty.version>3.2.6.Final</netty.version>
<protobuf.version>2.5.0</protobuf.version>
- <protoc.path></protoc.path>
+ <protobuf.plugin.version>0.6.1</protobuf.plugin.version>
+ <os.plugin.version>1.6.2</os.plugin.version>
<junit.version>4.13</junit.version>
<mockito.version>1.9.5</mockito.version>
<disruptor.version>3.2.0</disruptor.version>