@Mojo(name="detach-distributions",
defaultPhase=VERIFY,
threadSafe=true)
public class CommonsDistributionDetachmentMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
private static Set<String> |
ARTIFACT_TYPES_TO_DETATCH
A list of "artifact types" in the maven vernacular, to
be detached from the deployment.
|
private List<org.apache.maven.artifact.Artifact> |
detatchedArtifacts
This list is supposed to hold the maven references to the aformentioned artifacts so that we
can upload them to svn after they've been detatched from the maven deployment.
|
private String |
distSvnStagingUrl
The subversion staging url to which we upload all of our staged artifacts.
|
private org.apache.maven.project.MavenProject |
project
The maven project context injection so that we can get a hold of the variables at hand.
|
private File |
workingDirectory
The working directory in
target that we use as a sandbox for the plugin. |
Constructor and Description |
---|
CommonsDistributionDetachmentMojo() |
Modifier and Type | Method and Description |
---|---|
private void |
copyRemovedArtifactsToWorkingDirectory()
A helper method to copy the newly detached artifacts to
target/commons-release-plugin
so that the CommonsDistributionStagingMojo can find the artifacts later. |
void |
execute() |
private String |
getMd5FilePath(File workingDirectory,
File file)
A helper method to create a file path for the
md5 signature file from a given file. |
private String |
getSha1FilePath(File workingDirectory,
File file)
A helper method to create a file path for the
sha1 signature file from a given file. |
private void |
sha1AndMd5SignArtifacts()
A helper method that creates md5 and sha1 signature files for our detached artifacts in the
target/commons-release-plugin directory for the purpose of being uploade by
the CommonsDistributionStagingMojo . |
private static final Set<String> ARTIFACT_TYPES_TO_DETATCH
private List<org.apache.maven.artifact.Artifact> detatchedArtifacts
@Parameter(defaultValue="${project}", required=true) private org.apache.maven.project.MavenProject project
@Parameter(defaultValue="${project.build.directory}/commons-release-plugin", alias="outputDirectory") private File workingDirectory
target
that we use as a sandbox for the plugin.@Parameter(required=true) private String distSvnStagingUrl
public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void copyRemovedArtifactsToWorkingDirectory() throws org.apache.maven.plugin.MojoExecutionException
target/commons-release-plugin
so that the CommonsDistributionStagingMojo
can find the artifacts later.org.apache.maven.plugin.MojoExecutionException
- if some form of an IOException
occurs, we want it
properly wrapped so that maven can handle it.private void sha1AndMd5SignArtifacts() throws org.apache.maven.plugin.MojoExecutionException
target/commons-release-plugin
directory for the purpose of being uploade by
the CommonsDistributionStagingMojo
.org.apache.maven.plugin.MojoExecutionException
- if some form of an IOException
occurs, we want it
properly wrapped so that maven can handle it.private String getMd5FilePath(File workingDirectory, File file)
md5
signature file from a given file.Copyright © 2018 The Apache Software Foundation. All rights reserved.