use of org.codehaus.plexus.resource.loader.ThreadContextClasspathResourceLoader in project maven-plugins by apache.
the class LicenseResourceManager method getResource.
@Override
public PlexusResource getResource(String name) throws ResourceNotFoundException {
for (ResourceLoader resourceLoader : resourceLoaders.values()) {
if (resourceLoader instanceof ThreadContextClasspathResourceLoader && !"config/maven-header.txt".equals(name)) {
// classloader, only allow config/maven-header.txt
continue;
}
try {
PlexusResource resource = resourceLoader.getResource(name);
getLogger().debug("The resource '" + name + "' was found as " + resource.getName() + ".");
return resource;
} catch (ResourceNotFoundException e) {
getLogger().debug("The resource '" + name + "' was not found with resourceLoader " + resourceLoader.getClass().getName() + ".");
}
}
throw new ResourceNotFoundException(name);
}
Aggregations