private static ClassLoader createModuleClassLoader(Resource moduleLocation, ClassLoader parent,
			Iterable<String> patterns) {
		try {
			File moduleFile = moduleLocation.getFile();
			Archive moduleArchive = moduleFile.isDirectory() ? new ExplodedArchive(moduleFile) : new JarFileArchive
					(moduleFile);

			List<URL> urls = new ArrayList<>();

			ResourcePatternResolver resolver = new ArchiveResourceLoader(moduleArchive);

			for (String pattern : patterns) {
				for (Resource jar : resolver.getResources(pattern)) {
					urls.add(jar.getURL());
				}
			}

			// Add the module archive itself
			urls.add(moduleArchive.getUrl());
			return new ParentLastURLClassLoader(urls.toArray(new URL[urls.size()]), parent);
		}
		catch (IOException e) {
			throw new RuntimeException("Exception creating module classloader for " + moduleLocation, e);
		}
	}
Create a "simple" ClassLoader for a module, suitable for early discovery phase, before module options are known.
Only the default library paths are used.
spring-xd-module/src/main/java/org/springframework/xd/module/options/ModuleUtils.java