ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Brooks <wbro...@lug.ee.calpoly.edu>
Subject Using URLs as values in a properties file
Date Tue, 10 Jul 2001 19:00:55 GMT

I'm trying to use Ant to automatically build properties files for my
application. 

I have a target which contains the following:

   <!-- Modify the properties file   -->
   <propertyfile
      file="etc/${ant.project.name}.properties"
      comment="Properties file for this application">
      <entry  key="defaultXMLLocation" 
              value="${weburl}${ant.project.name}Default.xml" />
      <entry  key="xslLocation" 
              value="${weburl}stylesheets/${ant.project.name}.xsl" />
   </propertyfile>

...what I'm getting when I run this target is a properties file that
looks like this:

#Properties file for this application
#Tue Jul 9 02:32:42 PDT 2001
defaultXMLLocation=http\://www.foo.org\:8086/baz/appsDefault.xml
xslLocation=http\://www.foo.org\:8086/baz/stylesheets/apps.xsl

The docs for the <propertyfile> task mention something about "slashes
conform to the expectations of the Properties class", but is there any
way to get rid of them in the final file so that the application,
which reads this file and uses the values of 'defaultXMLLocation' and
'xslLocation' doesn't choke?

Thanks in advance. 

Bill


Mime
View raw message