CVS: jcontainer/dna/tools maven.xml,1.1,1.2

Peter Donald <pdonald-yCVjj/[email protected]> Wed, 12 Nov 2003 21:02:19 -0600
Newsgroups gmane.comp.java.jcontainer.cvs
Message-ID <[email protected]>
Update of /cvsroot/jcontainer/jcontainer/dna/tools
In directory hogshead.codehaus.org:/tmp/cvs-serv14278/dna/tools

Modified Files:
	maven.xml 
Log Message:
Rework so that the plugin is installed and deployed with appropriate goals

Index: maven.xml
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/dna/tools/maven.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- maven.xml	6 Oct 2003 14:23:03 -0000	1.1
+++ maven.xml	13 Nov 2003 03:02:17 -0000	1.2
@@ -1,5 +1,6 @@
 <?xml version="1.0"?>
 <project default="main"
+    xmlns:deploy="deploy"
     xmlns:ant="jelly:ant">
 
     <goal name="main">
@@ -8,10 +9,31 @@
 
     <goal name="build">
         <attainGoal name="jar:install"/>
+        <attainGoal name="install"/>
     </goal>
 
     <goal name="deploy">
         <attainGoal name="jar:deploy"/>
+        <attainGoal name="plugin:deploy"/>
+        <ant:property name="artifact" value="${maven.final.name}.jar"/>
+        <deploy:artifact
+            artifact="${maven.build.dir}/${artifact}"
+            type="plugins"
+            assureDirectoryCommand="mkdir -p"
+            siteCommand="cd @deployDirectory@; chmod g+w ${artifact}; chgrp ${maven.remote.group} ${artifact}"/>
+    </goal>
+
+    <goal name="install">
+        <attainGoal name="plugin:install"/>
+        <ant:copy file="${maven.build.dir}/${maven.final.name}.jar"
+            todir="${maven.repo.local}/${pom.groupId}/plugins"/>
+        <ant:delete dir="${maven.home}/plugins/${maven.final.name}.jar"/>
+        <ant:delete dir="${maven.home}/plugins/${maven.final.name}"/>
+        <ant:delete>
+            <ant:fileset dir="${maven.home}/plugins">
+                <ant:include name="${pom.artifactID}-*"/>
+            </ant:fileset>
+        </ant:delete>
     </goal>
 
 </project>