Apologies if this is the wrong forum for Antwrap questions, but as I'm 
attempting to run it using Buildr.ant, I figured it was worth a shot.

I'm attempting to write an extension that uses Tomcat's 
$CATLALINA_BASE/bin/catalina-tasks.xml. In a normal build.xml, I'd write an 
include task, which would look something like the following:

<project name="myProject" basedir="." />
    <import file="${tomcat.home}/bin/catalina-tasks.xml"/>
    …
</project>

Using Buildr.ant I get the following error -- "BuildException : import only 
allowed as a top-level task." Tracing back through the atoulme-antwrap source, 
it looks like the issue arises in ant_task.rb, line 56 in v0.7.2:

element.setOwningTarget(ApacheAnt::Target.new())

If I'm reading this correctly, it seems like every instance of AntTask is given 
an owner Target, which then causes top-level tasks like `import` to fail. I've 
got a few workarounds, specified at 
http://markmail.org/message/bwxpucyzpv7rhwh5. All the same, I'm curious if 
there is a way to run top-level tasks in Buildr.ant I'm just missing.

Thanks,

Christopher Tiwald

Reliability Architect
Salsa Labs, Inc.

Reply via email to