Index: plugin.jelly
===================================================================
RCS file: /home/cvspublic/maven-plugins/dist/plugin.jelly,v
retrieving revision 1.20
diff -u -r1.20 plugin.jelly
--- plugin.jelly	3 Jul 2004 18:08:21 -0000	1.20
+++ plugin.jelly	14 Mar 2005 19:16:13 -0000
@@ -282,4 +282,63 @@
     />
 
   </goal>
+  
+  
+  
+   <goal name="mevenide:src-distribution"
+         description="Create a source distribution jar, useful in IDEs, when debugging from 3rd party code, to view the source etc.">
+    <!-- Copy Source -->
+    <j:set var="internal.src.jar" value="${maven.build.dir}/${maven.final.name}.src.jar"/>
+    <j:set var="maven.src.destdir" value="${maven.build.dir}/src-dist"/>
+    <ant:mkdir dir="${maven.src.destdir}"/>
+    <util:available file="${pom.build.sourceDirectory}">
+      <ant:copy todir="${maven.src.destdir}">
+        <ant:fileset dir="${pom.build.sourceDirectory}" />
+      </ant:copy>
+    </util:available>  
+    <j:if test="${!pom.build.resources.isEmpty()}">
+      <maven:copy-resources
+        resources="${pom.build.resources}"
+        todir="${maven.src.destdir}"/>
+    </j:if>
+    <j:set var="maven.src.final.name" 
+           value="${internal.src.jar}" />   
+    <ant:jar 
+         destfile="${maven.src.final.name}"
+         basedir="${maven.src.destdir}"         
+         update="true">
+    </ant:jar>
+
+     
+   </goal>
+   
+  <!--==================================================================-->
+  <!-- Install the src jar in the local repository                          -->
+  <!--==================================================================-->    
+  <goal name="mevenide:src-distribution-install"
+        prereqs="mevenide:src-distribution"
+        description="Install the jar containing sources in the local repository">
+     
+     <artifact:install
+        artifact="${maven.src.final.name}"
+        type="src.jar"
+        project="${pom}"/> 
+  
+  </goal>  
+  
+  <!--==================================================================-->
+  <!-- Deploys the javadoc to the remote repository                         -->
+  <!--==================================================================-->      
+  <goal name="mevenide:src-distribution-deploy" 
+        prereqs="mevenide:src-distribution" 
+        description="Deploys the jar containing sources to the remote repository">
+     <artifact:deploy
+        artifact="${maven.src.final.name}"
+        type="src.jar"
+        project="${pom}"/>   
+        
+  </goal>         
+  
+  
+  
 </project>

