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
Fields Modifier and Type Field Description private File
distCleanupDirectory
The location to which to checkout the dist subversion repository under our working directory, which was given above.private String
distServer
The ID of the server (specified in settings.xml) which should be used for dist authentication.private String
distSvnStagingUrl
The url of the subversion repository to which we wish the artifacts to be staged.private Boolean
dryRun
A boolean that determines whether or not we actually commit the files up to the subversion repository.private Boolean
isDistModule
A parameter to generally avoid running unless it is specifically turned on by the consuming module.private String
password
The password associated withCommonsDistributionStagingMojo.username
.private org.apache.maven.project.MavenProject
project
TheMavenProject
object is essentially the context of the maven build at a given time.private org.apache.maven.settings.Settings
settings
MavenSettings
.private org.apache.maven.settings.crypto.SettingsDecrypter
settingsDecrypter
MavenSettingsDecrypter
component.private String
username
The username for the distribution subversion repository.private File
workingDirectory
The main working directory for the plugin, namelytarget/commons-release-plugin
, but that assumes that we're using the default maven${project.build.directory}
.
-
Constructor Summary
Constructors Constructor Description CommonsStagingCleanupMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
-
-
-
Field Detail
-
project
@Parameter(defaultValue="${project}", required=true) private org.apache.maven.project.MavenProject project
TheMavenProject
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 workingDirectory
The 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 distCleanupDirectory
The 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
@Parameter(property="commons.release.dryRun", defaultValue="false") private Boolean 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
@Parameter(defaultValue="", property="commons.distSvnStagingUrl") private String 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 isDistModule
A parameter to generally avoid running unless it is specifically turned on by the consuming module.
-
distServer
@Parameter(property="commons.distServer") private String distServer
-
username
@Parameter(property="user.name") private String username
The username for the distribution subversion repository. This is typically your Apache id.
-
password
@Parameter(property="user.password") private String password
The password associated withCommonsDistributionStagingMojo.username
.
-
settings
@Parameter(defaultValue="${settings}", readonly=true, required=true) private org.apache.maven.settings.Settings settings
MavenSettings
.
-
settingsDecrypter
@Component private org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter
MavenSettingsDecrypter
component.
-
-
Constructor Detail
-
CommonsStagingCleanupMojo
public CommonsStagingCleanupMojo()
-
-
Method Detail
-
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
-
-