You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by "Butt, Vaughn A." <va...@nz.unisys.com> on 2002/04/22 06:17:28 UTC
Fault report (and fix) for Cactus Sample : task doesn't su
pport 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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Fault report (and fix) for Cactus Sample : task doesn't support the "unless" attribute
Posted by Erik Hatcher <li...@ehatchersolutions.com>.
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." <va...@nz.unisys.com>
To: "'Cactus Users List'" <ca...@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:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Fault report (and fix) for Cactus Sample : task doesn't support the "unless" attribute
Posted by Vincent Massol <vm...@octo.com>.
Hi,
> -----Original Message-----
> From: Butt, Vaughn A. [mailto:vaughn.butt@nz.unisys.com]
> Sent: 22 April 2002 05:17
> To: 'Cactus Users List'
> 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)
>
No, it is correctly named. The 13 represent J2EE API 1.3 (see
http://jakarta.apache.org/cactus/downloads.html for more details).
> 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?
>
argh! Yes, the unless attribute has only been added to Ant 1.5. The
other option is to use the prepackaged Ant that is available on Cactus
web site.
> 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.
>
Yes, that's what I had before I switched to the "unless" attribute in
the fail task. The sample application was supposed to work with Ant 1.4
but I forgot to check that (I'm running Ant 1.5).
Thanks, I'll collect all these problems and in a week or so I'll deliver
a new Cactus 1.3.1 version.
-Vincent
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>