ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject xmlproperties and for loop
Date Tue, 17 Jan 2006 07:38:57 GMT


we want to switch our property files to xml format.
Now i'm looking for the best structure of that xml file.

i thought of =

<?xml version="1.0" encoding="UTF-8"?>
<name>Project 1</name>

<name>Project 2</name>
<name>Project 3</name>


to access all modules within a for loop i have =

<project name="bla" default="main" basedir=".">

<!-- Import AntContrib -->
<taskdef resource="net/sf/antcontrib/antlib.xml" />

<xmlproperty file="T:/test/props.xml" keeproot="false"/>

<target name="main">

<propertyselector property="module"
	distinct="true" />

<for list="${module}" param="msection">

	<var name="mname" unset="true" />
	<script language="javascript">
	    project.setNewProperty("mname", mname);


	<var name="mlabel" unset="true" />
	<script language="javascript">
	    mlabel = project.getProperty("@{msection}.label");
	    project.setNewProperty("mlabel", mlabel);


	<var name="mat" unset="true" />
	<script language="javascript">
	    mat = project.getProperty("@{msection}.at");
	    project.setNewProperty("mat", mat);

	<equals arg1="${mat}" arg2="y"/>
		<echo>${mname} already deployed !!</echo>	


Instead of the echos there will be the real work later, i.e. checkout

Question =

is there a better way, should i have another structure for my xml
property file ?

Thanks for any hints !

Regards, Gilbert

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

View raw message