public interface Naether
Modifier and Type | Method and Description |
---|---|
void |
addBuildArtifact(String notation,
String path)
Add a local Build Artifact manually by String notation and path to the artifact.
|
void |
addBuildArtifact(String notation,
String path,
String pom)
Add a local Build Artifact manually by String notation, path to the artifact,
and path to the POM.
|
void |
addDependencies(Project project)
Add dependencies from a Maven POM
|
void |
addDependencies(Project project,
List<String> scopes)
Add dependencies from a Maven POM, limited to a
List of scopes. |
void |
addDependencies(String pomPath)
Add dependences from a Maven POM
|
void |
addDependencies(String pomPath,
List<String> scopes)
Add dependencies from a Maven POM, limited to a List of scopes.
|
void |
addDependency(org.sonatype.aether.graph.Dependency dependency)
Add
Dependency |
void |
addDependency(org.apache.maven.model.Dependency projectDependency)
Add
Dependency |
void |
addDependency(String notation)
Add dependency by String notation with default compile scope
groupId:artifactId:type:version
|
void |
addDependency(String notation,
String scope)
Add dependency by String notation and Maven scope
groupId:artifactId:type:version
|
void |
addRemoteRepository(org.sonatype.aether.repository.RemoteRepository remoteRepository)
Add
RemoteRepository |
void |
addRemoteRepository(String id,
String type,
String url)
Add a
RemoteRepository |
void |
addRemoteRepositoryByUrl(String url)
Add a
RemoteRepository by String url |
void |
addRemoteRepositoryByUrl(String url,
String username,
String password)
Add a
RemoteRepository by String url with String username and
password for authentication. |
void |
clearBuildArtifacts()
Clear local BuildArtifacts
|
void |
clearDependencies()
Clear dependencies
|
void |
clearRemoteRepositories()
Remove all
RemoteRepository |
Collection<org.sonatype.aether.graph.Dependency> |
currentDependencies()
Get the current dependencies.
|
void |
deployArtifact(DeployArtifact deployArtifact)
Deploy an Artifact
|
List<File> |
downloadArtifacts(List artifactsOrNotations)
Download to the local repository a List of Artifact or String
notations.
|
List<org.sonatype.aether.artifact.Artifact> |
getBuildArtifacts()
Get List of local artifacts that are used in dependency
resolution.
|
Set<org.sonatype.aether.graph.Dependency> |
getDependencies()
List of Dependency |
Map<String,Map> |
getDependenciesGraph()
Graph of Dependencies with their transitive Dependencies as children.
|
Set<String> |
getDependenciesNotation()
List of Dependency converted to String notation |
Map<String,String> |
getDependenciesPath()
Map of String notation and the corresponding String file path |
String |
getLocalRepoPath()
Get local repository path.
|
Set<org.sonatype.aether.repository.RemoteRepository> |
getRemoteRepositories()
Get
Set of RemoteRepository |
List<String> |
getRemoteRepositoryUrls()
Get
List of String urls |
String |
getResolvedClassPath()
Classpath from resolved artifacts
|
void |
install(String notation,
String pomPath,
String filePath)
Install Artifact to local repo.
|
void |
resolveDependencies()
Resolve dependencies and download artifacts
|
void |
resolveDependencies(boolean downloadArtifacts)
Resolve Dependencies
|
void |
resolveDependencies(boolean downloadArtifacts,
Map<String,String> properties)
Resolve Dependencies
|
void |
setBuildArtifacts(List<org.sonatype.aether.artifact.Artifact> buildArtifacts)
Set List for local artifacts that are used in dependency resolution.
|
void |
setDependencies(Set<org.sonatype.aether.graph.Dependency> dependencies)
Set the
List of Dependency |
void |
setLocalRepoPath(String repoPath)
Set local repository path.
|
void |
setRemoteRepositories(Set<org.sonatype.aether.repository.RemoteRepository> remoteRepositories)
Set
List of RemoteRepository |
void clearDependencies()
void clearBuildArtifacts()
void addBuildArtifact(String notation, String path, String pom)
notation
- Stringpath
- Stringpom
- Stringvoid addBuildArtifact(String notation, String path) throws NaetherException
notation
- Stringpath
- StringNaetherException
- if failed to create a POMvoid addDependency(String notation)
notation
- Stringvoid addDependency(String notation, String scope)
notation
- Stringscope
- Stringvoid addDependency(org.sonatype.aether.graph.Dependency dependency)
Dependency
dependency
- Dependency
void addDependency(org.apache.maven.model.Dependency projectDependency)
Dependency
projectDependency
- Dependency
void addDependencies(String pomPath) throws ProjectException
pomPath
- String path to POMProjectException
- exceptionvoid addDependencies(String pomPath, List<String> scopes) throws ProjectException
pomPath
- String path to POMscopes
- List of scopesProjectException
- exceptionvoid addDependencies(Project project) throws ProjectException
project
- Project
ProjectException
- exceptionvoid addDependencies(Project project, List<String> scopes) throws ProjectException
List
of scopes. Adds
all Repositories from the Maven Pom.project
- Project
scopes
- List of dependency scopesProjectException
- exceptionvoid clearRemoteRepositories()
RemoteRepository
void addRemoteRepositoryByUrl(String url) throws NaetherException
RemoteRepository
by String urlurl
- StringNaetherException
- exceptionvoid addRemoteRepositoryByUrl(String url, String username, String password) throws URLException
RemoteRepository
by String url with String username and
password for authentication.url
- Stringusername
- Stringpassword
- StringURLException
- exceptionvoid addRemoteRepository(String id, String type, String url)
RemoteRepository
id
- Stringtype
- Stringurl
- Stringvoid addRemoteRepository(org.sonatype.aether.repository.RemoteRepository remoteRepository)
RemoteRepository
remoteRepository
- RemoteRepository
void setRemoteRepositories(Set<org.sonatype.aether.repository.RemoteRepository> remoteRepositories)
List
of RemoteRepository
remoteRepositories
- List
Set<org.sonatype.aether.repository.RemoteRepository> getRemoteRepositories()
Set
of RemoteRepository
Set
List<String> getRemoteRepositoryUrls()
List
of String urlsList
void resolveDependencies() throws URLException, DependencyException
URLException
- exceptionDependencyException
- exceptionvoid resolveDependencies(boolean downloadArtifacts) throws URLException, DependencyException
downloadArtifacts
- boolean if artifacts are to be downloadedURLException
- exceptionDependencyException
- exceptionvoid resolveDependencies(boolean downloadArtifacts, Map<String,String> properties) throws URLException, DependencyException
downloadArtifacts
- if artifacts are to be downloadedproperties
- Map of propertiesURLException
- exceptionDependencyException
- exceptionvoid deployArtifact(DeployArtifact deployArtifact) throws DeployException
deployArtifact
- DeployArtifact
DeployException
- exceptionvoid install(String notation, String pomPath, String filePath) throws InstallException
notation
- StringpomPath
- StringfilePath
- StringInstallException
- exceptionCollection<org.sonatype.aether.graph.Dependency> currentDependencies()
resolveDependencies()
has been called, other returns getDependencies()
String getResolvedClassPath()
Set<String> getDependenciesNotation()
List
of Dependency
converted to String notationList
Map<String,String> getDependenciesPath()
Map
of String notation and the corresponding String file pathMap
Map<String,Map> getDependenciesGraph()
void setLocalRepoPath(String repoPath)
repoPath
- StringString getLocalRepoPath()
void setDependencies(Set<org.sonatype.aether.graph.Dependency> dependencies)
List
of Dependency
dependencies
- List
Set<org.sonatype.aether.graph.Dependency> getDependencies()
List
of Dependency
List
List<org.sonatype.aether.artifact.Artifact> getBuildArtifacts()
void setBuildArtifacts(List<org.sonatype.aether.artifact.Artifact> buildArtifacts)
buildArtifacts
- ListList<File> downloadArtifacts(List artifactsOrNotations) throws NaetherException
artifactsOrNotations
- List
of Artifact or String notationNaetherException
- exceptionCopyright © 2015. All rights reserved.