* samples/contacts/build.xml:
Update the way the contacts.war file is built:
1. Grab the necessary libraries from the project's lib/ folder.
2. Remove temporary staging area for WEB-INF/lib/ folder.
3. Delete the contacts.war file at all times, so a fresh
baked copy is always made.
Also renamed project, and changed usage message.
This commit is contained in:
+10
-23
@@ -5,7 +5,7 @@
|
|||||||
$Id$
|
$Id$
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<project name="minimal" basedir="." default="usage">
|
<project name="contacts-sample" basedir="." default="usage">
|
||||||
|
|
||||||
<property file="build.properties"/>
|
<property file="build.properties"/>
|
||||||
<property file="project.properties"/>
|
<property file="project.properties"/>
|
||||||
@@ -28,8 +28,7 @@
|
|||||||
<target name="usage">
|
<target name="usage">
|
||||||
<echo message=""/>
|
<echo message=""/>
|
||||||
<echo message="Contacts sample application build file"/>
|
<echo message="Contacts sample application build file"/>
|
||||||
<echo message="*** Make sure you've copied the required JAR files to the lib directory."/>
|
<echo message="*** Make sure you've followed the instructions for your container in the reference documentation."/>
|
||||||
<echo message="*** See lib/readme.txt for more information."/>
|
|
||||||
<echo message="------------------------------------------------------"/>
|
<echo message="------------------------------------------------------"/>
|
||||||
<echo message=""/>
|
<echo message=""/>
|
||||||
<echo message="Available targets are:"/>
|
<echo message="Available targets are:"/>
|
||||||
@@ -84,21 +83,9 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="warfile" depends="build" description="Build the web application archives">
|
<target name="warfile" depends="build" description="Build the web application archives">
|
||||||
|
|
||||||
<mkdir dir="${dist.dir}"/>
|
<mkdir dir="${dist.dir}"/>
|
||||||
|
<delete file="${dist.dir}/${name}.war"/>
|
||||||
<!-- Temporary staging directory for libs -->
|
|
||||||
<delete dir="${war.dir}/WEB-INF/lib"/>
|
|
||||||
<mkdir dir="${war.dir}/WEB-INF/lib"/>
|
|
||||||
|
|
||||||
<!-- Copy required libs into temporary staging directory -->
|
|
||||||
<copy todir="${war.dir}/WEB-INF/lib">
|
|
||||||
<fileset dir="${lib.dir}/jakarta-taglibs">
|
|
||||||
<include name="standard.jar"/>
|
|
||||||
</fileset>
|
|
||||||
<fileset dir="${lib.dir}/j2ee">
|
|
||||||
<include name="jstl.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<war warfile="${dist.dir}/${name}.war" webxml="${war.dir}/WEB-INF/web.xml">
|
<war warfile="${dist.dir}/${name}.war" webxml="${war.dir}/WEB-INF/web.xml">
|
||||||
<!-- Include the JSPs and other documents -->
|
<!-- Include the JSPs and other documents -->
|
||||||
@@ -108,19 +95,19 @@
|
|||||||
<webinf dir="${war.dir}/WEB-INF">
|
<webinf dir="${war.dir}/WEB-INF">
|
||||||
<!-- We separately include these -->
|
<!-- We separately include these -->
|
||||||
<exclude name="web.xml"/>
|
<exclude name="web.xml"/>
|
||||||
<exclude name="lib/**"/>
|
|
||||||
</webinf>
|
</webinf>
|
||||||
|
|
||||||
<!-- Include the compiled classes -->
|
<!-- Include the compiled classes -->
|
||||||
<classes dir="${build.dir}"/>
|
<classes dir="${build.dir}"/>
|
||||||
|
|
||||||
<!-- Include the temporary staging directory for libs -->
|
<!-- Include required libraries -->
|
||||||
<lib dir = "${war.dir}/WEB-INF/lib"/>
|
<lib dir="${lib.dir}/jakarta-commons" includes="*.jar" excludes="*logging*"/>
|
||||||
|
<lib dir="${lib.dir}/jakarta-taglibs" includes="*.jar"/>
|
||||||
|
<lib dir="${lib.dir}/hsqldb" includes="*.jar"/>
|
||||||
|
<lib dir="${lib.dir}/j2ee" includes="jstl.jar"/>
|
||||||
|
<lib dir="${dist.lib.dir}" includes="acegi-security-taglib.jar"/>
|
||||||
</war>
|
</war>
|
||||||
|
|
||||||
<!-- Remove temporary staging directory -->
|
|
||||||
<delete dir="${war.dir}/WEB-INF/lib"/>
|
|
||||||
|
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="javadoc" description="Generate Javadocs.">
|
<target name="javadoc" description="Generate Javadocs.">
|
||||||
|
|||||||
Reference in New Issue
Block a user