[GRADLE-1427] Application plugin install task will remove any other files/directories under installDirPath Created: 07/Mar/11  Updated: 04/Jan/13  Resolved: 10/Mar/11

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-1
Fix Version/s: 1.0-milestone-2

Type: Bug
Reporter: Gary Stewart Assignee: Adam Murdoch
Resolution: Fixed Votes: 0


When using the install task in the applicaton plugin all of the other directories and files under installDirPath will be removed.

Since installDirPath is automatically adding the project.name to the path you provide it would seem like you should provide the root of the path you want to install into. For example, if my project.name was ProjectName and I wanted to install to "C:/ProjectName" I would have to set the installDirPath to "C:/". If I set it to "C:/ProjectName" I would end up with the project actually installed as "C:/ProjectName/ProjectName" because the project.name is automatically appended. If I set the installDirPath to "C:/" then it will attempt to remove all other files and directories on "C:/" and create only "C:/ProjectName".

It seems like it would be safer to not automatically append the project.name to the installDirPath when it is specified and let that value reflect the full output path. I tried running it numerous times with the install task hanging trying to remove all the directories before I discovered what was going on. I could see others trying to do this too and wiping their data if they left it running instead of killing the process.

Comment by René Gröschke (Inactive) [ 08/Mar/11 ]

I've detected the problem. The install task extends a sync on the parent folder of the project path. Will provide a fix asap

Comment by Adam Murdoch [ 10/Mar/11 ]

This is fixed.

Please see the breaking changes page for details: http://docs.codehaus.org/display/GRADLE/Gradle+1.0-milestone-2+Breaking+Changes#Gradle1.0-milestone-2BreakingChanges-Applicationplugin

Generated at Wed Jun 30 11:55:16 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.