This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Project clean fails when run from Netbeans: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.4.1:clean (default-clean) on project drill: Failed to clean project: Failed to delete C:\workspace\drill\target\endorsed\javaee-endorsed-api-6.0.jar Running mvn clean outside Netbeans works without problems.
Created attachment 104450 [details] sample project
Created attachment 104451 [details] maven output
Created attachment 104472 [details] same project step later, error reemerges
Created attachment 104473 [details] maven output
Something is holding open the JAR, and Windows has mandatory file locks. (And unlike Unix, you cannot hold open a file descriptor after unlinking the inode.) I doubt there is anything to be done about it, unless you are able to track down what exactly is holding the JAR open. (Assuming it is the NB process itself, heap analysis tools can show you all instances of java.util.zip.ZipFile and what the GC root references are.) In this case, target/endorsed/*.jar is a workaround for http://jira.codehaus.org/browse/MNG-4752 (lack of direct support for endorsed scope). (In reply to comment #0) > Running mvn clean outside NetBeans works without problems. NB 7.0 always forks the mvn executable so it should not make a difference, but timing may matter since file locks may be released after a GC.
Was your project deployed to running server when you cleaned it? If yes then you may be experiencing issue 192895.