ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Baz" <ba...@goodconsultants.com>
Subject Re: how can i undeclare taskdef?
Date Sat, 03 Apr 2004 23:09:08 GMT
Rainer,

I have added a line "<property name="is.test" value="true"/> in the end of
the task of the jsp compile. Hoping that when i run "ant deploy deploy",
running the target "deploy" second time would see the "unless="is.test"".
However, when i test the value of is.test, the seocnd time running, it was
not initiated. So, your suggestion does not work.

Your suggestion will work if the same task run in one "ant session" but i
dont think it will work if i do "ant deploy deploy".

All, please enlight me.

Barry

----- Original Message ----- 
From: "Rainer Noack" <rainer@noacks.net>
To: "'Ant Users List'" <user@ant.apache.org>
Sent: Saturday, April 03, 2004 2:42 PM
Subject: FW: how can i undeclare taskdef?


> 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
>
>



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


Mime
View raw message