所以我刚刚从EC2创建了一个Linux实例,现在我正尝试在它上面安装AWS Java SDK。当我运行mvn clean compile exec:java时,我在安装结束时得到了这样的结果:
[ec2-user@ip-xxx-xxx-xxx-xxx aws-java-sample]$ mvn clean compile exec:java
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building aws-java-sample 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ aws-java-sample ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ aws-java-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: x.xxx s
[INFO] Finished at: xxxx-xx-xxTxx:xx:xx+xx:xx
[INFO] Final Memory: M/xM
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project aws-java-sample: Cannot create resource output directory: /home/ec2-user/aws-java-sample/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我在Stack Overflow上看到过与此类似的问题,但在我使用Linux实例的情况下,它使用Windows作为主机。另外,这个答案涉及到Eclipse的配置,我没有使用它。我不知道它为什么会这样,也不知道如何修复它。
发布于 2017-01-18 04:44:28
在我的情况下,当我在控制台中打开目标目录时出现了这个错误(所以maven不能删除它)。
通过浏览目标文件夹,我可以毫无问题地通过maven进行安装。
发布于 2020-12-30 06:55:57
我解决了关闭windows中打开的proyect文件夹的问题
发布于 2016-03-17 23:20:36
尝试禁用IDE的自动构建,可能与Maven构建存在冲突。还要验证文件夹是否未在资源管理器或其他应用程序中的某个位置打开,如果无法工作,只需重新启动IDE即可
https://stackoverflow.com/questions/29726927
复制相似问题