Class AetherModelResolver
- java.lang.Object
- 
- jadex.platform.service.dependency.maven.AetherModelResolver
 
- 
- All Implemented Interfaces:
- org.apache.maven.model.resolution.ModelResolver
 
 public class AetherModelResolver extends java.lang.Object implements org.apache.maven.model.resolution.ModelResolverModel resolver implementation using aether.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.List<org.sonatype.aether.repository.RemoteRepository>repositoriesThe remote repositories.protected org.apache.maven.repository.internal.MavenRepositorySystemSessionsessionThe repository system session.protected org.sonatype.aether.RepositorySystemsystemThe aether repository system.
 - 
Constructor SummaryConstructors Constructor Description AetherModelResolver(org.sonatype.aether.RepositorySystem system, org.apache.maven.repository.internal.MavenRepositorySystemSession session, java.util.List<org.sonatype.aether.repository.RemoteRepository> repositories)Create a new aether model resolver.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRepository(org.apache.maven.model.Repository repository)Adds a repository to use for subsequent resolution requests.org.apache.maven.model.resolution.ModelResolvernewCopy()Clones this resolver for usage in a forked resolution process.org.apache.maven.model.building.ModelSourceresolveModel(java.lang.String groupid, java.lang.String id, java.lang.String version)Tries to resolve the POM for the specified coordinates.
 
- 
- 
- 
Field Detail- 
systemprotected org.sonatype.aether.RepositorySystem system The aether repository system.
 - 
sessionprotected org.apache.maven.repository.internal.MavenRepositorySystemSession session The repository system session.
 - 
repositoriesprotected java.util.List<org.sonatype.aether.repository.RemoteRepository> repositories The remote repositories.
 
- 
 - 
Constructor Detail- 
AetherModelResolverpublic AetherModelResolver(org.sonatype.aether.RepositorySystem system, org.apache.maven.repository.internal.MavenRepositorySystemSession session, java.util.List<org.sonatype.aether.repository.RemoteRepository> repositories)Create a new aether model resolver.
 
- 
 - 
Method Detail- 
resolveModelpublic org.apache.maven.model.building.ModelSource resolveModel(java.lang.String groupid, java.lang.String id, java.lang.String version) throws org.apache.maven.model.resolution.UnresolvableModelExceptionTries to resolve the POM for the specified coordinates.- Specified by:
- resolveModelin interface- org.apache.maven.model.resolution.ModelResolver
- Parameters:
- groupid- The group identifier of the POM, must not be- null.
- id- The artifact identifier of the POM, must not be- null.
- version- The version of the POM, must not be- null.
- Returns:
- The source of the requested POM, never null.
- Throws:
- org.apache.maven.model.resolution.UnresolvableModelException- If the POM could not be resolved from any configured repository.
 
 - 
addRepositorypublic void addRepository(org.apache.maven.model.Repository repository) throws org.apache.maven.model.resolution.InvalidRepositoryExceptionAdds a repository to use for subsequent resolution requests. The order in which repositories are added matters, repositories that were added first should also be searched first. When multiple repositories with the same identifier are added, only the first repository being added will be used.- Specified by:
- addRepositoryin interface- org.apache.maven.model.resolution.ModelResolver
- Parameters:
- repository- The repository to add to the internal search chain, must not be- null.
- Throws:
- org.apache.maven.model.resolution.InvalidRepositoryException- If the repository could not be added (e.g. due to invalid URL or layout).
 
 - 
newCopypublic org.apache.maven.model.resolution.ModelResolver newCopy() Clones this resolver for usage in a forked resolution process. In general, implementors need not provide a deep clone. The only requirement is that invocations ofaddRepository(Repository)on the clone do not affect the state of the original resolver and vice versa.- Specified by:
- newCopyin interface- org.apache.maven.model.resolution.ModelResolver
- Returns:
- The cloned resolver, never null.
 
 
- 
 
-