CommonsDistributionStagingMojo.@Deprecated @Mojo(name="compress-site", defaultPhase=POST_SITE, threadSafe=true, aggregator=true) public class CommonsSiteCompressionMojo extends org.apache.maven.plugin.AbstractMojo
./target/site directory and compresses it to
./target/commons-release-plugin/site.zip.| Modifier and Type | Field and Description |
|---|---|
private String |
distSvnStagingUrl
Deprecated.
The url of the subversion repository to which we wish the artifacts to be staged.
|
private List<File> |
filesToCompress
Deprecated.
The list of files to compress into the site.zip file.
|
private Boolean |
isDistModule
Deprecated.
A parameter to generally avoid running unless it is specifically turned on by the consuming module.
|
private File |
siteDirectory
Deprecated.
|
private File |
workingDirectory
Deprecated.
The working directory for the plugin which, assuming the maven uses the default
${project.build.directory}, this becomes target/commons-release-plugin. |
| Constructor and Description |
|---|
CommonsSiteCompressionMojo()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
addToZip(File directoryToZip,
File file,
ZipOutputStream zos)
Deprecated.
Given the
directoryToZip we add the file to the zip archive represented by
zos. |
void |
execute()
Deprecated.
|
private void |
getAllSiteFiles(File siteDirectory,
List<File> filesToCompress)
Deprecated.
By default this method iterates across the
target/site directory and adds all of the files
to the filesToCompress List. |
private void |
writeZipFile(File outputDirectory,
File directoryToZip,
List<File> fileList)
Deprecated.
A helper method for writing all of the files in our
fileList to a site.zip file
in the workingDirectory. |
@Parameter(defaultValue="${project.build.directory}/commons-release-plugin",
property="commons.outputDirectory")
private File workingDirectory
${project.build.directory}, this becomes target/commons-release-plugin.@Parameter(defaultValue="${project.build.directory}/site",
property="commons.siteOutputDirectory")
private File siteDirectory
@Parameter(defaultValue="",
property="commons.distSvnStagingUrl")
private String distSvnStagingUrl
scm:svn:https://dist.apache.org/repos/dist/dev/commons/foo. Note. that the prefix to the
substring https is a requirement.@Parameter(defaultValue="false",
property="commons.release.isDistModule")
private Boolean isDistModule
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprivate void getAllSiteFiles(File siteDirectory, List<File> filesToCompress)
target/site directory and adds all of the files
to the filesToCompress List.private void writeZipFile(File outputDirectory, File directoryToZip, List<File> fileList) throws IOException
fileList to a site.zip file
in the workingDirectory.outputDirectory - is a File representing the place to put the site.zip file.directoryToZip - is a File representing the directory of the site (normally
target/site).fileList - the list of files to be zipped up, generally generated by
getAllSiteFiles(File, List).IOException - when the copying of the files goes incorrectly.private void addToZip(File directoryToZip, File file, ZipOutputStream zos) throws IOException
directoryToZip we add the file to the zip archive represented by
zos.directoryToZip - a File representing the directory from which the file exists that we are
compressing. Generally this is target/site.file - a File to add to the ZipOutputStream zos.zos - the ZipOutputStream to which to add our file.IOException - if adding the file doesn't work out properly.Copyright © 2018–2022 The Apache Software Foundation. All rights reserved.