Search code examples
javamavenintellij-ideaubuntu-18.04

Maven Resources Compiler: Failed to copy in ubuntu 18.04


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)

Solution

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

    sudo chmod -R a+rwx target/