in src/main/java/org/apache/sling/scripting/esx/Module.java [618:641]
public ModuleScript resolve(String module, Resource currentResource, String loader) throws ScriptException {
// if x is core module / library return directly the one
log.debug("resolving module: " + module);
ModuleScript script;
if (isGlobalModule(module)) {
// ignore for now
}
if (isLocalModule(module)) {
script = loadLocalModule(module, currentResource, loader);
if (script != null) {
return script;
}
}
// load as module (first split path, then load)
script = loadAsModule(module, currentResource, loader);
if (script != null) {
return script;
}
throw new ScriptException("module not found " + module);
}