As you have mentioned, time stamp comparision will be done at the task level 
tasks like <javac>. But in a target, I will be defininig many tasks like 
<javac>,<exec>,<java>,<mkdir>,<copy>,<delete>,<cvs>
 etc....So my concern is instead of repeatedly checking the tasks whether they 
are already built, I want the check to be made at target level itself. .
<uptodate> task can be used to check whether target file is uptodate; not 
the target task.I have explained the issue that I am facing in the below 
illustration
<target name=\"eg\" depends=\"eg1,eg2,eg3\">...<target name=\"eg1\" 
depends=\"eg5\",eg3\">...<target name=\"eg2\" 
depends=\"eg3,eg4\">...<target name=\"eg3\" depends=\"eg6\">...Now if 
I build \"eg\" target, eg3 will be built thrice. But what I want is once if eg3 
is built, it shouldn\'t try to build eg3 again in the same project even if it 
used as dependent target.
I tried setting property inside a target and calling that target only if that 
property is not set as shown below.
<target name=\"eg\" depends=\"eg1,eg2,eg3\">...<target name=\"eg1\" 
depends=\"eg5\",eg3\">...<target name=\"eg2\" 
depends=\"eg3,eg4\">...<target name=\"eg3\" unless=\"eg3.present\" 
depends=\"eg6\"> <mkdir 
dir=\"eg3\"> . . <property name=\"eg3.present\" 
value=\"true\"/></target>
But this is also not working as per the expectation. Please help me 
out..............On Thu, 24 May 2007 13:52:16 +0100 \"Ant Users List\" 
wrotequery wrote:> Earlier I was using some other build tool to build my 
project. Here if a target is built and if the same target is used to build some 
other target, it compares the timestamp and will not build the dependent 
targets again.Ant doesnt compare the timestamps on targets, but it looks at the 
timestamp of artifacts consumed and created by tasks. e.g does work only if 
there is java source to compile, but the task is called on every build.> As 
I started working on ANT, I found it very useful and intersting. But in ANT, 
while building each target, it will try to build all the dependent targets that 
many times as it occurs in different targets.As a result it is increasing 
project\'s build time.Is there any task to ensure that the dependent targets 
once built will not  be built again ????Every target in a build file shoul
 d run once. if the same targets run again and again in a single build, your 
are using when you dont need to. Every task in a target should do its own 
dependency rules, though some dont. You can use to determine if targets need 
skipping---------------------------------------------------------------------To 
unsubscribe, e-mail: [EMAIL PROTECTED] additional commands, e-mail: [EMAIL 
PROTECTED]

Reply via email to