ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David McTavish <dmctav...@sandvine.com>
Subject RE: FixCRLF
Date Tue, 17 Jun 2003 03:02:54 GMT
Apologies, I'm running on the Windows platform, but I need to format my
.properties files to be distributed on a FreeBSD platform. (If not, the
Windows line feeds are not handled properly by the Properties.load() method
for line continuations. 
The problem I had with loadproperties is that it didn't preserve the
comments we've added to our .properties file. Basically, this properties
file is where our entire application is configured from, and having as much
documentation as possible is a requirement. The other thing is that our
entire app is done without this file.

thx,
d.

 

-----Original Message-----
From: Antoine Levy-Lambert [mailto:levylambert@tiscali-dsl.de]
Sent: Monday, June 16, 2003 4:38 PM
To: Ant Users List
Subject: Re: FixCRLF


I am not sure what you are trying to achieve using FixCRLF, nor on which
platform (Win, UNIX, Mac) you are running ant.
You might have a think at using loadproperties and a filterchain.
Read this about filterchains/filter readers
http://ant.apache.org/manual/CoreTypes/filterchain.html
and this about loadproperties
http://ant.apache.org/manual/CoreTasks/loadproperties.html
I believe that you might need to write your own filter to replace \\\n with
nothing
Antoine
----- Original Message -----
From: "David McTavish" <dmctavish@sandvine.com>
To: "'Ant Users List'" <user@ant.apache.org>
Sent: Monday, June 16, 2003 8:09 PM
Subject: FixCRLF


> Hi all,
>
> Anybody know of this is a bug in FixCRLF (or if it was fixed) that
modifies
> line-continuation characters such that they become an escape character for
a
> space?
>
> ie: (I have a properties file as follows)
>
> myproperty=this is a very long property value \
> that needs to span two lines
>
> When I run the FixCRLF task against this file, using UNIX-oriented
> specifications, I end up with the following file:
>
> myproperty=this is a very long property value \
> that needs to span two lines
>
>
> Very subtle difference (almost impossible to see with the naked-eye), but
> there is an additional space after the line continuation character (\)
which
> means that myproperty is now "this is a very long property value  "
instead
> of "this is a very long property value that needs to span two lines".
>
> Any ideas on how to fix this? I'm using Ant v1.5.1, and am not really
> looking forward to upgrading anytime soon. (We're in the midst of a
release
> cycle, and the least impact on development environment at this time, the
> better!).
>
> I'm using the task as follows:
>         <fixcrlf srcdir="." includes="*.properties" tab="remove" eol="lf"
> eof="remove"/>
>
>
> thx,
> d.
>
>
> ---------------------------------------------------------------------
> 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

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


Mime
View raw message