Maven Resources Compiler: Failed to copy
Hi,
I have a maven project that I've been working on in IntelliJ 2018.3. It had been working fine for a while, but now trying to run my JUnit 5 tests I get the error:
"Maven Resources Compiler: Failed to copy [...] target/test-classes/build.properties (Permission denied)"
I have the maven-resources-plugin copy the build.properties file to my target/test-classes/build.properties file. This works fine when using mvn from the command line. It used to work fine when using IntelliJ as well. I don't know if a IntelliJ update broke it.
I can see that when IntelliJ copies the file, it has read-only permissions (which is causing the error). However, when mvn copies the file it has read/write permissions. The original file has read/write permissions.
Thanks,
Mark
Please sign in to leave a comment.
> now trying to run my JUnit 5 tests I get the error:
What Run/Debug Configuration do you use to run tests? Please attach screenshot of it and provide full textual output you get when running including the error and idea.log and build.log files. For uploading you can use ftp://ftp.intellij.net/.uploads / https://uploads.services.jetbrains.com or any file sharing service.
Do you have symlinks in project paths?
Try also with 2018.3.2 RC version from https://confluence.jetbrains.com/display/IDEADEV/IDEA+2018.3+EAP
Hi Andrey,
I uploaded the screenshot, idea.log and build.log. The filenames are shown below:
Do you use Perforce or other VCS in project (see https://youtrack.jetbrains.com/issue/IDEA-198517#focus=streamItem-27-3077896-0-0)? If so, try (temporarily) disabling it and check if it helps. The fix for related issue: https://youtrack.jetbrains.com/issue/IDEA-203265 will be included into next 2018.3.X EAP build update (should be available this week at https://confluence.jetbrains.com/display/IDEADEV/IDEA+2018.3+EAP).
Try also if it helps relocating the project into some other directory on the system and check.
Try disabling these plugins: Loaded custom plugins: InnerBuilder (1.1.5), Lombok Plugin (0.22.IDEA-EAP), comp IntelliJ Project Generator (2.1.8), Maven Helper (3.7.172.1454.3)
Hi Andrey,
Yes we use Perforce. That looks like the issue. Thanks for your help. I look forward to the fix.
Best,
Mark