ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Can force a target to run whenever ant in invoked to do setup without 'depends' in each target
Date Wed, 25 Jun 2008 22:21:01 GMT

--- JimCant <jcant@head.cfa.harvard.edu> wrote:

> 
> How can I ensure that a given target will always run
> before any others
> regardless of what is specifed on the command line? 
> I have a build file
> that depends on a single parameter (property) to
> define output directories
> and other properties.  I'd like to be able to check
> that this property has
> been set whenever this the build file is invoked for
> any target or set of
> targets without having to make every target depend
> on it.  Can this be done?  
> For Perl fans this is like a BEGIN block; for Java
> fans, this is like a
> static block in a class - that is- code that gets
> run before anything else
> happens.

Just put it outside of any target.  Ant will treat any
such instruction as being in the "" target.

HTH,
Matt

> 
> Thanks,
> jim cant
> -- 
> View this message in context:
>
http://www.nabble.com/Can-force-a-target-to-run-whenever-ant-in-invoked-to-do-setup-without-%27depends%27-in-each-target-tp18122871p18122871.html
> Sent from the Ant - Users mailing list archive at
> Nabble.com.
> 
> 
>
---------------------------------------------------------------------
> 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