Class DefaultArtifactDeployer

  • All Implemented Interfaces:
    ArtifactDeployer, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

    @Component(role=ArtifactDeployer.class)
    class DefaultArtifactDeployer
    extends java.lang.Object
    implements ArtifactDeployer, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private org.codehaus.plexus.PlexusContainer container  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void contextualize​(org.codehaus.plexus.context.Context context)
      Injects the Plexus content.
      void deploy​(org.apache.maven.project.ProjectBuildingRequest request, java.util.Collection<org.apache.maven.artifact.Artifact> mavenArtifacts)  
      void deploy​(org.apache.maven.project.ProjectBuildingRequest request, org.apache.maven.artifact.repository.ArtifactRepository remoteRepository, java.util.Collection<org.apache.maven.artifact.Artifact> mavenArtifacts)  
      private MavenArtifactDeployer getMavenArtifactDeployer​(org.apache.maven.project.ProjectBuildingRequest buildingRequest)  
      private boolean isMaven31()  
      private void validateParameters​(org.apache.maven.project.ProjectBuildingRequest request, java.util.Collection<org.apache.maven.artifact.Artifact> mavenArtifacts)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • container

        private org.codehaus.plexus.PlexusContainer container
    • Constructor Detail

      • DefaultArtifactDeployer

        DefaultArtifactDeployer()
    • Method Detail

      • deploy

        public void deploy​(org.apache.maven.project.ProjectBuildingRequest request,
                           java.util.Collection<org.apache.maven.artifact.Artifact> mavenArtifacts)
                    throws ArtifactDeployerException
        Specified by:
        deploy in interface ArtifactDeployer
        Parameters:
        request - ProjectBuildingRequest
        mavenArtifacts - Artifact
        Throws:
        ArtifactDeployerException - in case of an error.
      • deploy

        public void deploy​(org.apache.maven.project.ProjectBuildingRequest request,
                           org.apache.maven.artifact.repository.ArtifactRepository remoteRepository,
                           java.util.Collection<org.apache.maven.artifact.Artifact> mavenArtifacts)
                    throws ArtifactDeployerException
        Specified by:
        deploy in interface ArtifactDeployer
        Parameters:
        request - the building request
        remoteRepository - the repository to deploy to. If null the mavenArtifact.getRepository() is used.
        mavenArtifacts - the artifacts to deploy
        Throws:
        ArtifactDeployerException - in case of an error.
      • validateParameters

        private void validateParameters​(org.apache.maven.project.ProjectBuildingRequest request,
                                        java.util.Collection<org.apache.maven.artifact.Artifact> mavenArtifacts)
      • isMaven31

        private boolean isMaven31()
        Returns:
        true if the current Maven version is Maven 3.1.
      • contextualize

        public void contextualize​(org.codehaus.plexus.context.Context context)
                           throws org.codehaus.plexus.context.ContextException
        Injects the Plexus content.
        Specified by:
        contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
        Parameters:
        context - Plexus context to inject.
        Throws:
        org.codehaus.plexus.context.ContextException - if the PlexusContainer could not be located.
      • getMavenArtifactDeployer

        private MavenArtifactDeployer getMavenArtifactDeployer​(org.apache.maven.project.ProjectBuildingRequest buildingRequest)
                                                        throws org.codehaus.plexus.component.repository.exception.ComponentLookupException,
                                                               ArtifactDeployerException
        Throws:
        org.codehaus.plexus.component.repository.exception.ComponentLookupException
        ArtifactDeployerException