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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to