JRuby's ant integration: is reading ant properties/resources from rake possible?

Hi,
after reading Charles’ and Tom’s articles about the Ant-Rake integration
in
JRuby 1.5.X, i decided to give it a try by replacing an existing ant
script
with a rake script.

The ant script that I am trying to replace is in a build script
hierarchy
(i.e. it relies on other build scripts) for things like resources and
paths.

I haven’t been able to ascertain how I access ant-defined paths and
resources from within my rake task. Can anybody help me out plz?

Regards,
Jake

On Sat, Jul 3, 2010 at 6:37 PM, Jake B. [email protected] wrote:

Hi,
after reading Charles’ and Tom’s articles about the Ant-Rake integration in
JRuby 1.5.X, i decided to give it a try by replacing an existing ant script
with a rake script.

The ant script that I am trying to replace is in a build script hierarchy
(i.e. it relies on other build scripts) for things like resources and paths.

I haven’t been able to ascertain how I access ant-defined paths and
resources from within my rake task. Can anybody help me out plz?

So you’re trying to access ant properties from Ruby? You can try
“ant.properties[‘property.name’]” for one. If it’s a path-like object,
you might try getting the path object by reference from the Ant
Project object.

path = ant.project.getReference('my.path')
# use the org.apache.tools.types.Path API against the path object

If that doesn’t help you out, can you provide an example of what
you’re trying to do?

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hi Nick,

Yes, that did the trick, thank you.

Regards,
Jake