Maven packaging failed: repackage failed: Unable to rename

Record the reason for a packaging failure:

The exception prompt is as follows:

Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.7.5:repackage (repackage) on project secret: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.7.5:repackage failed: Unable to rename ‘D:\work space\secret\target\secret-0.0.1-SNAPSHOT.jar’ to ‘D:\work space\secret\target\secret-0.0.1-SNAPSHOT.jar.original’

Repeated clean, install, still prompted the same problem.

Confidently look at the log and find that the prompt is that the jar package cannot be renamed.

It feels a bit like a similar prompt when renaming system folders or files.

Solve the problem

Find the computer task manager
and enter java to end the current task and repackage.
Can be packaged successfully.

Guess you like

Origin blog.csdn.net/qq_38254635/article/details/131724830