ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: API Question - using a build file from within a jar
Date Wed, 16 Dec 2009 04:58:34 GMT
On 2009-12-15, Luke Shannon <> wrote:

> I am looking at using the ANT API for a project I am working on. Is it
> possible to set the ant.file User Property to point to a build file within
> a Jar?

Do you want to import it or use it as your main build file?

Ant 1.7.1 will only work on files OOTB for either case, Ant's trunk
allows import to work on such files.

The ProjectHelper implementation used by Ant (ProjectHelper2) is able to
read from URLs (and files inside a jar do have an usable URL), so if you
implement your own Main class (see -main option) you can use URLs.

For import you'd have to write your own task.  If you look into Ant's
trunk you'll find an implementation that supports files and
URL-providing resources, but porting it to Ant 1.7.1 would require a few


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message