Renaming Folder in War task

(Sebastian Schroeder) #1

Hey there,

I want to rename a folder in the war task. I tried using this syntax:

war {

rename ‘’, ‘’ }

It works fine for files but it does not work when using it on folders. What am I doing wrong? I haven’t found anything in the documentation or on the web that suggested a fix.

Thanks for the help.

Cheers, Sebastian

(Tom Sheehan) #2



// given the existence of folder named 'wall', it is renamed to 'door'
 ant.move(file: 'wall', toFile: 'door')


(Rolf Suurd) #3

While not a sweet one-liner like Tom posted, you could try adding another “from” clause with a different “into”. This will require you to exclude the “renamed” folder, or else it too will wind up in the war, like this:

war {
    from ('') {
        into ''