spring boot gradle build:bootRepackage failed

When running 'gradle clean build' on my spring boot project (version 1.3.6.RELEASE) on windows 10 (as administrator), the build fails on the 'bootRepackage' task on one of my modules with the following stacktrace

今天使用gradle打包spring boot工程时,出现了打包失败的情况,具体错误如下

the exception as follows:

Unable to rename 'D:IDEAWORKSPACEwsdc_v4uildlibswsdc_intellij_idea_spring-1.0.jar' to 'D:IDEAWORKSPACEwsdc_v4uildlibswsdc_intellij_idea_spring-1.0.jar.original'

看名字 unable to rename,无法命名的情况,应该是因为文件以及打开被占用,查看进程中,果然找到了正在运行着的服务,杀掉所有java服务(根据情况,我这是只有跟项目相关的服务,所以就关掉了),再次打包:BUILD SUCCESSFUL! 搞定~~~

2017-02-10 11:29:51 一只前进路上的码农

原文地址:https://www.cnblogs.com/BruceMa/p/6385613.html