4

I am getting a strange error since I compiled, cleaned and recompiled a project with Maven 3.1.1 using Windows 7. Basically the 'target' folder generated is no more "removable" and it looks like has no more owner. I have tried to associate an owner to it following the steps here: http://technet.microsoft.com/en-us/library/cc753659.aspx but without any luck and if I double click on this folder I am still getting: "Access is denied.". Any idea how to make this folder normal?

An Dorfer
  • 1,178
  • 2
  • 8
  • 14
Randomize
  • 543
  • 1
  • 6
  • 12
  • What exactly happened when you tried to take Ownership? Have you done a disk check to ensure there's nothing wonky with the file-system? – Ƭᴇcʜιᴇ007 Dec 13 '13 at 17:18

2 Answers2

3

Well, for not logical reasons this has worked for me:

from "cmd", on a parent folder of the corrupted folder:

Icacls * /T /C /grant system:F
Randomize
  • 543
  • 1
  • 6
  • 12
0

I have the same problem when I'm positioned in the "target" folder from another CMD or the file explorer.

Simply move out of the "target" folder and "mvn clean" will work. Maven cannot remove the "target" folder if it's in use by another process.

jAce
  • 1,352
  • 6
  • 16
  • 31