I'm trying to use the Reflections 0.9.8 library, which comes as an uber-jar. If I add its JAR ("reflections-0.9.8-uberjar") within my project's build path then Eclipse won't find any of its class types: Reflection, ClasspathHelper and so on.
If I extract the single "reflections-0.9.8.jar" (not the uber one) and add it to the build path then at compile time everything works fine, but when I execute my project I get a NoClassDefFoundError (which I'm pretty sure it's caused by the lack of dependencies).
I've also tried to add every single .jar within the uber-jar, but I'll still get the NoClassDefFoundError.
What do I have to do to use this library distributed as an uberjar?
EDIT: In case it could help, this is the method in which I'd like to call Reflections (it's a snippet I took from Can you find all classes in a package using reflection?):
private static Set<Class<?>> getAllClassesInPackage(String pckg){
List<ClassLoader> classLoadersList = new LinkedList<ClassLoader>();
classLoadersList.add(ClasspathHelper.contextClassLoader());
classLoadersList.add(ClasspathHelper.staticClassLoader());
Reflections reflections = new Reflections(new ConfigurationBuilder()
.setScanners(new SubTypesScanner(false), new ResourcesScanner())
.setUrls(ClasspathHelper.forClassLoader(classLoadersList.toArray(new ClassLoader[0])))
.filterInputsBy(new FilterBuilder().include(FilterBuilder.prefix(pckg))));
return reflections.getSubTypesOf(Object.class);
}