Meaningless Drivel is fun!*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 984

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: 984

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

Joined: Jun 25, 2001
Posts: 15951
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 984

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".
 
Similar Threads
hibernate.properties not being found? Harnessing Hibernate Chapter 2
Tomcat isn't seeing JARs in webapps/appname/lib?
404 error
can't find my mistake trying HFSJ ServletContextListener demo
Cannot create InputStream from Properties file