> From: Robert Dockins [mailto:[EMAIL PROTECTED] > > 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 like > 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 only > 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 similar. > I've perused the code for ProjectHelper2, and it seems trivial to add > support for InputStream and/or InputSource. In fact, there are comments > 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? Is > 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 file's 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 be backward compatible. At least that's my current understanding. --DD --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]