You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by sa...@apache.org on 2006/03/03 18:56:59 UTC

svn commit: r382903 - /webservices/commons/modules/policy/maven.xml

Author: sanka
Date: Fri Mar  3 09:56:58 2006
New Revision: 382903

URL: http://svn.apache.org/viewcvs?rev=382903&view=rev
Log:
Adding dist-src target in maven.xml

Modified:
    webservices/commons/modules/policy/maven.xml

Modified: webservices/commons/modules/policy/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/policy/maven.xml?rev=382903&r1=382902&r2=382903&view=diff
==============================================================================
--- webservices/commons/modules/policy/maven.xml (original)
+++ webservices/commons/modules/policy/maven.xml Fri Mar  3 09:56:58 2006
@@ -28,6 +28,9 @@
     xmlns:velocity="jelly:velocity"
     >
 
+    <j:set var="dist.name" value="${pom.artifactId}-${pom.currentVersion}"/>
+    <ant:property name="build.dist.dir" value="${maven.build.dir}/dist"/>
+    
     <!-- ==================== -->
     <!-- Default Global Goals -->
     <!-- ==================== -->
@@ -44,5 +47,37 @@
         <attainGoal name="clean"/>
         <attainGoal name="build"/>
     </goal>
-
-</project>
+    
+    <!-- ================================================================ -->
+    <!--- Create the Source Distribution -->
+    <!-- ================================================================ -->
+    
+    <goal name="dist-src">
+        <ant:property name="dist.src.tmp.dir" value="${build.dist.dir}/tmp"/>
+	
+	<mkdir dir="${build.dist.dir}" />
+	
+	<ant:copy todir="${dist.src.tmp.dir}">
+		<ant:fileset dir=".">
+			<ant:include name="**"/>
+			<ant:exclude name="**/target/**"/>
+			<ant:exclude name="**/.svn/**"/>
+			<ant:exclude name="**/bin/**"/>
+			<ant:exclude name=".*"/>
+			<!-- <ant:exclude name="**/*.license"/> -->
+		</ant:fileset>
+        </ant:copy>
+	
+	<ant:zip file="${build.dist.dir}/${dist.name}-src.zip" basedir="${dist.src.tmp.dir}"/>
+	
+	<ant:tar tarfile="${build.dist.dir}/${dist.name}-src.tar" basedir="${dist.src.tmp.dir}"/>
+		
+	<ant:gzip src="${build.dist.dir}/${dist.name}-src.tar" zipfile="${build.dist.dir}/${dist.name}-src.tar.gz"/>
+	 
+	<ant:delete dir = "${dist.src.tmp.dir}"/>
+	
+	<ant:delete file="${build.dist.dir}/${dist.name}-src.tar"/>
+	
+     </goal>
+ 
+</project>
\ No newline at end of file