Class CommonsSiteCompressionMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.commons.release.plugin.mojos.CommonsSiteCompressionMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Deprecated
@Mojo(name="compress-site",
defaultPhase=POST_SITE,
threadSafe=true,
aggregator=true)
public final class CommonsSiteCompressionMojo
extends org.apache.maven.plugin.AbstractMojo
Deprecated.
Takes the built
./target/site directory and compresses it to
./target/commons-release-plugin/site.zip.- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringDeprecated.The URL of the Subversion repository to which we wish the artifacts to be staged.Deprecated.The list of files to compress into the site.zip file.private BooleanDeprecated.A parameter to generally avoid running unless it is specifically turned on by the consuming module.private FileDeprecated.The site output directory.private FileDeprecated.The working directory for the plugin, which istarget/commons-release-pluginwhen Maven uses the default${project.build.directory}.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddToZip(File directoryToZip, File file, ZipOutputStream zos) Deprecated.Adds thefilefromdirectoryToZipto the ZIP archive represented byzos.voidexecute()Deprecated.private voidgetAllSiteFiles(File siteDirectory, List<File> filesToCompress) Deprecated.Gets all site files and adds them to thefilesToCompressList.private voidwriteZipFile(File outputDirectory, File directoryToZip, List<File> fileList) Deprecated.Writes all the files infileListto asite.zipfile in theworkingDirectory.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
workingDirectory
@Parameter(defaultValue="${project.build.directory}/commons-release-plugin", property="commons.outputDirectory") private File workingDirectoryDeprecated.The working directory for the plugin, which istarget/commons-release-pluginwhen Maven uses the default${project.build.directory}. -
siteDirectory
@Parameter(defaultValue="${project.build.directory}/site", property="commons.siteOutputDirectory") private File siteDirectoryDeprecated.The site output directory. -
distSvnStagingUrl
Deprecated.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. Note that the prefix to the substringhttpsis a requirement. -
isDistModule
@Parameter(defaultValue="false", property="commons.release.isDistModule") private Boolean isDistModuleDeprecated.A parameter to generally avoid running unless it is specifically turned on by the consuming module. -
filesToCompress
Deprecated.The list of files to compress into the site.zip file.
-
-
Constructor Details
-
CommonsSiteCompressionMojo
-
-
Method Details
-
addToZip
Deprecated.Adds thefilefromdirectoryToZipto the ZIP archive represented byzos.- Parameters:
directoryToZip- AFilerepresenting the directory containing the file to compress. Generally, this istarget/site.file- AFileto add to theZipOutputStreamzos.zos- TheZipOutputStreamto which to add ourfile.- Throws:
IOException- Thrown if an error occurs while adding thefileto the ZIP archive.
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionDeprecated.- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
getAllSiteFiles
Deprecated.Gets all site files and adds them to thefilesToCompressList. This method searches thetarget/sitedirectory by default. -
writeZipFile
private void writeZipFile(File outputDirectory, File directoryToZip, List<File> fileList) throws IOException Deprecated.Writes all the files infileListto asite.zipfile in theworkingDirectory.- Parameters:
outputDirectory- is aFilerepresenting the place to put the site.zip file.directoryToZip- is aFilerepresenting the directory of the site (normallytarget/site).fileList- The list of files to be zipped up, generally generated bygetAllSiteFiles(File, List).- Throws:
IOException- Thrown if an error occurs while copying the files.
-
CommonsDistributionStagingMojo.