Can’t create resource output directory

Today, I encountered a strange problem: after using MVN clean, the following error appeared in the package

[ERROR] Failed to execute goal org.apache.maven. plugins:maven-resources-plugin :2.6:resources (default-resources) on project inventory: Cannot create resource output directory: E:\work\lanhusoft\cms\target\classes -> [ Help 1]
?

maven-resources- plugin:2.5 – Cannot create resource output directory

the windows Maven clean directory is still

[error] failed to execute goal org.apache.maven plugins:maven-resources-plugin :2
.6:resources (default-resources) on project inventory: Cannot create resource ou
tput directory: E:\work\lanhusoft\cms\target\classes -> [Help 1]
[ERROR]

We all know that the target directory will be deleted after MVN clean. There is no problem with MVN clean, but you can still see the target directory from the explorer. If you can’t open it, you will be prompted “access denied” if you click

After logging off the computer, log in again. The target directory is missing and can be packaged successfully

later found the reason:

It turns out that before using WinRAR to check the war package content in the target, MVN has deleted the target directory, but WinRAR has not been closed, and it still occupies the space of that directory. So I can see that the directory is still there, so MVN package keeps reporting errors

In fact, there is a process occupying this file

Transferred from https://www.lanhusoft.com/article/654.html

Similar Posts: