No resource if running from Idea, unless explicitely setting resource dir
Answered
Whenever I run from Idea, it cant find any resources.
Running from gradle `application` task is fine
Specs:
- JPMS project
- Gradle 5.6.1
- Openjdk 11
- Idea 2019.3
Investingating, no resources gets copied in the build directory ($projectDir/classes/java/main/..)
Some people solved by explicitely set the resource dir as:
sourceSets {
main.output.resourcesDir = main.java.outputDir
}
This works for me too, but this doesn't feel solid and future proof
What is the right way to have Idea copying the resources into the output folder in JPMS projects?
Ps, you can replicate using this project
Please sign in to leave a comment.
Hello. Could you please provide a demo project, to reproduce a problem?
Same link: https://github.com/elect86/v
Unfortunately, I was not able to compile the project, I keep getting error: module not found: org.lwjgl.natives
requires org.lwjgl.natives;