ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markku Saarela" <>
Subject RE: build.xml
Date Sat, 15 Nov 2003 05:37:59 GMT

You can use XmlProperty task.

<xmlproperty file="somefile.xml" />

rgds Markku

-----Original Message-----
From: Conelly, Luis (EM, DDEMESIS) []
Sent: 14. marraskuuta 2003 23:45
To: Ant Users List (E-mail)
Subject: build.xml

Hi all

	This is probably more a XML question than an Ant question; however somebody
might know how to do it:

	I have this huge build.xml file with 800+ script lines. This has become
quite a bit annoying to maintain. Then I'd like to modularize the script
into several files, to make easier the maintenance (properties in one file,
build tasks in other, update tasks located in some other file and so on)

	However, I am not pretty sure if I am allowed to "include" xml files into
one master.xml file. I have done as follows:

common-properties.xml file
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
	<property environment="env"/>
    	<property name="src" location="src"/>
    	<property name="dest.home" location="../xxx_yyy"/>
    	<property name="build" location="${dest.home}/classes"/>
    	<property name="jsp.home" location="${dest.home}/jsp"/>
    	<property name="dist" location="${dest.home}/dist"/>
    	<property name="classpath" location="${env.CLASSPATH}"/>

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <project name="common-props" default="init">
        <include file="common-properties.xml"/> <!-- prior file-->
	<target name="init">
            <echo message="${env.CLASSPATH}"/>

	However, when I try to execute the 'init' target, I got following error:

C:\Projects\GNF\eDocs>ant -f master.xml init
Buildfile: master.xml

file:C:/Projects/master.xml:3: Unexpected element "include"

	I have seen this kind of 'include' in some other build files, but I am not
pretty sure if this is the right way to do it.

	Any help / observation / indication will be appreciated


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

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

View raw message