This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Problems with Ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Problems with Ant "copy"." Watch "Problems with Ant "copy"." New topic
Author

Problems with Ant "copy".

William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

Doing something like this:

the file is copied but the permissions change from r-xr-xr-x to rw-rw-rw- And since this is a shell script I am not able to run it! Thanks.


Please ignore post, I have no idea what I am talking about.
Rufus BugleWeed
Ranch Hand

Joined: Feb 22, 2002
Posts: 1551
Have you looked at your umask value?
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

It's 022, so what does that tell me?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17151
    
  27

Check the Ant docs. There's an explicit disclaimer on copies because Java doesn't handle OS-specific features such as Unix file attributes or Windows ACLs. They also make suggestions on what to do when this limitation isn't acceptable.


An IDE is no substitute for an Intelligent Developer.
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

Still not exactly sure why it happens, but ant has a "chmod" task which lets me change the file permissions. So that is the working solution at the moment.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems with Ant "copy".
 
It's not a secret anymore!