ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Post <>
Subject RE: Having trouble getting multiple targets to execute
Date Thu, 21 Jun 2001 00:11:44 GMT
It seems to me that if you set "compile" as your default target, then "init"
should execute. However, if your default target is "init", then that will be
the only target to execute in your build file. 

-----Original Message-----
From: Allan McNeil []
Sent: Wednesday, June 20, 2001 5:03 PM
Subject: Having trouble getting multiple targets to execute

I can only get the default target to execute.
Subsequent target elements are not executed.
Does anyone have any solutions?

Here's the scenario:

My Setup:
OS:  Windows 2000 Professional
Ant Version:  akarta-ant-1.3
JDK Version:  1.3.1

I have an XML file to create a simple build.
It has 2 target elements.
The default element executes, but the other target element does not.
If I change the default element to be the second target element, then
the second target element executes but not the first one.

Here is my xml file I'm passing to ant:

<project name="GetRequestURI" default="init"

<!-- Set Global Properties For This Build -->
<property name="dir_basedir" value="C:\apps\projects\build" />
<!-- Begin:  Set Directory Names -->
<property name="dir_webapp" value="test1"/>
<property name="dir_web_inf" value="WEB-INF"/>
<property name="dir_images" value="images"/>
<property name="dir_jsp" value="jsp"/>
<property name="dir_meta_inf" value="META-INF"/>
<property name="dir_lib" value="lib"/>
<property name="dir_classes" value="classes"/>
<!-- End:  Set Directory Names -->
<!-- Begin:  Set Java Class Paths -->
<property name="clspth_jdk" value="C:\jdk1.3.1" />
<property name="clspth_Tomcat_Servlet"
<property name="clspth_GetRequestURI"
<!-- End:  Set Java Class Paths -->

<!-- Begin:  Set Java Destination Paths -->
<property name="destpth_GetRequestURI"
<!-- End:  Set Java Destination Paths -->
<!-- End:  Set Global Properties For This Build -->

<target name="init">
<!-- Create the time stamp -->
<!-- Create the directory structure for a tomcat web application -->
<mkdir dir="${dir_webapp}"/>
<mkdir dir="${dir_webapp}\${dir_web_inf}"/>	
<mkdir dir="${dir_webapp}\${dir_web_inf}\${dir_classes}"/>
<mkdir dir="${dir_webapp}\${dir_web_inf}\${dir_lib}"/>
<mkdir dir="${dir_webapp}\${dir_meta_inf}"/>
<mkdir dir="${dir_webapp}\${dir_jsp}"/>
<mkdir dir="${dir_webapp}\${dir_images}"/>	

<target name="compile" depends="init">
<javac 	srcdir="${clspth_GetRequestURI}"

Allan M. - email

FREE voicemail, email, and fax...all in one place.
Sign Up Now!

View raw message