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
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected List<ArtifactWithFile> protected FilegetWorkDirectory(File forcedWorkDirectory, String relativePath) Gets the working directory for the plugin.protected voidpostProcessRelease(File stagingDirectory, File outputDirectory, String deploymentName) protected voidprocessRelease(List<ArtifactWithFile> artifactWithFiles, File stagingDirectory) protected voidprocessSnapshot(List<ArtifactWithFile> artifactWithFiles, File deferredDirectory) Methods inherited from class org.sonatype.central.publisher.plugin.AbstractPublisherMojo
execute, getArtifactFactory, getMavenSession, getMojoExecution, getMojoUtils, getPluginArtifactId, getPluginGav, getPluginGroupId, getProjectUtils, isFailOnBuildFailure, isSkipPublishing, validateParametersMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
PublishMojo
public PublishMojo()
-
-
Method Details
-
doValidateParameters
protected void doValidateParameters() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
doValidateParametersin classAbstractPublisherMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
doExecute
protected void doExecute() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
doExecutein classAbstractPublisherMojo- 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
-
getArtifactWithFiles
protected List<ArtifactWithFile> getArtifactWithFiles() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getWorkDirectory
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 directoryrelativePath- 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
-