Class AbstractDeployMojo

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

    public abstract class AbstractDeployMojo
    extends org.apache.maven.plugin.AbstractMojo
    Abstract class for Deploy mojo's.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String AFFECTED_MAVEN_PACKAGING  
      private static java.lang.String FIXED_MAVEN_VERSION  
      private boolean offline
      Flag whether Maven is currently in online/offline mode.
      protected org.eclipse.aether.RepositorySystem repositorySystem  
      private int retryFailedDeploymentCount
      Parameter used to control how many times a failed deployment will be retried before giving up and failing.
      private org.apache.maven.rtinfo.RuntimeInformation runtimeInformation  
      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 void deploy​(org.eclipse.aether.deployment.DeployRequest deployRequest)  
      (package private) void failIfOffline()  
      protected org.eclipse.aether.repository.RemoteRepository getRemoteRepository​(java.lang.String repositoryId, java.lang.String url)
      Creates resolver RemoteRepository equipped with needed whistles and bells.
      protected void warnIfAffectedPackagingAndMaven​(java.lang.String packaging)
      If this plugin used in pre-3.9.0 Maven, the packaging maven-plugin will not deploy G level metadata.
      • Methods inherited from class org.apache.maven.plugin.AbstractMojo

        getLog, getPluginContext, setLog, setPluginContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.maven.plugin.Mojo

        execute
    • Field Detail

      • offline

        @Parameter(defaultValue="${settings.offline}",
                   readonly=true)
        private boolean offline
        Flag whether Maven is currently in online/offline mode.
      • retryFailedDeploymentCount

        @Parameter(property="retryFailedDeploymentCount",
                   defaultValue="1")
        private int retryFailedDeploymentCount
        Parameter used to control how many times a failed deployment will be retried before giving up and failing. If a value outside the range 1-10 is specified it will be pulled to the nearest value within the range 1-10.
        Since:
        2.7
      • runtimeInformation

        @Component
        private org.apache.maven.rtinfo.RuntimeInformation runtimeInformation
      • session

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

        @Component
        protected org.eclipse.aether.RepositorySystem repositorySystem
      • AFFECTED_MAVEN_PACKAGING

        private static final java.lang.String AFFECTED_MAVEN_PACKAGING
        See Also:
        Constant Field Values
      • FIXED_MAVEN_VERSION

        private static final java.lang.String FIXED_MAVEN_VERSION
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractDeployMojo

        public AbstractDeployMojo()
    • Method Detail

      • failIfOffline

        void failIfOffline()
                    throws org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoFailureException
      • warnIfAffectedPackagingAndMaven

        protected void warnIfAffectedPackagingAndMaven​(java.lang.String packaging)
        If this plugin used in pre-3.9.0 Maven, the packaging maven-plugin will not deploy G level metadata.
      • getRemoteRepository

        protected org.eclipse.aether.repository.RemoteRepository getRemoteRepository​(java.lang.String repositoryId,
                                                                                     java.lang.String url)
        Creates resolver RemoteRepository equipped with needed whistles and bells.
      • deploy

        protected void deploy​(org.eclipse.aether.deployment.DeployRequest deployRequest)
                       throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException