in log4j-transform-maven-plugin/src/main/java/org/apache/logging/log4j/transform/maven/LocationMojo.java [211:223]
private ClassLoader getProjectDependencies() throws MojoExecutionException {
Set<Artifact> artifacts = project.getArtifacts();
List<URL> urls = new ArrayList<>(artifacts.size() + 1);
try {
urls.add(sourceDirectory.toURI().toURL());
for (Artifact artifact : artifacts) {
urls.add(artifact.getFile().toURI().toURL());
}
} catch (MalformedURLException e) {
throw new MojoExecutionException("An error occurred, while resolving the project's classpath.", e);
}
return new URLClassLoader(urls.toArray(EMPTY_URL_ARRAY));
}