@Component(role=ArtifactInstaller.class) class DefaultArtifactInstaller extends java.lang.Object implements ArtifactInstaller, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Modifier and Type | Field and Description |
---|---|
private org.codehaus.plexus.PlexusContainer |
container |
Constructor and Description |
---|
DefaultArtifactInstaller() |
Modifier and Type | Method and Description |
---|---|
private boolean |
canFindCoreClass(java.lang.String className) |
void |
contextualize(org.codehaus.plexus.context.Context context)
Injects the Plexus content.
|
void |
install(org.apache.maven.project.ProjectBuildingRequest request,
java.util.Collection<org.apache.maven.artifact.Artifact> mavenArtifacts) |
void |
install(org.apache.maven.project.ProjectBuildingRequest request,
java.io.File localRepositry,
java.util.Collection<org.apache.maven.artifact.Artifact> mavenArtifacts) |
private boolean |
isMaven31() |
private void |
validateParameters(org.apache.maven.project.ProjectBuildingRequest request,
java.util.Collection<org.apache.maven.artifact.Artifact> mavenArtifacts) |
public void install(org.apache.maven.project.ProjectBuildingRequest request, java.util.Collection<org.apache.maven.artifact.Artifact> mavenArtifacts) throws ArtifactInstallerException, java.lang.IllegalArgumentException
install
in interface ArtifactInstaller
request
- ProjectBuildingRequest
mavenArtifacts
- Artifact
(no null or empty collection allowed.)ArtifactInstallerException
- in case of an error.java.lang.IllegalArgumentException
- in case request
is null
, mavenArtifacts
is null
or mavenArtifacts
is empty (mavenArtifacts.isEmpty()
== true
).public void install(org.apache.maven.project.ProjectBuildingRequest request, java.io.File localRepositry, java.util.Collection<org.apache.maven.artifact.Artifact> mavenArtifacts) throws ArtifactInstallerException
install
in interface ArtifactInstaller
request
- ProjectBuildingRequest
.localRepositry
- The location for the local repository.mavenArtifacts
- Collection of MavenArtifacts
ArtifactInstallerException
- In case of an error which can be the a given artifact can not be found or the
installation has failed.private void validateParameters(org.apache.maven.project.ProjectBuildingRequest request, java.util.Collection<org.apache.maven.artifact.Artifact> mavenArtifacts)
private boolean isMaven31()
private boolean canFindCoreClass(java.lang.String className)
public void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextException
contextualize
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
context
- Plexus context to inject.org.codehaus.plexus.context.ContextException
- if the PlexusContainer could not be located.