You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Simon Oldham <si...@sicom-systems.co.uk> on 2004/10/25 19:30:41 UTC

Verifying Ant Build Files

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


Re: Verifying Ant Build Files

Posted by Kris Read <kr...@gmail.com>.
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
<si...@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