jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <li...@ehatchersolutions.com>
Subject Re: Fault report (and fix) for Cactus Sample : <fail> task doesn't support the "unless" attribute
Date Mon, 22 Apr 2002 04:40:03 GMT
If if/unless are used on a <fail> then the build file is designed for Ant
1.5, which comes out in beta in a couple of weeks.

I'm running off a fresh build of Ant, so didn't experience this problem, but
I'm going to post the problem I do have over to cactus-dev.

    Erik

----- Original Message -----
From: "Butt, Vaughn A." <vaughn.butt@nz.unisys.com>
To: "'Cactus Users List'" <cactus-user@jakarta.apache.org>
Sent: Monday, April 22, 2002 12:17 AM
Subject: Fault report (and fix) for Cactus Sample : <fail> task doesn't
support the "unless" attribute


>
C:\java\jakarta-cactuC:\java\jakarta-cactuC:\java\jakarta-cactuC:\java\jakar
> ta-cactu
>
> I am using ant-1.4.1. and jakarta-cactus-13-1.3 (which may be
> jakarta-cactus-23-1.3)
>
> When I try to "ant clean", ant complains with the following message;
>
> C:\java\jakarta-cactus-13-1.3\sample-servlet\build\build.xml:155: The
<fail>
>  task doesn't support the "unless" attribute.
>
> The check.properties target has the following task;
>
> <fail message="Missing property or property pointing to an invalid file
> (check your build.properties file)"
>      unless="properties.ok"/>
>
> After looking at the documentation for ant-1.4.1 I determined that this is
a
> fault
> in the build-share.xml file.
>
> Is this a real problem or am I misconfigured or is it something else?
>
> Anyway, I think I have fixed it with the following change.  Feel free to
> comment (constructively;-) on my ant style.
>
> Replace this;
>
>     <target name="check.properties" depends="display.properties">
>
>         <condition property="properties.ok">
>             <and>
>                 <available file="${cactus.framework.jar}"/>
>                 <available file="${cactus.ant.jar}"/>
>                 <available file="${servlet.jar}"/>
>                 <available file="${aspectjrt.jar}"/>
>                 <available file="${commons.httpclient.jar}"/>
>                 <available file="${httpunit.jar}"/>
>                 <available file="${junit.jar}"/>
>            </and>
>         </condition>
>
>         <fail message="Missing property or property pointing to an invalid
> file (check your build.properties file)"
>             unless="properties.ok"/>
>
>     </target>
>
> with this;
>
>     <target name="set.properties.ok" depends="display.properties">
>
>         <condition property="properties.ok">
>             <and>
>                 <available file="${cactus.framework.jar}"/>
>                 <available file="${cactus.ant.jar}"/>
>                 <available file="${servlet.jar}"/>
>                 <available file="${aspectjrt.jar}"/>
>                 <available file="${commons.httpclient.jar}"/>
>                 <available file="${httpunit.jar}"/>
>                 <available file="${junit.jar}"/>
>            </and>
>         </condition>
>
>     </target>
>
>     <target name="check.properties" depends="set.properties.ok"
> unless="properties.ok">
>         <fail message="Missing property or property pointing to an invalid
> file (check your build.properties file)"/>
>     </target>
>
> Note the addition of a new target and the renaming of the old target.
>
> --
> To unsubscribe, e-mail:
<mailto:cactus-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:cactus-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message