打包发布maven项目时出错如下:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project itgimDomainDateChart: Failed to copy file for artifact [com.csot.itgim:itgim-facade:jar:1.0.0-SNAPSHOT:compile]: D:\workspace\cipcode\itgim\itgim-facade\target\classes (拒绝访问。) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
很明显:target\classes (拒绝访问。)
我没有这个目录,maven是去本地仓储找jar包的,我也install被依赖的项目了,本地仓储中也有相应的jar。可是非得来找项目中的jar来干什么?
解决方法:关闭这个项目 close project。