Using propdeps-plugin with IDEA 13.x causes NoClassDefFoundError on dependencies
fge opened this issue · comments
Versions:
- gradle 1.10;
- IDEA 13.0.2;
- propdeps-plugin 0.0.5.
To reproduce: first, declare we want to use this plugin as per the doc, ie:
configure(allprojects) {
apply(plugin: "propdeps");
apply(plugin: "propdeps-maven");
apply(plugin: "propdeps-idea");
apply(plugin: "propdeps-eclipse");
}
Second, write a main()
(even empty) within a class in a folder declared as a source folder, which has a compile-time dependency.
Then try and execute that main()
: fails with a NoClassDefFoundError
on one of the compile-time dependencies of this class.
Note:
- to clarify the above, if the class in question has no dependency whatsoever on any compile-time dependency, execution succeeds;
- it does not fail if the class in question is in a test source folder!
- you do not need to declare any dependency as
provided
oroptional
; - happens also with gradle 1.11, IDEA 13.1 EAP;
- does not prevent compilation to succeed.
It looks like the runtime classpath which IDEA uses for running mains in a source folder is completely emptied of compile time dependencies as soon as we use this plugin...
/cc @bclozel
thanks @philwebb , I'll take a look at it since I ran into similar issues.
@bclozel Thanks, I'm primarily an eclipse user still so IDEA issues are harder for me to fix.