public class RepositorySystemFactory extends Object
RepositorySystem from Eclipse Aether to work in offline mode and resolve dependencies
through a WorkspaceReader and a LocalRepository.
Any missing Artifact while resolving the dependency graph will be logged along with the path to these unresolved
artifacts.
It is assumed that before this is used either Maven triggered the build and resolved dependencies, downloaded and installed
them in the local repository, or the IDE downloaded and installed them using Maven plugins.
It also supports a WorkspaceReader to resolve from Workspace artifacts that were not yet
packaged (multi-module projects in Maven or project references in IDE) if a WorkspaceLocationResolver is provided.| Constructor and Description |
|---|
RepositorySystemFactory() |
| Modifier and Type | Method and Description |
|---|---|
static DependencyResolver |
newOfflineDependencyResolver(List<URL> classPath,
WorkspaceLocationResolver workspaceLocationResolver,
File mavenLocalRepositoryLocation)
Creates an instance of the
RepositorySystemFactory to collect Maven dependencies. |
static DependencyResolver |
newOnlineDependencyResolver(List<URL> classPath,
WorkspaceLocationResolver workspaceLocationResolver,
File mavenLocalRepositoryLocation,
List<String> remoteRepositories)
Creates an instance of the
RepositorySystemFactory to collect Maven dependencies. |
public static DependencyResolver newOfflineDependencyResolver(List<URL> classPath, WorkspaceLocationResolver workspaceLocationResolver, File mavenLocalRepositoryLocation)
RepositorySystemFactory to collect Maven dependencies.classPath - URL's from class pathworkspaceLocationResolver - WorkspaceLocationResolver to resolve artifactId's Paths from workspace. Not
null.public static DependencyResolver newOnlineDependencyResolver(List<URL> classPath, WorkspaceLocationResolver workspaceLocationResolver, File mavenLocalRepositoryLocation, List<String> remoteRepositories)
RepositorySystemFactory to collect Maven dependencies.classPath - URL's from class pathworkspaceLocationResolver - WorkspaceLocationResolver to resolve artifactId's Paths from workspace. Not
null.mavenLocalRepositoryLocation - file system location for the local Maven repository to resolve offline dependencies.remoteRepositories - list of String with URL of remote repositories to resolve online dependencies not present in local Maven repository.Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.