springboot用maven打包的时候出现Cannot create resource output directory[已解决]

maven clean后打包出现Cannot create resource output directory
打包失败

找到这个目录显示“拒绝访问”

也删不掉

后来百度了一下,是这个文件夹在被占用的情况下clean了

于是就用资源管理器搜索句柄“target”
这里是步骤:

1.打开资源管理器(ctrl+shift+esc打开任务管理器)
springboot用maven打包的时候出现Cannot create resource output directory[已解决]
2. 选择性能,再选择打开资源监视器
springboot用maven打包的时候出现Cannot create resource output directory[已解决]
3. 搜索“target”
springboot用maven打包的时候出现Cannot create resource output directory[已解决]
4. 我这里示范操作输入的perfmon,显示perfmon.exe占用的,右键结束这个进程 。
springboot用maven打包的时候出现Cannot create resource output directory[已解决]

5.然后重新用package打包就可以了