Class Jar
- java.lang.Object
-
- net.ssehub.easy.instantiation.java.instantiators.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.IVilTypeCreates 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 JarHandlercreateJarHandler(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)Packssourcefiles intotarget.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)Packssourcefiles intotarget.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)Packssourcefiles intotarget.
-
-
-
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.VilExceptionPackssourcefiles intotarget. Manifest files is assumed to be the default (empty) one.- Parameters:
base- the base path used to make the paths of theartifactsrelative, may be the source or target projectartifacts- the artifacts to be handledjar- 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.VilExceptionPackssourcefiles intotarget.- Parameters:
base- the base path used to make the paths of theartifactsrelative, may be the source or target projectartifacts- the artifacts to be handledjar- the target jar filemanifest- 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.VilExceptionPackssourcefiles intotarget.- Parameters:
base- the base path used to make the paths of theartifactsrelative, may be the source or target projectartifacts- the artifacts to be handledjar- the target jar filemanifest- 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
JarHandlerwhich will use the given manifest file or create a new one if manifest was null.
-
-