ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Oldham" <>
Subject Re: Verifying Ant Build Files
Date Mon, 25 Oct 2004 20:01:10 GMT

Thank's Kris, that has answered my question with regard to validating a
build file. Sorry the explanation of what I am doing is rather poor. I was
really just referring to storing the build file in memory in the same way
you use the Document class in Java to store an XML document in memory. I
think this is what the "" class is for. However,
with the standard Document class you can create a Document by passing your
XML file to the Document constructor. This is not the case with the
"" Class - you have to parse your build.xml file
manually (probably using the Document class!) and then add the various
tasks/targets to your Project class, as you encounter them whilst parsing
build.xml, using the Project class methods provided.

That is my understanding anyway!



-----Original Message-----
From: Kris Read []
Sent: 25 October 2004 20:40
To: Ant Users List
Subject: Re: Verifying Ant Build Files

I am not so clear on what you are trying to do but...

You can use the classes of ANT from any Java application.  They are
not as well documented as one might like, but you shouldn't find it
too tough.

As for verifying a build.xml file, there is no ANT schema or DTD since
ANT is flexible and allows you to define your own elements...
basically I have not found a way to do this part.

On Mon, 25 Oct 2004 18:30:41 +0100, Simon Oldham
<> wrote:
> Hi,
> I am currently developing a distributed build system and wish to use ANT
> build files to provide the build information. Whether or not I will
> execute ANT on the individual nodes had not been decided yet.
> Basically, what I would like to do , using the ANT API, is be able to :
> 1) Verify a build.xml file
> 2) Create an "in memory" representation that I can then manipulate and
> a task-graph from.
> I have looked at the "" class and I think this
> will be my representation of the project. I have also looked at
> "" but I can't quite fathom out what
> does and no method returns a Project class (which is ideally what I would
> like i.e. "public Project parseBuildFile (File buildFile){}" sort of
> I appreciate that I can write the code to validate and parse the file
> but I have no wish to "reinvent the wheel" if the ANT API can do it for
> Any guidance would be greatly appreciated.
> Thanks,
> Simon Oldham
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

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

View raw message