hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1212615 - in /hadoop/common/trunk/hadoop-common-project/hadoop-common: ./ src/main/java/org/apache/hadoop/ipc/protobuf/ src/main/proto/ src/proto/ src/test/java/org/apache/hadoop/ipc/protobuf/
Date Fri, 09 Dec 2011 20:37:58 GMT
Author: tucu
Date: Fri Dec  9 20:37:57 2011
New Revision: 1212615

URL: http://svn.apache.org/viewvc?rev=1212615&view=rev
Log:
HADOOP-7899. Generate proto java files as part of the build. (tucu)

Added:
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/proto/
      - copied from r1212613, hadoop/common/trunk/hadoop-common-project/hadoop-common/src/proto/
Removed:
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/protobuf/HadoopRpcProtos.java
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/protobuf/package-info.java
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/proto/
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/protobuf/TestProtos.java
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/protobuf/TestRpcServiceProtos.java
Modified:
    hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
    hadoop/common/trunk/hadoop-common-project/hadoop-common/pom.xml

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1212615&r1=1212614&r2=1212615&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Fri Dec  9 20:37:57
2011
@@ -74,6 +74,8 @@ Trunk (unreleased changes)
 
     HADOOP-7886. Add toString to FileStatus. (SreeHari via jghoman)
 
+    HADOOP-7899. Generate proto java files as part of the build. (tucu)
+
   BUGS
 
     HADOOP-7851. Configuration.getClasses() never returns the default value. 

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/pom.xml
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/pom.xml?rev=1212615&r1=1212614&r2=1212615&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/pom.xml (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/pom.xml Fri Dec  9 20:37:57 2011
@@ -295,6 +295,52 @@
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
           <execution>
+            <id>compile-proto</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <echo file="${project.build.directory}/compile-proto.sh">
+                  PROTO_DIR=${basedir}/src/main/proto
+                  ls $PROTO_DIR &amp;> /dev/null
+                  if [ $? = 0 ]; then
+                    JAVA_DIR=${project.build.directory}/generated-sources/java
+                    mkdir -p $JAVA_DIR
+                    ls $PROTO_DIR/*.proto | xargs -n 1 protoc -I$PROTO_DIR --java_out=$JAVA_DIR
+                  fi
+                </echo>
+                <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                  <arg line="./compile-proto.sh"/>
+                </exec>
+              </target>
+            </configuration>
+          </execution>
+          <execution>
+            <id>compile-test-proto</id>
+            <phase>generate-test-sources</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <target>
+                <echo file="${project.build.directory}/compile-test-proto.sh">
+                  PROTO_DIR=${basedir}/src/test/proto
+                  ls $PROTO_DIR &amp;> /dev/null
+                  if [ $? = 0 ]; then
+                    JAVA_DIR=${project.build.directory}/generated-test-sources/java
+                    mkdir -p $JAVA_DIR
+                    ls $PROTO_DIR/*.proto | xargs -n 1 protoc -I$PROTO_DIR --java_out=$JAVA_DIR
+                  fi
+                </echo>
+                <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                  <arg line="./compile-test-proto.sh"/>
+                </exec>
+              </target>
+            </configuration>
+          </execution>
+          <execution>
             <id>save-version</id>
             <phase>generate-sources</phase>
             <goals>



Mime
View raw message