Maven Resources Compiler: Failed to copy in ubuntu 18.04

Viewed 3094

My Java project builds successfully using Maven in Terminal.

When building using IntelliJ IDE the build fails for the same project.

it says Permission denied

Maven resources compiler: Failed to copy '/home/user1/development/git/oms/src/main/resources/application.yaml' to '/home/user1/development/git/oms/target/classes/application.yaml': /home/user1/development/git/oms/target/classes/application.yaml (Permission denied)
2 Answers

I solve that problem by giving permissions to the target folder recursively

sudo chmod -R a+rwx target/

Delete your target folder and run from IntelliJ. Make sure there is no Java process running your project already.

Related