ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: How to access a XML element from a given file ?
Date Tue, 29 Apr 2003 11:04:24 GMT
In ant 1.5.x you need to place xmlproperty in a target.
for example:
<target name="init">
    <xmlproperty file="${config-dir}/definition.xml"/>
</target>

This restriction will be lifted in ant 1.6.

Peter
On Tuesday 29 April 2003 11:47, Christophe Franco wrote:
> Antoine Levy-Lambert wrote:
> > Maybe you are not really using ant 1.5.3 but another version. To see what
> > your ant has in the guts, you can try the <antstructure/> task which
> > generated a DTD with all the tasks that are present in your current
> > version of ant.
>
> I really think I'm using ant 1.5.3 :
> $ ant -version
> Apache Ant version 1.5.3 compiled on April 9 2003
>
> $ which ant
> \java\apache-ant-1.5.3\dist/bin/ant
>
> > Could you also show how your build file looks like ? is your
> > <xmlproperty/> in a <project/> element or in a <target/> element
?
>
> The xmlproperty is in a <project/> element, like this :
>
> <?xml version="1.0" encoding="iso-8859-1" ?>
> <project name="demo-oxand-core" default="exe" basedir=".">
>
>    <!-- set global properties for this build -->
>    <property name="debug" value="on"/>
>    <property name="src" value="."/>
>
>
>    <!-- [more properties omitted] -->
>
> <!-- Here, definition of the configuration to use for this build,
> sourcedir is src-->
>    <property name="config-dir" value="../configurations/corrosion" />
>
>    <!-- Here, properties to use for dealing with the configuration,
> shall not be edited manually-->
>    <xmlproperty file="${config-dir}/definition.xml"/>
>
> <!-- here, the build file goes on with the targets -->
>
> </project>


Mime
View raw message