No resource if running from Idea, unless explicitely setting resource dir

已回答

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

0

Hello. Could you please provide a demo project, to reproduce a problem?

0

Unfortunately, I was not able to compile the project, I keep getting error: module not found: org.lwjgl.natives
requires org.lwjgl.natives;

0

请先登录再写评论。