ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject RE: parsing ant build scripts from unusual sources
Date Thu, 14 Oct 2004 14:10:01 GMT
> From: Robert Dockins []
> I'm interested in using Ant as part of a larger application, mostly to
> do file transformations and various kinds of validation.  What I'd
> to do is store ant build files in a database, retrieve and parse them
> and then run the resulting project to do the actions.
> I've been able to start Ant from a java program using
> org.apache.ant.helpers.ProjectHelper2, but I've discovered that it
> accepts File's and URL's as the xml source.  Because I'd like to store
> my scripts in a DB, I need to be able to use an InputStream or
>   I've perused the code for ProjectHelper2, and it seems trivial to
> support for InputStream and/or InputSource.  In fact, there are
> indicating that someone has considered this already.  However, I would
> like to be able to use virgin Ant binaries, if possible.
> My questions are: why aren't InputSource and InputStream supported?
> there an easy/preferred workaround?

It would be easy to allow parsing an arbitrary XML stream from anywhere.

The problem lies in the fact that so much revolves around the build
basedir, which can only be a File in Ant as of today. Even importing a
build file from a URL or resources didn't reach consensus, for the same
reasons. It seems that Ant is pretty much strictly file based for build
files, unless so major restructuring happens, which would probably not
backward compatible. At least that's my current understanding. --DD

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

View raw message