Class ArtifactInstaller
- java.lang.Object
-
- org.codehaus.cargo.maven3.configuration.ArtifactInstaller
-
public class ArtifactInstaller extends Object
An ArtifactInstaller encapsulates the resolving of an artifact from a local or remote Maven repository.
-
-
Constructor Summary
Constructors Constructor Description ArtifactInstaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetArtifactId()StringgetClassifier()StringgetExtractDir()StringgetGroupId()StringgetType()StringgetVersion()Fileresolve(org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver artifactResolver, org.apache.maven.project.ProjectBuildingRequest projectBuildingRequest)Resolves the dependency and return the artifact file.voidsetArtifactId(String artifactId)voidsetClassifier(String classifier)voidsetExtractDir(String extractDir)voidsetGroupId(String groupId)voidsetType(String type)voidsetVersion(String version)
-
-
-
Method Detail
-
getGroupId
public String getGroupId()
- Returns:
- Group id.
-
setGroupId
public void setGroupId(String groupId)
- Parameters:
groupId- Group id.
-
getArtifactId
public String getArtifactId()
- Returns:
- Artifact id.
-
setArtifactId
public void setArtifactId(String artifactId)
- Parameters:
artifactId- Artifact id.
-
getVersion
public String getVersion()
- Returns:
- Version.
-
setVersion
public void setVersion(String version)
- Parameters:
version- Version.
-
getType
public String getType()
- Returns:
- Artifact type.
-
setType
public void setType(String type)
- Parameters:
type- Artifact type.
-
getClassifier
public String getClassifier()
- Returns:
- Classifier.
-
setClassifier
public void setClassifier(String classifier)
- Parameters:
classifier- Classifier.
-
getExtractDir
public String getExtractDir()
- Returns:
- the destination directory where the zipped container install will be installed.
-
setExtractDir
public void setExtractDir(String extractDir)
- Parameters:
extractDir- the destination directory where the zipped container install will be installed.
-
resolve
public File resolve(org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolver artifactResolver, org.apache.maven.project.ProjectBuildingRequest projectBuildingRequest) throws org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException
Resolves the dependency and return the artifact file.- Parameters:
artifactResolver- The artifact resolver is used to dynamically resolveArtifactobjects. It will automatically download whatever needed.projectBuildingRequest- Maven project building request.- Returns:
- Resolved dependency.
- Throws:
org.apache.maven.shared.transfer.artifact.resolve.ArtifactResolverException- If artifact resolution fails or artifact not found.
-
-