Class ZipMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.glassfish.build.ZipMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="zip",
requiresDependencyResolution=RUNTIME,
defaultPhase=PACKAGE,
requiresProject=true)
public final class ZipMojo
extends org.apache.maven.plugin.AbstractMojo
Creates a zip file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classArtifactHandlerimplementation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BooleanAttach the produced artifact.private FileThe root directory of the default FileSet.private Stringbehavior when a duplicate file is found.private StringComma or space separated list of exclude patterns.private StringThe extension of the generated file.private org.apache.tools.ant.types.ZipFileSet[]Content to include in the zip.private StringThe file name of the created zip.private StringComma or space separated list of include patterns.private FileThe directory where the zip will be created.private org.apache.maven.project.MavenProjectThe maven project.private static final StringParameters property prefix.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
PROPERTY_PREFIX
-
project
@Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject projectThe maven project. -
outputDirectory
@Parameter(property="gfzip.outputDirectoryoutputDirectory", defaultValue="${project.build.directory}") private File outputDirectoryThe directory where the zip will be created. -
finalName
@Parameter(property="gfzip.outputDirectoryfinalName", defaultValue="${project.build.finalName}") private String finalNameThe file name of the created zip. -
duplicate
behavior when a duplicate file is found. Valid values are "add", "preserve", and "fail" ; default value is "add" -
filesets
@Parameter(property="gfzip.outputDirectoryfilesets") private org.apache.tools.ant.types.ZipFileSet[] filesetsContent to include in the zip. -
dir
@Parameter(property="gfzip.outputDirectorydir", defaultValue="${project.build.directory}") private File dirThe root directory of the default FileSet. Only when no fileset(s) provided. -
includes
Comma or space separated list of include patterns. all files are included when omitted ; Only when no fileset provided. -
excludes
Comma or space separated list of exclude patterns. all files are included when omitted ; Only when no fileset provided. -
extension
The extension of the generated file. -
attach
Attach the produced artifact.
-
-
Constructor Details
-
ZipMojo
public ZipMojo()
-
-
Method Details
-
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
-