CVS: jcontainer/loom/plugins/maven-sar plugin.jelly,1.8,1.9

mauro-yCVjj/[email protected] Sun, 23 Nov 2003 06:08:09 -0600
Newsgroups gmane.comp.java.jcontainer.cvs
Message-ID <[email protected]>
Update of /cvsroot/jcontainer/jcontainer/loom/plugins/maven-sar
In directory hogshead.codehaus.org:/tmp/cvs-serv22308/loom/plugins/maven-sar

Modified Files:
	plugin.jelly 
Log Message:
Ensure Sar descriptor files always have mandated names
(except logging files).
Corrected handling of no logging file specified.

Index: plugin.jelly
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/plugins/maven-sar/plugin.jelly,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- plugin.jelly	22 Nov 2003 16:41:40 -0000	1.8
+++ plugin.jelly	23 Nov 2003 12:07:36 -0000	1.9
@@ -8,6 +8,7 @@
 
     <j:set var="maven.sar.final.name" value="${pom.artifactId}.sar"/>
     <j:set var="metagenerate" value='${context.getVariable("maven.sar.metagenerate")}'/>
+    <j:set var="logging" value='${context.getVariable("maven.sar.logging")}'/>
 
     <!--==================================================================-->
     <!-- Default goal : Builds a sar file                                 -->
@@ -56,10 +57,12 @@
         <ant:mkdir dir="${maven.sar.build.dir}"/>
         <ant:jar destfile="${maven.sar.build.dir}/${maven.sar.final.name}">
         	<!-- Add Sar descriptor files to SAR-INF/ -->
-        	<ant:zipfileset file="${maven.sar.assembly}" prefix="SAR-INF/"/>
-        	<ant:zipfileset file="${maven.sar.config}" prefix="SAR-INF/"/>
-        	<ant:zipfileset file="${maven.sar.environment}" prefix="SAR-INF/"/>
-        	<ant:zipfileset file="${maven.sar.logging}" prefix="SAR-INF/"/>
+        	<ant:zipfileset file="${maven.sar.assembly}" fullpath="SAR-INF/assembly.xml"/>
+        	<ant:zipfileset file="${maven.sar.config}" fullpath="SAR-INF/config.xml"/>
+        	<ant:zipfileset file="${maven.sar.environment}" fullpath="SAR-INF/environment.xml"/>
+        	<j:if test="${!empty(logging)}">
+        		<ant:zipfileset file="${logging}" prefix="SAR-INF/"/>
+            </j:if>
             <!-- Add build artifacts -->
             <ant:lib dir="${maven.sar.build.dir}">
                 <ant:include name="${maven.sar.lib.include}"/>