@Mojo(name="detach-distributions",
defaultPhase=VERIFY,
threadSafe=true,
aggregator=true)
public class CommonsDistributionDetachmentMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
private static Set<String> |
ARTIFACT_TYPES_TO_DETACH
A list of "artifact types" in the maven vernacular, to
be detached from the deployment.
|
private List<org.apache.maven.artifact.Artifact> |
detachedArtifacts
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 detached from the maven deployment.
|
private String |
distSvnStagingUrl
The subversion staging url to which we upload all of our staged artifacts.
|
private Boolean |
isDistModule
A parameter to generally avoid running unless it is specifically turned on by the consuming module.
|
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_DETACH
private List<org.apache.maven.artifact.Artifact> detachedArtifacts
@Parameter(defaultValue="${project}",
required=true)
private org.apache.maven.project.MavenProject project
@Parameter(defaultValue="${project.build.directory}/commons-release-plugin",
property="commons.outputDirectory")
private File workingDirectory
target that we use as a sandbox for the plugin.@Parameter(defaultValue="",
property="commons.distSvnStagingUrl")
private String distSvnStagingUrl
@Parameter(defaultValue="false",
property="commons.release.isDistModule")
private Boolean isDistModule
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprivate 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.