I have a Java/Gradle project within IntelliJ, it contains multiple modules, one of the modules common is nested within its super module.

      -ClassImplemetation.java //(extends ClassToExtend from common module)

   COMMON-LIB---- (inner module)

In the PRODUCTMODULEs build.gradle i have added:

  implementation project(':PRODUCTMODULE:COMMON-LIB')

So that i can specify that common lib sub module's classes should be added to the 'PROJECTMODULE' classpath. Now, the project builds fine, but when i run it i get a NoClassDefFoundError targeting to the ClassToExtend class.
How could i make sure that that class is actually included in the build path?
My assumption is that it is correctly in the class path otherwise it would not copmpile.

0 Answers