Gradle/Compile Problem after update to 2016.3 163.6110.12
Answered
In my my project I need to support resources that can be located both in the source dir and the resource dir, so in my build.gradle I have the following:
sourceSets {
main {
java {
srcDirs = ['src/main/java']
}
resources {
srcDirs = ['src/main/java','src/main/resources']
}
}
}
I'm not soliciting an opinion on whether this is good practice or not. Suffice it to say I have good reasons for doing it this way. (Putting resources in the source path).
In the previous EAP build this was working (IDEA was marking src/main/java as both a source dir AND a resource dir). In the new EAP build I get NoClassDefFoundError on project build. How do I now configure support for resources on the source path?
Please sign in to leave a comment.
I can confirm. Have the same problem.
Have to rollback to previous EAP
did you get the similar error on the proejct build like: "Error:gradle-resources-test:project: java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils "?
Yes. Exactly
This issue is already fixed: https://youtrack.jetbrains.com/issue/IDEA-162545.
Still have the same problem in 2016.3 Preview (163.6512.17)
Thanks for the report. The issue should be finally fixed in the next 163 build.
The root case is the missing `<IntelliJ_path>/plugins/gradle/lib/commons-lang-2.6.jar` file. If you put it there manually, it will fix the problem for the current builds.