You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Andy2008 <ho...@yahoo.com> on 2010/04/17 06:42:59 UTC

Best way to have a list of values in properties file

I have a list of values that I need to loop thru and right now I have them as
a comma separated list as below in my properties file

apps=app1, app2, app3, app4

Name of the apps can be very long so I'm wondering if I can do something
like below for readability purpose

apps=app1
apps=app2
apps=app3

but right now it only return app3 when I echo apps in my build script.  Is
there a way to get back app1, app2 and app3 using a different way other than
a comma separate list?

Thanks
-- 
View this message in context: http://old.nabble.com/Best-way-to-have-a-list-of-values-in-properties-file-tp28274129p28274129.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


AW: Best way to have a list of values in properties file

Posted by Ja...@rzf.fin-nrw.de.
You could use XML:

<list>
  <entry>one</entry>
  <entry>two</entry>
  <entry>three</entry>
</list>

<project>
  <xmlproperty file="list.xml"/>
  <echo>${list.entry}</echo>
</project>


Jan 

> -----Ursprüngliche Nachricht-----
> Von: Andy2008 [mailto:hoangtu69@yahoo.com] 
> Gesendet: Samstag, 17. April 2010 06:43
> An: user@ant.apache.org
> Betreff: Best way to have a list of values in properties file
> 
> 
> I have a list of values that I need to loop thru and right 
> now I have them as
> a comma separated list as below in my properties file
> 
> apps=app1, app2, app3, app4
> 
> Name of the apps can be very long so I'm wondering if I can 
> do something
> like below for readability purpose
> 
> apps=app1
> apps=app2
> apps=app3
> 
> but right now it only return app3 when I echo apps in my 
> build script.  Is
> there a way to get back app1, app2 and app3 using a different 
> way other than
> a comma separate list?
> 
> Thanks
> -- 
> View this message in context: 
> http://old.nabble.com/Best-way-to-have-a-list-of-values-in-pro
> perties-file-tp28274129p28274129.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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