Matt Benson wrote:
--- Steve Loughran <[EMAIL PROTECTED]> wrote:

Matt Benson wrote:
How are you invoking it?
as a task:

     <sf-faultingwaitfor maxwait="2"
message="equality failed">
       <equals arg1="a" arg2="b"/>
     </sf-faultingwaitfor>

Its declared as a task too;  in a properties file I
load with taskdef. When it delegated to waitfor it worked, but now that it subclasses it doesnt exec.

Hmm... this works:

<project default="bar">
  <property name="src" value="Foo.java" />
  <available property="gotsrc" file="${src}" />

  <target name="write" unless="gotsrc">
    <echo file="${src}">public class Foo extends
        org.apache.tools.ant.taskdefs.WaitFor {}
    </echo>
  </target>

  <target name="compile" depends="write">
    <javac srcdir="${basedir}" includes="${src}" />
  </target>

  <target name="foo" depends="compile">
    <taskdef name="foo" classname="Foo"
             classpath="${basedir}" />
    <foo maxwait="5" maxwaitunit="second"
         timeoutproperty="foo">
      <or />
    </foo>
  </target>

  <target name="bar" depends="foo" if="foo">
    <echo>$${foo}=${foo}</echo>
  </target>

  <target name="clean">
    <delete>
      <fileset dir="${basedir}"
               includes="${src},*.class" />
    </delete>
  </target>

</project>

So... I dunno... :|

The tests work for me too. Wierd. Whatever, I can't extend WaitFor because it doesnt work with the stuff in the other JAR. Which I can't replicate in the simpler test case situation.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to