Class Resolver
java.lang.Object
de.iip_ecosphere.platform.tools.maven.dependencies.Resolver
Simple re-usable Maven artifact resolver.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.maven.plugin.logging.Logprivate List<org.eclipse.aether.repository.RemoteRepository> private org.eclipse.aether.RepositorySystemSessionprivate org.eclipse.aether.RepositorySystem -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.maven.plugin.logging.LoggetLog()The log.(package private) StringResolves a list of artifacts to a composed path.(package private) Stringresolve(org.apache.maven.artifact.Artifact artifact) Resolves a single artifact.(package private) Fileresolve(org.eclipse.aether.artifact.DefaultArtifact artifact) Resolves an artifact via the repository system.(package private) FileresolveSpringBootLoader(org.apache.maven.project.MavenProject project) Resolves the spring boot loader from the oktoflow spring propertyorg.springframework.boot.version.(package private) org.eclipse.aether.artifact.DefaultArtifacttranslate(org.apache.maven.artifact.Artifact artifact) Translates a maven artifact to an Aether artifact.
-
Field Details
-
log
private org.apache.maven.plugin.logging.Log log -
remoteRepositories
-
repoSession
private org.eclipse.aether.RepositorySystemSession repoSession -
repoSystem
private org.eclipse.aether.RepositorySystem repoSystem
-
-
Constructor Details
-
Resolver
Resolver(org.eclipse.aether.RepositorySystem repoSystem, org.eclipse.aether.RepositorySystemSession repoSession, List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories, org.apache.maven.plugin.logging.Log log) Creates a resolver instance.- Parameters:
repoSystem- the repo systemrepoSession- the repo sessionremoteRepositories- the remote repositorieslog- the logger
-
-
Method Details
-
translate
org.eclipse.aether.artifact.DefaultArtifact translate(org.apache.maven.artifact.Artifact artifact) Translates a maven artifact to an Aether artifact.- Parameters:
artifact- the maven artifact- Returns:
- the aether artifact
-
resolve
Resolves a single artifact.- Parameters:
artifact- the artifact- Returns:
- the resolved path, empty if not resolvable
-
resolve
File resolve(org.eclipse.aether.artifact.DefaultArtifact artifact) throws org.eclipse.aether.resolution.ArtifactResolutionException Resolves an artifact via the repository system.- Parameters:
artifact- the artifact to resolve- Returns:
- the resolved path
- Throws:
org.eclipse.aether.resolution.ArtifactResolutionException- if resolution fails
-
resolve
Resolves a list of artifacts to a composed path.- Parameters:
artifacts- the artifacts, may be null- Returns:
- the path, may be empty
-
resolveSpringBootLoader
Resolves the spring boot loader from the oktoflow spring propertyorg.springframework.boot.version.- Parameters:
project- the Maven project to resolve on- Returns:
- the resolved file, null if there is none
-
getLog
private org.apache.maven.plugin.logging.Log getLog()The log.- Returns:
- the log
-