Class ZipHelper


  • final class ZipHelper
    extends java.lang.Object
    Helper to create zip files using ant.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static class  ZipHelper.AntBuildListener
      BuilderListener implementation to log Ant events.
      private static class  ZipHelper.LazyHolder
      Lazy singleton holder.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ZipHelper()
      Create a new ZipHelper instance.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static ZipHelper getInstance()
      Get the Singleton instance for ZipHelper.
      (package private) void zip​(java.util.Properties properties, org.apache.maven.plugin.logging.Log mavenLog, java.lang.String duplicate, java.util.List<org.apache.tools.ant.types.ZipFileSet> fsets, java.io.File target)
      Create a zip file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ZipHelper

        private ZipHelper()
        Create a new ZipHelper instance.
    • Method Detail

      • getInstance

        static ZipHelper getInstance()
        Get the Singleton instance for ZipHelper.
        Returns:
        the ZipHelper instance
      • zip

        void zip​(java.util.Properties properties,
                 org.apache.maven.plugin.logging.Log mavenLog,
                 java.lang.String duplicate,
                 java.util.List<org.apache.tools.ant.types.ZipFileSet> fsets,
                 java.io.File target)
        Create a zip file.
        Parameters:
        properties - Ant project properties
        mavenLog - Maven logger
        duplicate - behavior for duplicate file, one of "add", "preserve" or "fail"
        fsets - list of ZipFileSet that describe the resources to zip
        target - the File instance for the zip file to create