Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ANT <delete> not working

Status
Not open for further replies.

facemann

Programmer
May 19, 2005
9
US
My ANT script gives output for every section except the <delete>. It also doesn't really delete the desired directories. I can't figure this out! >:-[

<?xml version="1.0"?>

<project name="loginExample" default="all" basedir=".">

<!-- ***************************************************************** -->
<!-- INITIALIZATION AND CLEANUP -->
<!-- ***************************************************************** -->


<!-- Initialization needed for any target -->

<target name="init">
<property name="name" value="loginExample" />
<property name="src.dir" value="src" />
<property name="lib.dir" value="lib" />
<property name="etc.dir" value="etc" />
<property name="build.dir" value="build" />
<property name="orion.dir" value="C:/orion" />
<property name="build.compiler" value="modern" />
</target>


<!-- Removes all generated files and directories -->

<target name="clean" depends="init">
<del dir="${lib.dir}" />
<del dir="${build.dir}" />
</target>


<!-- Prepares any other build target by creating the expected directory
structure. -->

<target name="prepare" depends="init">
<mkdir dir="${lib.dir}" />
<mkdir dir="${lib.dir}/ejb" />
<mkdir dir="${lib.dir}/ejb/META-INF" />
<mkdir dir="${lib.dir}/web" />
<mkdir dir="${lib.dir}/web/WEB-INF" />
<mkdir dir="${lib.dir}/web/WEB-INF/classes" />
<mkdir dir="${lib.dir}/j2ee" />
<mkdir dir="${lib.dir}/META-INF" />
<mkdir dir="${build.dir}" />
</target>

bla, bla, bla, bla,
</project>
 
Fixed it. :)
Changed <target name="prepare" depends="init">
to
<target name="prepare" depends="clean">

hehehe
¯\(©¿©)/¯ <SHRUG>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top