public class AetherModuleResolver extends Object implements ModuleResolver
Constructor and Description |
---|
AetherModuleResolver(File localRepository,
Map<String,String> remoteRepositories,
MavenProperties mavenProperties)
Create an instance specifying the locations of the local and remote repositories.
|
Modifier and Type | Method and Description |
---|---|
org.springframework.core.io.Resource |
resolve(Coordinates coordinates)
Resolve an artifact and return its location in the local repository.
|
org.springframework.core.io.Resource[] |
resolve(Coordinates root,
Coordinates[] includes,
String[] excludePatterns)
Resolve a set of artifacts based on their coordinates, including their dependencies, and return the locations of
the transitive set in the local repository.
|
void |
setOffline(boolean offline) |
org.springframework.core.io.FileSystemResource |
toResource(org.eclipse.aether.resolution.ArtifactResult resolvedArtifact) |
public AetherModuleResolver(File localRepository, Map<String,String> remoteRepositories, MavenProperties mavenProperties)
localRepository
- the root path of the local maven repositoryremoteRepositories
- a Map containing pairs of (repository ID,repository URL). This
may be null or empty if the local repository is off line.mavenProperties
- the properties for the maven repository, proxy settings.public void setOffline(boolean offline)
public org.springframework.core.io.Resource resolve(Coordinates coordinates)
resolve
in interface ModuleResolver
coordinates
- the Maven coordinates of the artifactFileSystemResource
representing the resolved artifact in the local repositoryRuntimeException
- if the artifact does not exist or the resolution failspublic org.springframework.core.io.Resource[] resolve(Coordinates root, Coordinates[] includes, String[] excludePatterns)
resolve
in interface ModuleResolver
root
- the Maven coordinates of the artifactsincludes
- a list of coordinates to include along the main resourceexcludePatterns
- a list of exclusion patternsFileSystemResource
representing the resolved artifact in the local repositoryRuntimeException
- if the artifact does not exist or the resolution failsPatternExclusionsDependencyFilter
public org.springframework.core.io.FileSystemResource toResource(org.eclipse.aether.resolution.ArtifactResult resolvedArtifact)
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.