Class CommonsStagingCleanupMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.commons.release.plugin.mojos.CommonsStagingCleanupMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="clean-staging",
defaultPhase=POST_CLEAN,
threadSafe=true,
aggregator=true)
public class CommonsStagingCleanupMojo
extends org.apache.maven.plugin.AbstractMojo
This class checks out the dev distribution location, checks whether anything exists in the
distribution location, and if it is non-empty it deletes all the resources there.
- Since:
- 1.6
-
Field Summary
Modifier and TypeFieldDescriptionprivate File
The location to which to checkout the dist subversion repository under our working directory, which was given above.private String
The ID of the server (specified in settings.xml) which should be used for dist authentication.private String
The url of the subversion repository to which we wish the artifacts to be staged.private Boolean
A boolean that determines whether or not we actually commit the files up to the subversion repository.private Boolean
A parameter to generally avoid running unless it is specifically turned on by the consuming module.private String
The password associated withCommonsDistributionStagingMojo.username
.private org.apache.maven.project.MavenProject
TheMavenProject
object is essentially the context of the maven build at a given time.private org.apache.maven.settings.Settings
MavenSettings
.private org.apache.maven.settings.crypto.SettingsDecrypter
MavenSettingsDecrypter
component.private String
The username for the distribution subversion repository.private File
The main working directory for the plugin, namelytarget/commons-release-plugin
, but that assumes that we're using the default maven${project.build.directory}
.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
Method Summary
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
project
@Parameter(defaultValue="${project}", required=true) private org.apache.maven.project.MavenProject projectTheMavenProject
object is essentially the context of the maven build at a given time. -
workingDirectory
@Parameter(defaultValue="${project.build.directory}/commons-release-plugin", property="commons.outputDirectory") private File workingDirectoryThe main working directory for the plugin, namelytarget/commons-release-plugin
, but that assumes that we're using the default maven${project.build.directory}
. -
distCleanupDirectory
@Parameter(defaultValue="${project.build.directory}/commons-release-plugin/scm-cleanup", property="commons.distCleanupDirectory") private File distCleanupDirectoryThe location to which to checkout the dist subversion repository under our working directory, which was given above. We then do an SVN delete on all the directories in this repository. -
dryRun
A boolean that determines whether or not we actually commit the files up to the subversion repository. If this is set totrue
, we do all but make the commits. We do checkout the repository in question though. -
distSvnStagingUrl
The url of the subversion repository to which we wish the artifacts to be staged. Typically this would need to be of the form:scm:svn:https://dist.apache.org/repos/dist/dev/commons/foo/version-RC#
. Note. that the prefix to the substringhttps
is a requirement. -
isDistModule
@Parameter(defaultValue="false", property="commons.release.isDistModule") private Boolean isDistModuleA parameter to generally avoid running unless it is specifically turned on by the consuming module. -
distServer
-
username
The username for the distribution subversion repository. This is typically your Apache id. -
password
The password associated withCommonsDistributionStagingMojo.username
. -
settings
@Parameter(defaultValue="${settings}", readonly=true, required=true) private org.apache.maven.settings.Settings settingsMavenSettings
. -
settingsDecrypter
MavenSettingsDecrypter
component.
-
-
Constructor Details
-
CommonsStagingCleanupMojo
public CommonsStagingCleanupMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-