Class ArtifactInstaller


  • public class ArtifactInstaller
    extends Object
    An ArtifactInstaller encapsulates the resolving of an artifact from a local or remote Maven repository.
    • Constructor Detail

      • ArtifactInstaller

        public ArtifactInstaller()
    • 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 resolve Artifact objects. 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.