----- Original Message -----
From: "Max Nalsky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 18, 2000 9:26 PM
Subject: Re: Questions on Ant
>
> Well,
>
> What Ken suggests seems to be a kind of hack (even if it'd worked as he
> suppose). Am I right there's no "right" way to do what I need? Maybe it
> makes sense to modify Target.java so that a target could take a list of
> comma-separated properies names and check whether all of them are true?
>
Currently the "right" way may be to use the script-task in a way similar to
this (I have not checked this for validity, maybe the if-statement must be
corrected):
<project name="myProject" ...
<script language="javascript"> <![CDATA[
var prop1 = myProject.getProperty('property1');
var prop2 = myProject.getProperty('property2');
if (prop1 == null || prop2 == null)
{
myProject.setProperty('propertyMissing', 'true');
}
]]></script>
And then use
<target name="myTarget" if ="propertyMissing">
<fail message="You have not defined a required property"/>
Nico