use of org.apache.tomee.gradle.embedded.classloader.FilterGradleClassLoader in project tomee by apache.
the class TomEEEmbeddedTask method createLoader.
private ClassLoader createLoader(final ClassLoader parent) {
getLogger().info("Resolving tomee-embedded classpath...");
final Collection<URL> urls = new LinkedHashSet<>(64);
addFiles(modules, urls);
for (final Configuration cc : getProject().getConfigurations()) {
if (applicationScopes.contains(cc.getName())) {
addFiles(cc.getFiles(), urls);
}
}
addFiles(classpath.getFiles(), urls);
// use JVM loader to avoid the noise of gradle and its plugins
return new URLClassLoader(urls.toArray(new URL[urls.size()]), new FilterGradleClassLoader(parent, classloaderFilteredPackages));
}
Aggregations