Class Jar

  • All Implemented Interfaces:
    net.ssehub.easy.instantiation.core.model.vilTypes.IVilType

    public class Jar
    extends java.lang.Object
    implements net.ssehub.easy.instantiation.core.model.vilTypes.IVilType
    Creates JAR files.
    Author:
    Holger Eichelberger
    • Constructor Summary

      Constructors 
      Constructor Description
      Jar()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static JarHandler createJarHandler​(net.ssehub.easy.instantiation.core.model.artifactModel.Path manifest)
      Creates the JarHandler for creating a new JAR archive.
      static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> jar​(net.ssehub.easy.instantiation.core.model.artifactModel.Path base, net.ssehub.easy.instantiation.core.model.artifactModel.Path artifacts, net.ssehub.easy.instantiation.core.model.artifactModel.Path jar, net.ssehub.easy.instantiation.core.model.artifactModel.Path manifest)
      Packs source files into target.
      static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> jar​(net.ssehub.easy.instantiation.core.model.artifactModel.Path base, net.ssehub.easy.instantiation.core.model.vilTypes.Collection<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> artifacts, net.ssehub.easy.instantiation.core.model.artifactModel.Path jar)
      Packs source files into target.
      static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> jar​(net.ssehub.easy.instantiation.core.model.artifactModel.Path base, net.ssehub.easy.instantiation.core.model.vilTypes.Collection<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> artifacts, net.ssehub.easy.instantiation.core.model.artifactModel.Path jar, net.ssehub.easy.instantiation.core.model.artifactModel.Path manifest)
      Packs source files into target.
      • Methods inherited from class java.lang.Object

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

      • Jar

        public Jar()
    • Method Detail

      • jar

        public static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> jar​(net.ssehub.easy.instantiation.core.model.artifactModel.Path base,
                                                                                                                                                     net.ssehub.easy.instantiation.core.model.vilTypes.Collection<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> artifacts,
                                                                                                                                                     net.ssehub.easy.instantiation.core.model.artifactModel.Path jar)
                                                                                                                                              throws net.ssehub.easy.instantiation.core.model.common.VilException
        Packs source files into target. Manifest files is assumed to be the default (empty) one.
        Parameters:
        base - the base path used to make the paths of the artifacts relative, may be the source or target project
        artifacts - the artifacts to be handled
        jar - the target jar file
        Returns:
        the created artifacts
        Throws:
        net.ssehub.easy.instantiation.core.model.common.VilException - in case that processing the JAR file fails for some reason
      • jar

        public static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> jar​(net.ssehub.easy.instantiation.core.model.artifactModel.Path base,
                                                                                                                                                     net.ssehub.easy.instantiation.core.model.vilTypes.Collection<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> artifacts,
                                                                                                                                                     net.ssehub.easy.instantiation.core.model.artifactModel.Path jar,
                                                                                                                                                     net.ssehub.easy.instantiation.core.model.artifactModel.Path manifest)
                                                                                                                                              throws net.ssehub.easy.instantiation.core.model.common.VilException
        Packs source files into target.
        Parameters:
        base - the base path used to make the paths of the artifacts relative, may be the source or target project
        artifacts - the artifacts to be handled
        jar - the target jar file
        manifest - the manifest file
        Returns:
        the created artifacts
        Throws:
        net.ssehub.easy.instantiation.core.model.common.VilException - in case that processing the JAR file fails for some reason
      • jar

        public static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> jar​(net.ssehub.easy.instantiation.core.model.artifactModel.Path base,
                                                                                                                                                     net.ssehub.easy.instantiation.core.model.artifactModel.Path artifacts,
                                                                                                                                                     net.ssehub.easy.instantiation.core.model.artifactModel.Path jar,
                                                                                                                                                     net.ssehub.easy.instantiation.core.model.artifactModel.Path manifest)
                                                                                                                                              throws net.ssehub.easy.instantiation.core.model.common.VilException
        Packs source files into target.
        Parameters:
        base - the base path used to make the paths of the artifacts relative, may be the source or target project
        artifacts - the artifacts to be handled
        jar - the target jar file
        manifest - the manifest file (may be null, default)
        Returns:
        the created artifacts
        Throws:
        net.ssehub.easy.instantiation.core.model.common.VilException - in case that processing the JAR file fails for some reason
      • createJarHandler

        private static JarHandler createJarHandler​(net.ssehub.easy.instantiation.core.model.artifactModel.Path manifest)
        Creates the JarHandler for creating a new JAR archive.
        Parameters:
        manifest - A path for a manifest file which shall be included in the jar. Maybe null, than a default manifest file will be created.
        Returns:
        A JarHandler which will use the given manifest file or create a new one if manifest was null.