Class Unjar

  • All Implemented Interfaces:
    IVilType

    public class Unjar
    extends java.lang.Object
    implements IVilType
    Unpacks JAR files.
    Author:
    Holger Eichelberger, kroeher
    • Constructor Summary

      Constructors 
      Constructor Description
      Unjar()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Set<FileArtifact> unjar​(Path jar, Path target)
      Packs source files into target without unpacking the manifest.
      static Set<FileArtifact> unjar​(Path jar, Path target, boolean includeManifest)
      Packs source files into target.
      static Set<FileArtifact> unjar​(Path jar, Path target, java.lang.String pattern)
      Packs source files which matches filter into target without unpacking the manifest.
      static Set<FileArtifact> unjar​(Path jar, Path target, java.lang.String pattern, boolean includeManifest)
      Packs source files which matches filter into target without unpacking the manifest.
      • Methods inherited from class java.lang.Object

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

      • Unjar

        public Unjar()
    • Method Detail

      • unjar

        public static Set<FileArtifact> unjar​(Path jar,
                                              Path target)
                                       throws VilException
        Packs source files into target without unpacking the manifest.
        Parameters:
        jar - the JAR file to be unpacked
        target - the target path to unpack to
        Returns:
        the created artifacts
        Throws:
        VilException - in case of unpacking problems
      • unjar

        public static Set<FileArtifact> unjar​(Path jar,
                                              Path target,
                                              boolean includeManifest)
                                       throws VilException
        Packs source files into target.
        Parameters:
        jar - the JAR file to be unpacked
        target - the target path to unpack to
        includeManifest - whether the manifest shall also be unpacked
        Returns:
        the created artifacts
        Throws:
        VilException - in case of unpacking problems
      • unjar

        public static Set<FileArtifact> unjar​(Path jar,
                                              Path target,
                                              java.lang.String pattern)
                                       throws VilException
        Packs source files which matches filter into target without unpacking the manifest.
        Parameters:
        jar - the JAR file to be unpacked
        target - the target path to unpack to
        pattern - an optional ANT pattern used as a filter expression, typically a specific folder or package. May be null if no filter is required.
        Returns:
        the created artifacts
        Throws:
        VilException - in case of unpacking problems
      • unjar

        public static Set<FileArtifact> unjar​(Path jar,
                                              Path target,
                                              java.lang.String pattern,
                                              boolean includeManifest)
                                       throws VilException
        Packs source files which matches filter into target without unpacking the manifest.
        Parameters:
        jar - the JAR file to be unpacked
        target - the target path to unpack to
        pattern - an optional ANT pattern used as a filter expression, typically a specific folder or package. May be null if no filter is required.
        includeManifest - whether the manifest shall also be unpacked
        Returns:
        the created artifacts
        Throws:
        VilException - in case of unpacking problems