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 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
Modifier and TypeFieldDescriptionprivate String
Deprecated.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 Boolean
Deprecated.A parameter to generally avoid running unless it is specifically turned on by the consuming module.private File
Deprecated.private File
Deprecated.The working directory for the plugin which, assuming the maven uses the default${project.build.directory}
, this becomestarget/commons-release-plugin
.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
addToZip
(File directoryToZip, File file, ZipOutputStream zos) Deprecated.Given thedirectoryToZip
we add thefile
to the ZIP archive represented byzos
.void
execute()
Deprecated.private void
getAllSiteFiles
(File siteDirectory, List<File> filesToCompress) Deprecated.By default this method iterates across thetarget/site
directory and adds all the files to thefilesToCompress
List
.private void
writeZipFile
(File outputDirectory, File directoryToZip, List<File> fileList) Deprecated.A helper method for writing all the files in ourfileList
to asite.zip
file 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, assuming the maven uses the default${project.build.directory}
, this becomestarget/commons-release-plugin
. -
siteDirectory
@Parameter(defaultValue="${project.build.directory}/site", property="commons.siteOutputDirectory") private File siteDirectoryDeprecated. -
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 substringhttps
is 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
public CommonsSiteCompressionMojo()Deprecated.
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionDeprecated.- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
getAllSiteFiles
Deprecated.By default this method iterates across thetarget/site
directory and adds all the files to thefilesToCompress
List
. -
writeZipFile
private void writeZipFile(File outputDirectory, File directoryToZip, List<File> fileList) throws IOException Deprecated.A helper method for writing all the files in ourfileList
to asite.zip
file in theworkingDirectory
.- Parameters:
outputDirectory
- is aFile
representing the place to put the site.zip file.directoryToZip
- is aFile
representing the directory of the site (normallytarget/site
).fileList
- the list of files to be zipped up, generally generated bygetAllSiteFiles(File, List)
.- Throws:
IOException
- when the copying of the files goes incorrectly.
-
addToZip
Deprecated.Given thedirectoryToZip
we add thefile
to the ZIP archive represented byzos
.- Parameters:
directoryToZip
- aFile
representing the directory from which the file exists that we are compressing. Generally this istarget/site
.file
- aFile
to add to theZipOutputStream
zos
.zos
- theZipOutputStream
to which to add ourfile
.- Throws:
IOException
- if adding thefile
doesn't work out properly.
-
CommonsDistributionStagingMojo
.