ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Location in non-Task tasks
Date Wed, 13 Sep 2006 16:24:54 GMT
--- Steve Loughran <stevel@apache.org> wrote:
> 
> Or to have a ConditionTaskBase extends Task. not
> having condition base 
> extends task causes lots of fun whenever you have
> any component that 
> takes a ref to a nested task with an addTask(Task)
> thing.
> 

Steve, I was just reading back through the archives
and this leapt out at me.  Under what circumstances do
you have this "lots of fun"?  Does the component
mentioned implement TaskContainer?  That should be all
it needs to do, right?  Example:

<project>
  <echo file="Foo.java">
public class Foo{public void
execute(){System.out.println("foo");}}</echo>
  <javac srcdir="${basedir}" includes="Foo.java" />
  <taskdef name="foo" classname="Foo"
classpath="${basedir}" />
  <sequential>
    <foo />
  </sequential>
</project>

output:

Buildfile: build.xml
    [javac] Compiling 1 source file
      [foo] foo

BUILD SUCCESSFUL
Total time: 1 second

This illustrates that there is no special handling for
the condition task; because Sequential implements
TaskContainer, <foo> is adapted with no problem.

What is different about your scenario?

-Matt


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message