hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1183068 - /hadoop/common/trunk/hadoop-mapreduce-project/pom.xml
Date Thu, 13 Oct 2011 20:23:59 GMT
Author: tucu
Date: Thu Oct 13 20:23:59 2011
New Revision: 1183068

URL: http://svn.apache.org/viewvc?rev=1183068&view=rev
Log:
HADOOP-7737. normalize hadoop-mapreduce & hadoop-dist dist/tar build with common/hdfs
(tucu)

Modified:
    hadoop/common/trunk/hadoop-mapreduce-project/pom.xml

Modified: hadoop/common/trunk/hadoop-mapreduce-project/pom.xml
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/pom.xml?rev=1183068&r1=1183067&r2=1183068&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/pom.xml (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/pom.xml Thu Oct 13 20:23:59 2011
@@ -302,6 +302,33 @@
               <goal>run</goal>
             </goals>
           </execution>
+          <execution>
+            <id>tar</id>
+            <phase>package</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <!-- this is identical from hadoop-project-dist, eventually they must be
unified -->
+              <target if="tar">
+                <!-- Using Unix script to preserve symlinks -->
+                <echo file="${project.build.directory}/dist-maketar.sh">
+
+                  which cygpath 2> /dev/null
+                  if [ $? = 1 ]; then
+                    BUILD_DIR="${project.build.directory}"
+                  else
+                    BUILD_DIR=`cygpath --unix '${project.build.directory}'`
+                  fi
+                  cd $BUILD_DIR
+                  tar czf ${project.artifactId}-${project.version}.tar.gz ${project.artifactId}-${project.version}
+                </echo>
+                <exec executable="sh" dir="${project.build.directory}" failonerror="true">
+                  <arg line="./dist-maketar.sh"/>
+                </exec>
+              </target>
+            </configuration>
+          </execution>
         </executions>
       </plugin>
       <plugin>
@@ -321,35 +348,6 @@
         </executions>
       </plugin>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <dependencies>
-          <dependency>
-            <groupId>org.apache.hadoop</groupId>
-            <artifactId>hadoop-assemblies</artifactId>
-            <version>${hadoop.assemblies.version}</version>
-          </dependency>
-        </dependencies>
-        <configuration>
-          <tarLongFileMode>gnu</tarLongFileMode>
-          <appendAssemblyId>false</appendAssemblyId>
-          <attach>false</attach>
-          <finalName>${project.artifactId}-${project.version}</finalName>
-          <descriptorRefs>
-            <descriptorRef>hadoop-mapreduce-dist</descriptorRef>
-          </descriptorRefs>
-        </configuration>
-        <executions>
-          <execution>
-            <id>tar</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <groupId>com.atlassian.maven.plugins</groupId>
         <artifactId>maven-clover2-plugin</artifactId>
         <executions>
@@ -401,6 +399,45 @@
             </executions>
           </plugin>
         </plugins>
+      </build>      
+    </profile>
+    <profile>
+      <id>dist</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-assembly-plugin</artifactId>
+            <dependencies>
+              <dependency>
+                <groupId>org.apache.hadoop</groupId>
+                <artifactId>hadoop-assemblies</artifactId>
+                <version>${project.version}</version>
+              </dependency>
+            </dependencies>
+            <configuration>
+              <tarLongFileMode>gnu</tarLongFileMode>
+              <appendAssemblyId>false</appendAssemblyId>
+              <attach>false</attach>
+              <finalName>${project.artifactId}-${project.version}</finalName>
+              <descriptorRefs>
+                <descriptorRef>hadoop-mapreduce-dist</descriptorRef>
+              </descriptorRefs>
+            </configuration>
+            <executions>
+              <execution>
+                <id>dist</id>
+                <phase>prepare-package</phase>
+                <goals>
+                  <goal>single</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
       </build>
     </profile>
   </profiles>



Mime
View raw message