Class Jar
- java.lang.Object
-
- net.ssehub.easy.instantiation.java.instantiators.Jar
-
-
Constructor Summary
Constructors Constructor Description Jar()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static JarHandlercreateJarHandler(Path manifest)Creates the JarHandler for creating a new JAR archive.static Set<FileArtifact>jar(Path base, Path artifacts, Path jar, Path manifest)Packssourcefiles intotarget.static Set<FileArtifact>jar(Path base, Collection<FileArtifact> artifacts, Path jar)Packssourcefiles intotarget.static Set<FileArtifact>jar(Path base, Collection<FileArtifact> artifacts, Path jar, Path manifest)Packssourcefiles intotarget.
-
-
-
Method Detail
-
jar
public static Set<FileArtifact> jar(Path base, Collection<FileArtifact> artifacts, Path jar) throws VilException
Packssourcefiles 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:
VilException- in case that processing the JAR file fails for some reason
-
jar
public static Set<FileArtifact> jar(Path base, Collection<FileArtifact> artifacts, Path jar, Path manifest) throws VilException
Packssourcefiles 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:
VilException- in case that processing the JAR file fails for some reason
-
jar
public static Set<FileArtifact> jar(Path base, Path artifacts, Path jar, Path manifest) throws VilException
Packssourcefiles 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:
VilException- in case that processing the JAR file fails for some reason
-
createJarHandler
private static JarHandler createJarHandler(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.
-
-