incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1369463 - in /incubator/easyant/plugins/trunk/package-war/src: main/resources/package-war.ant test/antunit/package-war-test.xml
Date Sat, 04 Aug 2012 21:22:33 GMT
Author: jlboudart
Date: Sat Aug  4 21:22:33 2012
New Revision: 1369463

URL: http://svn.apache.org/viewvc?rev=1369463&view=rev
Log:
package-jar plugin can now handle either cache.main.classpath or lib.main.fileset

Modified:
    incubator/easyant/plugins/trunk/package-war/src/main/resources/package-war.ant
    incubator/easyant/plugins/trunk/package-war/src/test/antunit/package-war-test.xml

Modified: incubator/easyant/plugins/trunk/package-war/src/main/resources/package-war.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/package-war/src/main/resources/package-war.ant?rev=1369463&r1=1369462&r2=1369463&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/package-war/src/main/resources/package-war.ant (original)
+++ incubator/easyant/plugins/trunk/package-war/src/main/resources/package-war.ant Sat Aug
 4 21:22:33 2012
@@ -15,6 +15,7 @@
    limitations under the License.
 -->
 <project name="org.apache.easyant.plugins#package-war"
+    xmlns:ac="antlib:net.sf.antcontrib"
     xmlns:ea="antlib:org.apache.easyant">
 
     <ea:core-version requiredrevision="[0.9,+]" />
@@ -49,11 +50,21 @@
     </target>
 
     <target name="-package-war:prepare-war" depends="package-war:init">
-        <!-- copy cache main classpath to a temp directory and build the corresponding
fileset -->
         <mkdir dir="${target.webinf.lib.dir}"/>
-        <copy todir="${target.webinf.lib.dir}" flatten="true">
-            <path refid="cache.main.classpath"/>
-        </copy>
+        <!-- check if cache.main.classpath is defined otherwise use lib.main.fileset -->
+        <ac:if>
+            <isreference refid="cache.main.classpath"/>
+            <ac:then>
+                <copy todir="${target.webinf.lib.dir}" flatten="true">
+                    <path refid="cache.main.classpath"/>
+                </copy>
+            </ac:then>
+            <ac:else>
+                <copy todir="${target.webinf.lib.dir}" flatten="true">
+                    <fileset refid="lib.main.fileset"/>
+                </copy>
+            </ac:else>
+        </ac:if>
         <fileset id="webinf.lib.fileset" dir="${target.webinf.lib.dir}"/>
     </target>
 

Modified: incubator/easyant/plugins/trunk/package-war/src/test/antunit/package-war-test.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/package-war/src/test/antunit/package-war-test.xml?rev=1369463&r1=1369462&r2=1369463&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/package-war/src/test/antunit/package-war-test.xml (original)
+++ incubator/easyant/plugins/trunk/package-war/src/test/antunit/package-war-test.xml Sat
Aug  4 21:22:33 2012
@@ -39,8 +39,6 @@
        <mkdir dir="${target.main.classes}"/>
        <property name="manifest.file" value="${target}/MANIFEST.MF"/>
        <echo file="${manifest.file}"/>
-       <!--FIXME: this doesn't seems extensible-->
-       <path id="cache.main.classpath"/>
        <property name="project.ivy.instance" value="project.ivy.instance"/>
        <ivy:settings id="project.ivy.instance"/>
        <ivy:resolve file="sample-module.ivy" settingsRef="project.ivy.instance"/>



Mime
View raw message