parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject [parquet-mr] branch master updated: PARQUET-1280: [parquet-protobuf] Use maven protoc plugin (#506)
Date Mon, 14 Jan 2019 09:59:18 GMT
This is an automated email from the ASF dual-hosted git repository.

gabor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-mr.git


The following commit(s) were added to refs/heads/master by this push:
     new 6eb99bd  PARQUET-1280: [parquet-protobuf] Use maven protoc plugin (#506)
6eb99bd is described below

commit 6eb99bdb914274a5905f11b8560b458162031d78
Author: nandorKollar <nandorKollar@users.noreply.github.com>
AuthorDate: Mon Jan 14 10:59:13 2019 +0100

    PARQUET-1280: [parquet-protobuf] Use maven protoc plugin (#506)
---
 parquet-protobuf/pom.xml | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/parquet-protobuf/pom.xml b/parquet-protobuf/pom.xml
index 3540a04..9e5d8fe 100644
--- a/parquet-protobuf/pom.xml
+++ b/parquet-protobuf/pom.xml
@@ -32,8 +32,6 @@
   <properties>
     <elephant-bird.version>4.4</elephant-bird.version>
     <protobuf.version>3.5.1</protobuf.version>
-    <!-- allow using protoc from an alternative path -->
-    <protoc.path>protoc</protoc.path>
   </properties>
 
 
@@ -159,28 +157,24 @@
       </plugin>
 
       <plugin>
-        <artifactId>maven-antrun-plugin</artifactId>
+        <groupId>com.github.os72</groupId>
+        <artifactId>protoc-jar-maven-plugin</artifactId>
+        <version>3.6.0.1</version>
         <executions>
           <execution>
             <id>generate-sources</id>
             <phase>generate-test-sources</phase>
-            <configuration>
-              <tasks>
-                <mkdir dir="${project.build.directory}/generated-test-sources" />
-                <mkdir dir="${project.build.directory}/generated-test-sources/java" />
-                <exec failonerror="true" executable="${protoc.path}">
-                  <arg value="--java_out=${project.build.directory}/generated-test-sources/java"
/>
-                  <arg value="src/test/resources/TestProtobuf.proto" />
-                  <arg value="src/test/resources/TestProto3.proto" />
-                  <arg value="-I." />
-                </exec>
-              </tasks>
-              <sourceRoot>src/main/java</sourceRoot>
-              <sourceRoot>target/generated-sources/java</sourceRoot>
-            </configuration>
             <goals>
               <goal>run</goal>
             </goals>
+            <configuration>
+              <protocVersion>${protobuf.version}</protocVersion>
+              <addProtoSources>all</addProtoSources>
+              <outputDirectory>${project.build.directory}/generated-test-sources/java</outputDirectory>
+              <inputDirectories>
+                <include>src/test/resources</include>
+              </inputDirectories>
+            </configuration>
           </execution>
         </executions>
       </plugin>


Mime
View raw message