for (String className : getClassNamesFromJar(jarFile)) {
if (configuration.isDebug())
System.out.println("Adding class to graph: " + className);
-
- classGraph.add(loadClassByName(classLoader, className));
+ try {
+ classGraph.add(loadClassByName(classLoader, className));
+ } catch (NoClassDefFoundError e){
+ if (configuration.isDebug())
+ System.out.println("Class definition was not found.");
+ // Sometimes referenced classes are not found in the same Jar.
+ // Let's ignore this and proceed with the classes that we have.
+ }
}
}