sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject git commit: SQOOP-514 Layout changes for Sqoop 2 distribution (Jarek Jarcec Cecho)
Date Tue, 13 Nov 2012 18:52:11 GMT
Updated Branches:
  refs/heads/sqoop2 5f95f114f -> 54a9ce415


SQOOP-514 Layout changes for Sqoop 2 distribution
(Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/54a9ce41
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/54a9ce41
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/54a9ce41

Branch: refs/heads/sqoop2
Commit: 54a9ce4154bc097bdab51aad9b79e2572c906d84
Parents: 5f95f11
Author: Bilung Lee <blee@apache.org>
Authored: Tue Nov 13 10:47:54 2012 -0800
Committer: Bilung Lee <blee@apache.org>
Committed: Tue Nov 13 10:47:54 2012 -0800

----------------------------------------------------------------------
 dist/pom.xml |  114 ++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 91 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/54a9ce41/dist/pom.xml
----------------------------------------------------------------------
diff --git a/dist/pom.xml b/dist/pom.xml
index ede3be7..8182347 100644
--- a/dist/pom.xml
+++ b/dist/pom.xml
@@ -23,7 +23,7 @@ limitations under the License.
 
   <properties>
     <tomcat.majorVersion>6</tomcat.majorVersion>
-    <tomcat.minorVersion>0.35</tomcat.minorVersion>
+    <tomcat.minorVersion>0.36</tomcat.minorVersion>
     <tomcat.version>${tomcat.majorVersion}.${tomcat.minorVersion}</tomcat.version>
   </properties>
 
@@ -53,9 +53,14 @@ limitations under the License.
     </dependency>
   </dependencies>
 
+  <!--
+  TODO(jarcec): Binary tarball should publish build documentation
+  -->
+
   <profiles>
+    <!-- Build source distribution (activated by default) -->
     <profile>
-      <id>dist</id>
+      <id>source</id>
       <activation>
         <activeByDefault>true</activeByDefault>
       </activation>
@@ -72,48 +77,112 @@ limitations under the License.
                 </goals>
                 <configuration>
                   <target>
-                    <!-- clean up -->
+                    <!-- Clean up -->
                     <delete dir="target/sqoop-${project.version}"/>
                     <delete file="target/sqoop-${project.version}.tar.gz"/>
-                    <!-- create dist dir -->
+
+                    <!-- Copy sources over -->
+                    <copy todir="target/sqoop-${project.version}" includeEmptyDirs="false"
flatten="false">
+                      <fileset dir="../">
+                        <include name="**/*" />
+                        <exclude name="build/**" />
+                        <exclude name="**/target/**" />
+                        <exclude name=".git/**" />
+                        <exclude name="tags" />
+                        <exclude name=".project" />
+                        <exclude name=".classpath" />
+                      </fileset>
+                    </copy>
+
+                    <!-- Create dist dir -->
                     <mkdir dir="target/sqoop-${project.version}"/>
 
-                    <!-- server -->
+                    <!-- Create final distribution tar -->
+                    <tar destfile="target/sqoop-${project.version}.tar.gz" compression="gzip">
+                      <tarfileset dir="target/sqoop-${project.version}" prefix="sqoop-${project.version}"/>
+                    </tar>
+                  </target>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+    <!-- Build binary distribution (activated by -Pbinary) -->
+    <profile>
+      <id>binary</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>package</phase>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <configuration>
+                  <target>
+                    <!-- Clean up -->
+                    <delete dir="target/sqoop-${project.version}-bin"/>
+                    <delete file="target/sqoop-${project.version}-bin.tar.gz"/>
+
+                    <!-- Create dist dir -->
+                    <mkdir dir="target/sqoop-${project.version}-bin"/>
+
+
+                    <!-- Copy sources over -->
+                    <copy todir="target/sqoop-${project.version}-bin" includeEmptyDirs="false"
flatten="false">
+                      <fileset dir="../">
+                        <include name="**/*" />
+                        <exclude name="build/**" />
+                        <exclude name="**/target/**" />
+                        <exclude name=".git/**" />
+                        <exclude name="tags" />
+                        <exclude name=".project" />
+                        <exclude name=".classpath" />
+                      </fileset>
+                    </copy>
+
+                    <!-- Build server directory -->
                     <get src="http://archive.apache.org/dist/tomcat/tomcat-${tomcat.majorVersion}/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz"
                          dest="target/apache-tomcat.tar.gz" verbose="true" skipexisting="true"/>
                     <untar src="target/apache-tomcat.tar.gz" dest="target" compression="gzip"/>
-                    <move file="target/apache-tomcat-${tomcat.version}" tofile="target/sqoop-${project.version}/server"/>
-                    <copy todir="target/sqoop-${project.version}/server/bin">
+                    <move file="target/apache-tomcat-${tomcat.version}" tofile="target/sqoop-${project.version}-bin/server"/>
+                    <copy todir="target/sqoop-${project.version}-bin/server/bin">
                       <fileset dir="src/main/server/bin"/>
                     </copy>
-                    <chmod dir="target/sqoop-${project.version}/server/bin" perm="u+x"
includes="**/*.sh"/>
-                    <copy todir="target/sqoop-${project.version}/server/conf">
+                    <chmod dir="target/sqoop-${project.version}-bin/server/bin" perm="u+x"
includes="**/*.sh"/>
+                    <copy todir="target/sqoop-${project.version}-bin/server/conf">
                       <fileset dir="src/main/server/conf"/>
                     </copy>
-                    <delete dir="target/sqoop-${project.version}/server/webapps"/>
-                    <mkdir dir="target/sqoop-${project.version}/server/webapps"/>
-                    <copy todir="target/sqoop-${project.version}/server/webapps">
+                    <delete dir="target/sqoop-${project.version}-bin/server/webapps"/>
+                    <mkdir dir="target/sqoop-${project.version}-bin/server/webapps"/>
+                    <copy todir="target/sqoop-${project.version}-bin/server/webapps">
                       <fileset dir="src/main/server/webapps"/>
                     </copy>
                     <copy file="../server/target/sqoop.war"
-                          toDir="target/sqoop-${project.version}/server/webapps"/>
+                          toDir="target/sqoop-${project.version}-bin/server/webapps"/>
 
-                    <!-- client -->
-                    <copy todir="target/sqoop-${project.version}/client/lib">
+                    <!-- Build client directory -->
+                    <copy todir="target/sqoop-${project.version}-bin/client/lib">
                       <fileset dir="../client/target/lib"/>
                     </copy>
                     <copy file="../client/target/sqoop-client-${project.version}.jar"
-                          toDir="target/sqoop-${project.version}/client/lib"/>
+                          toDir="target/sqoop-${project.version}-bin/client/lib"/>
 
-                    <!-- binary -->
-                    <copy todir="target/sqoop-${project.version}/bin">
+                    <!-- Build "bin" directory -->
+                    <copy todir="target/sqoop-${project.version}-bin/bin">
                       <fileset dir="src/main/bin"/>
                     </copy>
-                    <chmod dir="target/sqoop-${project.version}/bin" perm="u+x" includes="**/*.sh"/>
+                    <chmod dir="target/sqoop-${project.version}-bin/bin" perm="u+x" includes="**/*.sh"/>
 
-                    <!-- create dist tar -->
-                    <tar destfile="target/sqoop-${project.version}.tar.gz" compression="gzip">
-                      <tarfileset dir="target/sqoop-${project.version}" prefix="sqoop-${project.version}"/>
+                    <!-- Finally create distribution tar -->
+                    <tar destfile="target/sqoop-${project.version}-bin.tar.gz" compression="gzip">
+                      <tarfileset dir="target/sqoop-${project.version}-bin" prefix="sqoop-${project.version}"/>
                     </tar>
                   </target>
                 </configuration>
@@ -124,5 +193,4 @@ limitations under the License.
       </build>
     </profile>
   </profiles>
-
 </project>


Mime
View raw message