jQuery in Action, 3rd edition
The moose likes Ant, Maven and Other Build Tools and the fly likes Changing user using 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 "Changing user using ant" Watch "Changing user using ant" New topic
Author

Changing user using ant

Vinayak patil
Ranch Hand

Joined: Aug 30, 2005
Posts: 67
Hi,

Is there a way to change the user using ant?

I need it to change some permissions on a file. This is a deployable war file so I need to change the permissions every time it is deployed.

I was thinking of incorporating the command in the ant file itself

Thanks in advance,

Vinayak


"I can resist everything except temptation"
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17155
    
  27

The concept of "user" is very OS-dependent, so the answer depends on what OS you're using.


An IDE is no substitute for an Intelligent Developer.
Vinayak patil
Ranch Hand

Joined: Aug 30, 2005
Posts: 67
Hi,

I am deploying the application on LINUX

-Vinayak
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17155
    
  27

A lot depends on what you're doing to deploy the WAR, but assuming that you're deploying it to the same machine Ant runs of and just copying it, you can use the ant "exec" task to execute the "chown" Linux command.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing user using ant
 
It's not a secret anymore!