public class ArchiveUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.io.File |
getExtensionArchive(java.lang.String extension,
java.io.File directory)
Returns the archive file for the given extension in the Maven-based repository directory.
|
static java.io.File |
getJarDirectory(java.lang.Class<?> clazz)
Returns the directory where the JAR containing the given class is located on the file system.
|
static java.io.File |
getProfileArchive(java.lang.String profile,
java.io.File directory)
Returns the archive file for the given profile in the Maven-based repository directory.
|
static java.util.List<java.io.File> |
unpack(java.io.File archive,
java.io.File destination)
Expands the JAR and ZIP contents of an archive into the given destination directory.
|
public static java.io.File getJarDirectory(java.lang.Class<?> clazz)
throws java.lang.IllegalStateException
clazz - the classjava.lang.IllegalStateException - if there is an error returning the directorypublic static java.io.File getProfileArchive(java.lang.String profile,
java.io.File directory)
profile - the profile name; if not prefixed with 'profile-', it will be appended/directory - the repository directorypublic static java.io.File getExtensionArchive(java.lang.String extension,
java.io.File directory)
extension - the extension name, which is the Maven artifact iddirectory - the repository directorypublic static java.util.List<java.io.File> unpack(java.io.File archive,
java.io.File destination)
throws java.io.IOException
archive - the archivedestination - the destination directoryjava.io.IOException - if there is an error expanding the archive