You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by shahnawaz Bagdadi <sb...@netpace.com> on 2000/11/02 20:39:55 UTC

Problem faced when using Ant

Hi ,
      I am using ant to build my stuff and am facing the following problem.
My target is defined as follows in my build.xml file
 <target name="MAIN" depends="WEBSERVER,DOCS,COMPILE,EJB,INIT">
  </target>
i am expecting the init target to be called first followed by
EJB,COMPILE,DOCS and then WEBSERVER.
but it starts WEBSERVER directly and does not do the other target task.
If any of you guys have any idea why this is happening , please throw some
light on it.

Your help is appreciated,

Regards,
Shahnawaz


Re: Problem faced when using Ant

Posted by Scott M Stark <Sc...@displayscape.com>.
Problem faced when using AntIn order for INIT to be called first the WEBSERVER,DOCS,COMPILE,EJB tasks
would have to have a depends="INIT" attribute. I believe there used to be special
treatment of tasks named init such that it would be inovked first, but this is no longer
the case.

----- Original Message ----- 
From: shahnawaz Bagdadi 
To: 'ant-user@jakarta.apache.org' 
Sent: Thursday, November 02, 2000 11:39 AM
Subject: Problem faced when using Ant 


Hi , 
      I am using ant to build my stuff and am facing the following problem. 
My target is defined as follows in my build.xml file 
 <target name="MAIN" depends="WEBSERVER,DOCS,COMPILE,EJB,INIT"> 
  </target> 
i am expecting the init target to be called first followed by EJB,COMPILE,DOCS and then WEBSERVER. 
but it starts WEBSERVER directly and does not do the other target task. 
If any of you guys have any idea why this is happening , please throw some light on it. 
Your help is appreciated, 
Regards,
Shahnawaz 


Re: Problem faced when using Ant

Posted by ma...@tumbleweed.com.
Ant will try to build the 'depends' targets in left-to-right order. If 
that's not what you want, or if your other targets have dependencies of 
their own, then you need to state that in your build file.

My guess is that what you want is something like:

<target name="MAIN" depends="WEBSERVER,DOCS,COMPILE,EJB,INIT"/>
<target name="WEBSERVER" depends="DOCS,COMPILE,EJB,INIT"/>
<target name="DOCS" depends="COMPILE,EJB,INIT"/>
etc.

--
Martin Cooper
Tumbleweed Communications


At 11:39 AM 11/2/00 -0800, shahnawaz Bagdadi wrote:

>Hi ,
>       I am using ant to build my stuff and am facing the following problem.
>My target is defined as follows in my build.xml file
>  <target name="MAIN" depends="WEBSERVER,DOCS,COMPILE,EJB,INIT">
>   </target>
>i am expecting the init target to be called first followed by 
>EJB,COMPILE,DOCS and then WEBSERVER.
>but it starts WEBSERVER directly and does not do the other target task.
>If any of you guys have any idea why this is happening , please throw some 
>light on it.
>
>Your help is appreciated,
>
>Regards,
>Shahnawaz