ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Carlton" <Carlton.Br...@BellSouth.com>
Subject RE: Unwanted behavior - fixcrlf changes files to un-executable
Date Mon, 14 Aug 2006 19:51:31 GMT
That's not a terribly attractive option because it would require storing
a list of the desired permissions of every file in my source tree, and
it also becomes nonportable due to its dependence on chmod.

Normally when I get that recommendation, I rely on the powers of
<tarfileset> to set permissions.  It would be extremely useful if the
attributes and behavior of a <fixcrlf> set could be somehow be
incorporated in a <tarfileset> (or perhaps I am overlooking some
existing way of doing that?)

-----Original Message-----
From: Dominique Devienne [mailto:ddevienne@gmail.com] 
Sent: Monday, August 14, 2006 3:31 PM
To: Ant Users List
Subject: Re: Unwanted behavior - fixcrlf changes files to un-executable


I'm afraid there's no fix, as Java is not permission-aware. <fixcrlf>
probably creates a new file when it does something, and there's no way
in Java to preserve the permissions. You could 'fix' the permissions
after the fact, using <chmod> which simply forks to the command line
chmod executable, assuming you know beforehand which files need fixing
potentially.

JDK 6 or later may add support for permissions, by right now there are
no good work-around that I know of. --DD

On 8/14/06, Brown, Carlton <Carlton.Brown@bellsouth.com> wrote:
> Recently I started observing some very undesirable behavior in my Ant
> scripts.   Specifically, when <fixcrlf> does its fixing, it also
changes
> the file permissions to be non-executable.  Now, I recognize this 
> might be a very Clever Thing because binaries could be corruped by
<fixcrlf>.
> But with regard to shell scripts, this is undesired behavior.   How do
I
> override/work around this?
>
> The reason I run <fixcrlf> on shell scripts is because sometimes
> boneheads edit them in Windows and then check them.   I could run
around
> and tell everybody not to do that, but I choose to make my process
> self-correcting.   Except it doesn't work because Ant is trying to
give
> me help that I don't need.    What can I do here?
>
> *****
>
> The information transmitted is intended only for the person or entity 
> to which it is addressed and may contain confidential, proprietary, 
> and/or privileged material. Any review, retransmission, dissemination 
> or other use of, or taking of any action in reliance upon this 
> information by persons or entities other than the intended recipient 
> is prohibited. If you received this in error, please contact the 
> sender and delete the material from all computers. 162
>
>
>
>

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


*****

The information transmitted is intended only for the person or entity to which it is addressed
and may contain confidential, proprietary, and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon this information by
persons or entities other than the intended recipient is prohibited. If you received this
in error, please contact the sender and delete the material from all computers. 163



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


Mime
View raw message