ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <gma...@apache.org>
Subject Re: AW: AW: Have an Ant script run even with missing JARs?
Date Tue, 28 Feb 2006 15:47:37 GMT
Jan.Materne@rzf.fin-nrw.de wrote:

>>Jan and I are both producing the same answer. Here's the overlap:
> 
> 
> yepp ;-)
> 
> In earlier times (prior to Ant 1.6) this was the only possibility to do
> more
> difficult initializations because only a few tasks were allowed to be
> outside
> of a <target>.
> Since 1.6 you could do (nearly) everything outside of a <target>.
> 
> But <target> can be called explicitly and via depends-clause.
> 
> 
> Jan
> 
> 
> 
>><project name="myproj" default="deploy-to-tomcat">
>> <target name="init-taskdefs">
>>    <!-- taskdefs here -->
>> </target>
>>
>> <target name="deploy-to-tomcat" depends="init-taskdefs">
>>    <!-- stuff here -->
>> </target>
>>
>> <target name="non-tomcat-task">
>>    <!-- this should run fine now -->
>> </target>
>></project>
>>
>>Or near enough to get you going.
> 

Works perfectly.  I just put the taskdefs under the deploy-to-tomcat 
target though, because currently d-t-t is my only target that needs 
them.  Later if I need, I can break it out into its own target so 
multiple targets can reference the taskdefs.  Thank you both!

Glen

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


Mime
View raw message