You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by br...@apache.org on 2013/10/28 19:28:33 UTC

svn commit: r1536472 - /hive/branches/maven/ql/pom.xml

Author: brock
Date: Mon Oct 28 18:28:32 2013
New Revision: 1536472

URL: http://svn.apache.org/r1536472
Log:
HIVE-5673 - Create profile to generate protobuf

Modified:
    hive/branches/maven/ql/pom.xml

Modified: hive/branches/maven/ql/pom.xml
URL: http://svn.apache.org/viewvc/hive/branches/maven/ql/pom.xml?rev=1536472&r1=1536471&r2=1536472&view=diff
==============================================================================
--- hive/branches/maven/ql/pom.xml (original)
+++ hive/branches/maven/ql/pom.xml Mon Oct 28 18:28:32 2013
@@ -220,6 +220,39 @@
         </dependency>
       </dependencies>
     </profile>
+    <profile>
+      <id>protobuf</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>generate-protobuf-sources</id>
+                <phase>generate-sources</phase>
+                <configuration>
+                  <target>
+                    <property name="protobuf.src.dir"  location="${basedir}/src/protobuf"/>
+                    <property name="protobuf.build.dir"  location="${basedir}/src/gen/protobuf/gen-java"/>
+                    <echo>Building ORC Protobuf</echo>
+                    <mkdir dir="${protobuf.build.dir}"/>
+                    <exec executable="protoc" failonerror="true">
+                      <arg value="--java_out=${protobuf.build.dir}"/>
+                      <arg value="-I=${protobuf.src.dir}/org/apache/hadoop/hive/ql/io/orc"/>
+                      <arg value="${protobuf.src.dir}/org/apache/hadoop/hive/ql/io/orc/orc_proto.proto"/>
+                    </exec>
+                  </target>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 
   <build>