ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Webb, James" <james.w...@vignette.com>
Subject RE: v1.3 -- problems retrieving properties from <property file="S OMEF ILE">
Date Wed, 02 May 2001 21:26:31 GMT
Success. This example worked.

The problem was related to the encoding of the properties
files themselves. They were encoded as unicode rather than ASCII.

When i ran this example i created the files quickly with notepad
so they both were created as ascii. Since this example worked
I knew the problem had to be with the property files themselves.

I recreated my local properties file using notepad and
copied my values inside. This time everything worked.

The model I copied to create my properties file had been
encoded as a unicode file. I could see this once I looked
for it inside my normal editor.

Strange that the property reader in our codebase did not
have a problem reading the files as unicode.

Thank you to everyone esp. Diane and Conor.



-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com]
Sent: Wednesday, May 02, 2001 12:54 PM
To: ant-user@jakarta.apache.org
Subject: RE: v1.3 -- problems retrieving properties from <property
file="S OMEF ILE">


--- "Webb, James" <james.webb@vignette.com> wrote:
> In my testing I have tried to use multiple properties from the file
> in these tasks to rule out the possibility of a parsing error
> or something like that in one of the name/value pairs.
> Anyway, none of the properties from the file are set
> when I try to use them within a task.

Can you try this simple test:

File test.properties:
weblogic.webapp.name=myapp

File test.xml:
<?xml version="1.0"?>
<project name="test" default="showprop" basedir=".">
  <target name="showprop">
    <property file="test.properties"/>
    <echo message="weblogic.webapp.name = ${weblogic.webapp.name}"/>
  </target>
</project>

[BINKY:dianeh]: ant -f test.xml
Buildfile: test.xml

showprop:
     [echo] weblogic.webapp.name = myapp

BUILD SUCCESSFUL
Total time: 0 seconds

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Mime
View raw message