public class ClassLoaderResolver extends Object implements Closeable
Constructor and Description |
---|
ClassLoaderResolver(org.apache.maven.plugin.logging.Log log,
org.eclipse.aether.RepositorySystem repositorySystem,
org.eclipse.aether.RepositorySystemSession repositorySystemSession,
List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories)
Creates a new class loader resolver.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
ClassLoader |
resolve(MavenCoordinate mavenCoordinate)
Resolves a Maven coordinate to a class loader that can load all of the coordinates classes.
|
public ClassLoaderResolver(org.apache.maven.plugin.logging.Log log, org.eclipse.aether.RepositorySystem repositorySystem, org.eclipse.aether.RepositorySystemSession repositorySystemSession, List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories)
log
- The Maven log dispatcher.repositorySystem
- The repository system to use.repositorySystemSession
- The repository system session to use.remoteRepositories
- A list of remote repositories available.public ClassLoader resolve(MavenCoordinate mavenCoordinate) throws org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException
mavenCoordinate
- The Maven coordinate to resolve.org.apache.maven.plugin.MojoExecutionException
- If the user configuration results in an error.org.apache.maven.plugin.MojoFailureException
- If the plugin application raises an error.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2014–2019. All rights reserved.