Class AbstractInstallMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
    Direct Known Subclasses:
    InstallFileMojo, InstallMojo

    public abstract class AbstractInstallMojo
    extends org.apache.maven.plugin.AbstractMojo
    Common fields for installation mojos.
    Author:
    Brett Porter
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.maven.shared.transfer.repository.RepositoryManager repositoryManager  
      protected org.apache.maven.execution.MavenSession session  
      • Fields inherited from interface org.apache.maven.plugin.Mojo

        ROLE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected File getLocalRepoFile​(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.artifact.Artifact artifact)
      Gets the path of the specified artifact within the local repository.
      protected File getLocalRepoFile​(org.apache.maven.project.ProjectBuildingRequest buildingRequest, org.apache.maven.project.artifact.ProjectArtifactMetadata metadata)
      Gets the path of the specified artifact metadata within the local repository.
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from interface org.apache.maven.plugin.Mojo

        execute
    • Field Detail

      • repositoryManager

        @Component
        protected org.apache.maven.shared.transfer.repository.RepositoryManager repositoryManager
      • session

        @Parameter(defaultValue="${session}",
                   required=true,
                   readonly=true)
        protected org.apache.maven.execution.MavenSession session
    • Constructor Detail

      • AbstractInstallMojo

        public AbstractInstallMojo()
    • Method Detail

      • getLocalRepoFile

        protected File getLocalRepoFile​(org.apache.maven.project.ProjectBuildingRequest buildingRequest,
                                        org.apache.maven.artifact.Artifact artifact)
        Gets the path of the specified artifact within the local repository. Note that the returned path need not exist (yet).
        Parameters:
        buildingRequest - ProjectBuildingRequest.
        artifact - The artifact whose local repo path should be determined, must not be null.
        Returns:
        The absolute path to the artifact when installed, never null.
      • getLocalRepoFile

        protected File getLocalRepoFile​(org.apache.maven.project.ProjectBuildingRequest buildingRequest,
                                        org.apache.maven.project.artifact.ProjectArtifactMetadata metadata)
        Gets the path of the specified artifact metadata within the local repository. Note that the returned path need not exist (yet).
        Parameters:
        buildingRequest - ProjectBuildingRequest.
        metadata - The artifact metadata whose local repo path should be determined, must not be null.
        Returns:
        The absolute path to the artifact metadata when installed, never null.