Results : Tests run: 39, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-war-plugin:2.2:war (default-war) @ emsc --- [INFO] Packaging webapp [INFO] Assembling webapp [emsc] in [D:\workspaceREST\emsc\target\emsc] [INFO] Processing war project [INFO] Copying webapp resources [D:\workspaceREST\emsc\src\main\webapp] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 21.780 s [INFO] Finished at: 2015-07-10T19:17:05+08:00 [INFO] Final Memory: 25M/108M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project emsc: Failed to copy file for artifact [javax.annotation:javax.annotation-api🏺1.2:compile]: Failed to copy full contents from D:\workspaceMaven\javax\annotation\javax.annotation-api\1.2\javax.annotation-api-1.2.jar to D:\workspaceREST\emsc\target\emsc\WEB-INF\lib\javax.annotation-api-1.2.jar -> [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
不知道问题出在哪里 ?pom.xml的内容一直没有修改过。突然就不能了。另外,其他机子是可以打包成功的。不明~求解
加 -X 参数,详细的报错如下:
[INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project emsc: Failed to copy file for artifact [javax.annotati on:javax.annotation-api🏺1.2:compile]: Failed to copy full contents from D:\w orkspaceMaven\javax\annotation\javax.annotation-api\1.2\javax.annotation-api-1.2 .jar to D:\workspaceREST\emsc\target\emsc\WEB-INF\lib\javax.annotation-api-1.2.j ar -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o rg.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project emsc: Failed to copy file for artifact [javax.annotation:javax.annotation-api🏺1.2: compile] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje ct(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje ct(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThre adedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl eStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216) at org.apache.maven.cli.MavenCli.main(MavenCli.java:160) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun cher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav a:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La uncher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java: 356) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to copy file f or artifact [javax.annotation:javax.annotation-api🏺1.2:compile] at org.apache.maven.plugin.war.packaging.ArtifactsPackagingTask.performP ackaging(ArtifactsPackagingTask.java:131) at org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.handleA rtifacts(WarProjectPackagingTask.java:190) at org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.perform Packaging(WarProjectPackagingTask.java:109) at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMo jo.java:472) at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(Abstr actWarMojo.java:404) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:215 ) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:177) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default BuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor .java:208) ... 19 more Caused by: java.io.IOException: Failed to copy full contents from D:\workspaceMa ven\javax\annotation\javax.annotation-api\1.2\javax.annotation-api-1.2.jar to D: \workspaceREST\emsc\target\emsc\WEB-INF\lib\javax.annotation-api-1.2.jar at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:1053) at org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.copyFi le(AbstractWarPackagingTask.java:293) at org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask$1.regi stered(AbstractWarPackagingTask.java:150) at org.apache.maven.plugin.war.util.WebappStructure.registerFile(WebappS tructure.java:211) at org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.copyFi le(AbstractWarPackagingTask.java:145) at org.apache.maven.plugin.war.packaging.ArtifactsPackagingTask.performP ackaging(ArtifactsPackagingTask.java:106) ... 27 more [ERROR] [ERROR] [ERROR] For more information about the errors and possible solutions, please rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE xception
<p>
<br>
</p>
<p>
<br>
</p>
解决!
删了本地的Maven 库,而后再重新下载 Maven 库里面的jar包,后就正常了。
应该是 Maven 库里面的jar冲突了。
不是提示:Re-runMavenusingthe-Xswitchtoenablefulldebuglogging. 。。加上个-X参数。输出详细的log吗?。。通常输出了log之后,一看就明白的了。
已贴详情。望把脉
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。