incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1369453 - 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:18:50 GMT
Author: jlboudart
Date: Sat Aug  4 21:18:49 2012
New Revision: 1369453

URL: http://svn.apache.org/viewvc?rev=1369453&view=rev
Log:
Add abstract package module and update test cases

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=1369453&r1=1369452&r2=1369453&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:18:49 2012
@@ -19,21 +19,18 @@
 
     <ea:core-version requiredrevision="[0.9,+]" />
 
-    <extension-point name="package-war:war-ready" />
+    <ea:import mrid="org.apache.easyant.plugins#abstract-package;0.9"/>
 
-    <target name="package-war:init">
+    <target name="package-war:init" depends="abstract-package:init,abstract-package:compute-metainf">
         <ea:parameter property="target.artifacts.main.war.name" default="${module.name}.war"
description="main artifact file name" />
-        <ea:parameter property="target.artifacts" default="${target}/artifacts" description="destination
directory for target artifacts"/>
         <ea:parameter property="target.main.artifact" default="${target.artifacts}/${target.artifacts.main.war.name}"
description="the location of the main artifact"/>
 
-
         <ea:parameter property="target.main.classes" required="true" 
             description="directory where compiled classes that should be packaged are" />
-
         <ea:parameter property="manifest.file" required="true"
             description="the file used to generate manifest" />
 
-            <ea:parameter property="package.war.includes.pattern" default="**/*" 
+        <ea:parameter property="package.war.includes.pattern" default="**/*" 
             description="Pattern describing files included in the output war" />
         <ea:parameter property="package.war.excludes.pattern" default="" 
             description="Pattern describing files excluded in the output war" />
@@ -46,16 +43,7 @@
         <ea:parameter property="package.war.webxml.file" required="${package.war.needxmlfile}"

             description="The servlet configuration descriptor to use (WEB-INF/web.xml)."/>
 
-        <ea:parameter property="package.metainf.basedir" default="${basedir}" 
-                description="basedir of the metainf fileset"/>
-        <ea:parameter property="package.metainf.includes.pattern" default="NOTICE,LICENSE"

-                description="Pattern describing files included in the META-INF of the package"/>
-        <ea:parameter property="package.metainf.excludes.pattern" default="" 
-                description="Pattern describing files excluded in the META-INF of the package"/>
-
-        <ea:parameter property="target.webinf.lib.dir" default="${target}/war/WEB-INF/lib"

-                description="temp directory used to store artifacts that will be included
in the WEB-INF lib directory"/>
-        <fileset id="package.metainf.fileset" dir="${package.metainf.basedir}" includes="${package.metainf.includes.pattern}"
excludes="${package.metainf.excludes.pattern}"/>
+        <ea:parameter property="target.webinf.lib.dir" default="${target}/war/WEB-INF/lib"
description="temp directory used to store artifacts that will be included in the WEB-INF lib
directory"/>
 
         <mkdir dir="${target.artifacts}" />
     </target>
@@ -69,7 +57,7 @@
         <fileset id="webinf.lib.fileset" dir="${target.webinf.lib.dir}"/>
     </target>
 
-    <target name="package-war:war" depends="package-war:init,-package-war:prepare-war"
description="package project as a WAR">
+    <target name="package-war:war" depends="package-war:init,-package-war:prepare-war"
description="package project as a WAR" extensionOf="abstract-package:package-finished">
         <war destfile="${target.main.artifact}"
                 manifest="${manifest.file}"
                 needxmlfile="false"
@@ -80,7 +68,6 @@
             <classes dir="${target.main.classes}" includes="**/*" erroronmissingdir="false"/>
             <metainf refid="package.metainf.fileset"/>
         </war>
-        <ea:registerartifact type="war" settingsRef="${project.ivy.instance}"/>
     </target>
 
 </project>

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=1369453&r1=1369452&r2=1369453&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:18:49 2012
@@ -39,6 +39,7 @@
        <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"/>
@@ -48,7 +49,6 @@
 
     <target name="test-package-war:init" depends="package-war:init">
         <au:assertPropertyEquals name="target.artifacts.main.war.name" value="${module.name}.war"/>
-        <au:assertPropertyEquals name="target.artifacts" value="${target}/artifacts"/>
         <au:assertPropertyEquals name="target.main.artifact" value="${target.artifacts}/${target.artifacts.main.war.name}"/>
         <au:assertPropertyEquals name="package.war.includes.pattern" value="**/*"/>
         <au:assertPropertyEquals name="package.war.excludes.pattern" value=""/>
@@ -57,11 +57,7 @@
 <!--TODO:Test this property 
         <au:assertPropertyNotSet name="package.war.webxml.file" />
 -->
-        <au:assertPropertyEquals name="package.metainf.basedir" value="${basedir}"/>
-        <au:assertPropertyEquals name="package.metainf.includes.pattern" value="NOTICE,LICENSE"/>
-        <au:assertPropertyEquals name="package.metainf.excludes.pattern" value=""/>
         <au:assertPropertyEquals name="target.webinf.lib.dir" value="${target}/war/WEB-INF/lib"/>
-        <au:assertReferenceSet refid="package.metainf.fileset"/>
         <au:assertFileExists file="${target.artifacts}"/>
     </target>
 



Mime
View raw message