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.AbstractMojoThis 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 FiledistCleanupDirectoryThe location to which to checkout the dist subversion repository under our working directory, which was given above.private StringdistServerThe ID of the server (specified in settings.xml) which should be used for dist authentication.private StringdistSvnStagingUrlThe url of the subversion repository to which we wish the artifacts to be staged.private BooleandryRunA boolean that determines whether or not we actually commit the files up to the subversion repository.private BooleanisDistModuleA parameter to generally avoid running unless it is specifically turned on by the consuming module.private StringpasswordThe password associated withCommonsDistributionStagingMojo.username.private org.apache.maven.project.MavenProjectprojectTheMavenProjectobject is essentially the context of the maven build at a given time.private org.apache.maven.settings.SettingssettingsMavenSettings.private org.apache.maven.settings.crypto.SettingsDecryptersettingsDecrypterMavenSettingsDecryptercomponent.private StringusernameThe username for the distribution subversion repository.private FileworkingDirectoryThe 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 voidexecute()
-
-
-
Field Detail
-
project
@Parameter(defaultValue="${project}", required=true) private org.apache.maven.project.MavenProject projectTheMavenProjectobject 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
@Parameter(property="commons.release.dryRun", defaultValue="false") private Boolean dryRunA 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 distSvnStagingUrlThe 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 substringhttpsis 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
@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 settingsMavenSettings.
-
settingsDecrypter
@Component private org.apache.maven.settings.crypto.SettingsDecrypter settingsDecrypter
MavenSettingsDecryptercomponent.
-
-
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.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
-