ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Oldham" <simon.old...@sicom-systems.co.uk>
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 "org.apache.tools.ant.Project" 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
"org.apache.tools.ant.Project" 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!

Cheers,

Simon

-----Original Message-----
From: Kris Read [mailto:kris.read@gmail.com]
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
<simon.oldham@sicom-systems.co.uk> 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
actually
> 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
build
> a task-graph from.
>
> I have looked at the "org.apache.tools.ant.Project" class and I think this
> will be my representation of the project. I have also looked at
> "org.apache.tools.ant.ProjectHelper" but I can't quite fathom out what
this
> does and no method returns a Project class (which is ideally what I would
> like i.e. "public Project parseBuildFile (File buildFile){}" sort of
thing).
> I appreciate that I can write the code to validate and parse the file
myself
> but I have no wish to "reinvent the wheel" if the ANT API can do it for
me.
>
> Any guidance would be greatly appreciated.
>
> Thanks,
>
> Simon Oldham
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message