Java Reference
In-Depth Information
Example 20.6 Ant build.xml for the BudgetPro servlet and JSP examples
<!-- ================ File and Directory Names ================= -->
<!-- ...
app.name The name of our application, used for file/dir names.
build.home The name of the directory into which the
"compile" target will generate its output.
server.home The name of the directory where the Web server
is installed.
deploy.home The name of the directory into which the WAR file
will be copied.
-->
<property name="server.home" value="/usr/local/jboss" />
<property name="deploy.home"
value="${server.home}/server/default/deploy"/>
<!-- ... -->
<!-- ================ Deploy Target ============================ -->
<!--
The "deploy" target copies the WAR file into a location required
(i.e., defined) by the servlet container. For some servlet
containers, you must restart them before they will recognize our
new/modified Web application. Others may reload automatically.
-->
<target name="deploy" depends="compile"
description="Deploy application to servlet container">
<!-- Copy the contents of the build directory -->
<mkdir dir="${deploy.home}"/>
<copy todir="${deploy.home}" file="${app.name}.war"/>
</target>
<!-- ... -->
<!-- ================ Product WAR file ========================= -->
<target name="war" depends="compile"
description="Create WAR file to be deployed">
<war destfile="${app.name}.war" webxml="web/WEB-INF/web.xml">
<fileset dir="${build.home}"/>
</war>
</target>
Search WWH ::




Custom Search