ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <>
Subject Re: AW: Checking for and properties upon initialization
Date Wed, 21 May 2008 19:17:54 GMT
Dimitris Mouchritsas schrieb:
> What I'd like to accomplish is checking if exists 
> (which loadproperties ensures) and
> then check to see if a set of properties is set. If a property is 
> missing I'd like to display a message with
> the name of the property missing.
> What are your thoughts?

as you've already said, <loadfile .. /> assures
that the exists, otherwise your build will

the echo if ${someproperty} is missing you will get with
something like =

<target name="foobar" unless="someproperty">
   <echo>WARNING => $${someproperty} not set !!</echo>

if you need more reaction, you have to use <condition>
or <assert> from antcontrib

btw, if you need to do more complicated stuff with properties
you should have a look on AntXtras, they have assert, fixturechecks,
one example that would suit to your needs =

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message