Class PublishMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.sonatype.central.publisher.plugin.AbstractPublisherMojo
org.sonatype.central.publisher.plugin.PublishMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="publish", defaultPhase=DEPLOY, requiresOnline=true, threadSafe=true) public class PublishMojo extends AbstractPublisherMojo
  • Constructor Details

    • PublishMojo

      public PublishMojo()
  • Method Details

    • doValidateParameters

      protected void doValidateParameters() throws org.apache.maven.plugin.MojoExecutionException
      Specified by:
      doValidateParameters in class AbstractPublisherMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • doExecute

      protected void doExecute() throws org.apache.maven.plugin.MojoExecutionException
      Specified by:
      doExecute in class AbstractPublisherMojo
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • processSnapshot

      protected void processSnapshot(List<ArtifactWithFile> artifactWithFiles, File deferredDirectory) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • processRelease

      protected void processRelease(List<ArtifactWithFile> artifactWithFiles, File stagingDirectory) throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • postProcessRelease

      protected void postProcessRelease(File stagingDirectory, File outputDirectory, String deploymentName)
    • getArtifactWithFiles

      protected List<ArtifactWithFile> getArtifactWithFiles() throws org.apache.maven.plugin.MojoExecutionException
      Throws:
      org.apache.maven.plugin.MojoExecutionException
    • getWorkDirectory

      protected File getWorkDirectory(File forcedWorkDirectory, String relativePath)
      Gets the working directory for the plugin. Defaults to under the target folder unless overridden. Synchronized because the first execution of this plugin cleans the working directory.
      Parameters:
      forcedWorkDirectory - an override File that points to a valid directory
      relativePath - a path relative to the working directory root for the folder
      Returns:
      a File that points to a valid empty directory for the plugin to use as temporary working storage