Java – Maven resources plugin: 2.6 – unable to create resource output directory

So I just created a Linux instance from EC2, and now I'm trying to install AWS Java SDK on it At the end of the installation, I run MVN clean compile exec: Java and get this:

[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

I saw a similar problem on stack overflow, but it used windows as the host of my Linux instance In addition, the answer involves using eclipse for configuration, which I did not use I'm not sure why it behaves like this, and I don't know how to solve it

resolvent

Solution

In my case, this error occurs when I open the target directory in the console (so Maven cannot delete it) Navigating out the target folder allows me to install through Maven without any problem@ H_ 403_ 6@ @H_ 403_ 6@

The above is the whole content of Java Maven resources plugin: 2.6 - unable to create resource output directory collected and sorted out by programming home for you. I hope this article can help you solve the program development problems encountered by Java Maven resources plugin: 2.6 - unable to create resource output directory.

If you think the content of the programming home website is good, you are welcome to recommend the programming home website to programmers and friends.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>