Package com.atlassian.bamboo.maven
Class DefaultModelResolver
- java.lang.Object
-
- com.atlassian.bamboo.maven.DefaultModelResolver
-
- All Implemented Interfaces:
org.apache.maven.model.resolution.ModelResolver
public class DefaultModelResolver extends Object implements org.apache.maven.model.resolution.ModelResolver
A model resolver to assist building of dependency POMs. This resolver gives priority to those repositories that have been initially specified and repositories discovered in dependency POMs are recessively merged into the search chain.- Author:
- Benjamin Bentmann
- See Also:
DefaultArtifactDescriptorReader
-
-
Constructor Summary
Constructors Constructor Description DefaultModelResolver(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.RequestTrace trace, String context, org.eclipse.aether.impl.ArtifactResolver resolver, org.eclipse.aether.impl.VersionRangeResolver versionRangeResolver, org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManager, List<org.eclipse.aether.repository.RemoteRepository> repositories)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRepository(org.apache.maven.model.Repository repository)
void
addRepository(org.apache.maven.model.Repository repository, boolean replace)
org.apache.maven.model.resolution.ModelResolver
newCopy()
org.apache.maven.model.building.ModelSource
resolveModel(String groupId, String artifactId, String version)
org.apache.maven.model.building.ModelSource
resolveModel(org.apache.maven.model.Dependency dependency)
org.apache.maven.model.building.ModelSource
resolveModel(org.apache.maven.model.Parent parent)
-
-
-
Constructor Detail
-
DefaultModelResolver
public DefaultModelResolver(org.eclipse.aether.RepositorySystemSession session, org.eclipse.aether.RequestTrace trace, String context, org.eclipse.aether.impl.ArtifactResolver resolver, org.eclipse.aether.impl.VersionRangeResolver versionRangeResolver, org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManager, List<org.eclipse.aether.repository.RemoteRepository> repositories)
-
-
Method Detail
-
addRepository
public void addRepository(org.apache.maven.model.Repository repository) throws org.apache.maven.model.resolution.InvalidRepositoryException
- Specified by:
addRepository
in interfaceorg.apache.maven.model.resolution.ModelResolver
- Throws:
org.apache.maven.model.resolution.InvalidRepositoryException
-
addRepository
public void addRepository(org.apache.maven.model.Repository repository, boolean replace) throws org.apache.maven.model.resolution.InvalidRepositoryException
- Specified by:
addRepository
in interfaceorg.apache.maven.model.resolution.ModelResolver
- Throws:
org.apache.maven.model.resolution.InvalidRepositoryException
-
newCopy
public org.apache.maven.model.resolution.ModelResolver newCopy()
- Specified by:
newCopy
in interfaceorg.apache.maven.model.resolution.ModelResolver
-
resolveModel
public org.apache.maven.model.building.ModelSource resolveModel(String groupId, String artifactId, String version) throws org.apache.maven.model.resolution.UnresolvableModelException
- Specified by:
resolveModel
in interfaceorg.apache.maven.model.resolution.ModelResolver
- Throws:
org.apache.maven.model.resolution.UnresolvableModelException
-
resolveModel
public org.apache.maven.model.building.ModelSource resolveModel(org.apache.maven.model.Parent parent) throws org.apache.maven.model.resolution.UnresolvableModelException
- Specified by:
resolveModel
in interfaceorg.apache.maven.model.resolution.ModelResolver
- Throws:
org.apache.maven.model.resolution.UnresolvableModelException
-
resolveModel
public org.apache.maven.model.building.ModelSource resolveModel(org.apache.maven.model.Dependency dependency) throws org.apache.maven.model.resolution.UnresolvableModelException
- Specified by:
resolveModel
in interfaceorg.apache.maven.model.resolution.ModelResolver
- Throws:
org.apache.maven.model.resolution.UnresolvableModelException
-
-