maven… Failed to clean project: Failed to delete ..\org.ow2.util.asm-asm-tree-3.1.jar

后端 未结 20 1703
臣服心动
臣服心动 2020-12-24 10:02

I use STS(spring tool suite) + maven plugin.

Every time when I run my application using maven-clean I see following error:

[INFO] Scanni         


        
相关标签:
20条回答
  • 2020-12-24 10:43

    For linux users: possible solution.

    Build error due to "Failed to delete < any-file-or-folder >" will occur if there is by chance of only delete access provided to root user rather to normal-user.

    Fix : type ll command to list file that cannot be deleted, if the file is given root access, change to normal user by :

    sudo chown -R user-name:user-name filename

    Later try for maven clean and build.

    0 讨论(0)
  • 2020-12-24 10:43

    I solved mine by doing:

    • mvn clean
    • mvn install
    • mvn clean install

    For some reasons it worked for me . Good luck !!

    0 讨论(0)
  • 2020-12-24 10:47

    Please close all the browser tab. And next time when you try to upload war from another place except target folder.

    0 讨论(0)
  • 2020-12-24 10:48

    If you run into this error in an IDE like Eclipse or IntelliJ, you may have one or more debug windows open and paused on a break-point. Terminate them.

    0 讨论(0)
  • 2020-12-24 10:50

    Try disabling Project->Build Automatically.

    As Scorpio suggested, there's a process running that's got a lock on a file somewhere.

    I have a large multi-module maven project that regularly fails on clean and this resolves it for me. I re-enable Build Automatically when I'm done.

    0 讨论(0)
  • 2020-12-24 10:50

    I had similar issue. Earlier I was using Maven 3 to build the project. After switching to maven 2 , I had the above error.

    Solved it by switching to Maven 3.

    0 讨论(0)
提交回复
热议问题