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 Classes
    Modifier and Type
    Class
    Description
    private static final class 
    ArtifactHandler implementation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Boolean
    Attach the produced artifact.
    private File
    The root directory of the default FileSet.
    private String
    behavior when a duplicate file is found.
    private String
    Comma or space separated list of exclude patterns.
    private String
    The extension of the generated file.
    private org.apache.tools.ant.types.ZipFileSet[]
    Content to include in the zip.
    private String
    The file name of the created zip.
    private String
    Comma or space separated list of include patterns.
    private File
    The directory where the zip will be created.
    private org.apache.maven.project.MavenProject
    The maven project.
    private static final String
    Parameters property prefix.

    Fields inherited from interface org.apache.maven.plugin.Mojo

    ROLE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     

    Methods inherited from class org.apache.maven.plugin.AbstractMojo

    getLog, getPluginContext, setLog, setPluginContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PROPERTY_PREFIX

      private static final String PROPERTY_PREFIX
      Parameters property prefix.
      See Also:
    • project

      @Parameter(defaultValue="${project}", required=true, readonly=true) private org.apache.maven.project.MavenProject project
      The maven project.
    • outputDirectory

      @Parameter(property="gfzip.outputDirectoryoutputDirectory", defaultValue="${project.build.directory}") private File outputDirectory
      The directory where the zip will be created.
    • finalName

      @Parameter(property="gfzip.outputDirectoryfinalName", defaultValue="${project.build.finalName}") private String finalName
      The file name of the created zip.
    • duplicate

      @Parameter(property="gfzip.outputDirectoryduplicate", defaultValue="add") private String 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[] filesets
      Content to include in the zip.
    • dir

      @Parameter(property="gfzip.outputDirectorydir", defaultValue="${project.build.directory}") private File dir
      The root directory of the default FileSet. Only when no fileset(s) provided.
    • includes

      @Parameter(property="gfzip.outputDirectoryincludes") private String includes
      Comma or space separated list of include patterns. all files are included when omitted ; Only when no fileset provided.
    • excludes

      @Parameter(property="gfzip.outputDirectoryexcludes") private String excludes
      Comma or space separated list of exclude patterns. all files are included when omitted ; Only when no fileset provided.
    • extension

      @Parameter(property="gfzip.outputDirectoryextension", defaultValue="zip") private String extension
      The extension of the generated file.
    • attach

      @Parameter(property="gfzip.outputDirectoryattach", defaultValue="true") private Boolean 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.MojoExecutionException
      org.apache.maven.plugin.MojoFailureException