• 解决mvn clean后打包错:Cannot create resource output directory


    今天遇到一个奇怪问题:使用mvn clean后,打包问是出现下面错。

    [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:worklanhusoftcms argetclasses -> [Help 1]                                                                              
    ?

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

    windows maven clean 目录还在

    [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:worklanhusoftcms argetclasses -> [Help 1]
    [ERROR]

    我们都知道,mvn clean后会把target目录删除,mvn clean没有问题,但是从资源管理器里面还能看到这个target目录,打不开,点击会提示“拒绝访问”

    注销电脑后,再登录target目录不见了,并且能成功打包。

    后来找到原因:

    原来是之前用压缩软件WinRAR查看target里面war包内容没有关闭,虽然mvn把target目录删除了,但是WinRAR没有关闭,还占用起那个目录的。所以在外面还看到这个目录还在,因此mvn package 一直报错。

    其实就是有进程在占用这个文件

    转自 https://www.lanhusoft.com/article/654.html

  • 相关阅读:
    使用InstelliJ IDEA创建Web应用程序
    别了WindowsXP
    在MyEclipse中搭建Spring MVC开发环境
    iPhone中国移动收不到彩信,联通不用设置都可以,具体设置方法:
    WebLogic 服务器配置
    c# 第五课 string
    c# 第五课 regex
    c# 第四课 Arrays
    c# 第四课 interfaces
    c# 第五课 async await
  • 原文地址:https://www.cnblogs.com/bxssjava/p/10100102.html
Copyright © 2020-2023  润新知