ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rainer Noack" <rai...@noacks.net>
Subject FW: how can i undeclare taskdef?
Date Sat, 03 Apr 2004 22:42:24 GMT
Barry,
sorry, you need to use depends AND unless attribute
if you're running ant with multiple targets.
example:

<target name="jspctaskdef" unless="jspctaskdef.done">
  <property name="jspctaskdef.done" value="true"/>
  <taskdef .....  />
</target>

<target name="jspc" depends="jspctaskdef">
...
</target>

you might also try out
<property name="ant.reuse.loader" value="true"/>
at the beginning of your build script or set it in the
ANT_OPTS environment variable via
-Dant.reuse.loader=true

maybe this solves your problem with duplicate taskdef.
Regards
Rainer
(now offline until Monday but let me know whether it works)


> -----Original Message-----
> From: barry@goodconsultants.com [mailto:barry@goodconsultants.com]
> Sent: Saturday, April 03, 2004 11:48 PM
> To: rainer@noacks.net
> Subject: Re: how can i undeclare taskdef?
> 
> 
> 
> 
> Rainer,
> 
> Thanks for your prompt reply.
> 
> Would you please detail how i can make sure it is only run once?
> 
> The problem also described in another post. I have the
> taskdef for JspC in a 
> jspc target which resides in the dist target which all will 
> depends on.
> 
> When running "ant deploy" or "ant all", everythings fine.
> However, when 
> running "ant all deploy" or "ant deploy deploy" then it 
> becomes a problem.
> 
> Please let me know how i can "run once" or doing it correctly.
> 
> How can i use "ant.reuse.loader"?
> 
> thanks
> 
> Barry
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message