public class JarManifestUtilities
extends java.lang.Object
Class-Path property.
Note that:
L:/my/JarFile.jar:
Class-Path: myJar1.jar \
myJar2.jar
The getDependencies(java.net.URL) will return the following URLs:
L:/my/myJar1.jarL:/my/myJar2.jar| Modifier and Type | Field and Description |
|---|---|
static boolean |
ALLOW_UNUSED_EXPECTED_FILES
True if files which are in the directories but not used in the ClassPath are allowed.
|
static boolean |
PRINT_ERRORS
True if errors must be printed on the console.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkDependencies(java.net.URL jarFile)
Check that the dependencies present in a Class-Path manifest property do exist.
|
static boolean |
checkDependencies(java.net.URL jarFile,
boolean recursive)
Check that the dependencies present in a Class-Path manifest property do exist.
|
static boolean |
checkDependencies(java.net.URL jarFile,
boolean recursive,
java.util.List<java.net.URL> directories,
java.util.Set<java.lang.String> excludedInputJars,
java.util.Set<java.lang.String> excludedExpectedJars)
Check that the dependencies present in a Class-Path manifest property do exist.
|
static boolean |
checkDependencies(java.net.URL jarFile,
boolean recursive,
java.net.URL directory,
java.util.Set<java.lang.String> excludedExpectedJars)
Check that the dependencies present in a Class-Path manifest property do exist.
|
static boolean |
checkDependencies(java.net.URL jarFile,
boolean recursive,
java.net.URL directory,
java.util.Set<java.lang.String> excludedInputJars,
java.util.Set<java.lang.String> excludedExpectedJars)
Check that the dependencies present in a Class-Path manifest property do exist.
|
static boolean |
checkDependencies(java.net.URL jarFile,
java.util.List<java.net.URL> directories)
Check that the dependencies present in a Class-Path manifest property do exist.
|
static boolean |
checkDependencies(java.net.URL jarFile,
java.util.List<java.net.URL> directories,
java.util.Set<java.lang.String> excludedExpectedJars)
Check that the dependencies present in a Class-Path manifest property do exist.
|
static boolean |
checkDependencies(java.net.URL jarFile,
java.net.URL directory,
java.util.Set<java.lang.String> excludedExpectedJars)
Check that the dependencies present in a Class-Path manifest property do exist.
|
static boolean |
checkDependenciesFromFiles(java.io.File jarFile,
boolean recursive,
java.io.File directory)
Check that the dependencies present in a Class-Path manifest property do exist.Getting the Class-Path property will not be recursive.
|
static boolean |
checkDependenciesFromFiles(java.io.File jarFile,
boolean recursive,
java.util.List<java.io.File> directoriesOrFiles)
Check that the dependencies present in a Class-Path manifest property do exist.Getting the Class-Path property will not be recursive.
|
static boolean |
checkDependenciesFromFiles(java.io.File jarFile,
java.io.File directory)
Check that the dependencies present in a Class-Path manifest property do exist.
|
static boolean |
checkDependenciesFromFiles(java.io.File jarFile,
java.util.List<java.io.File> directoriesOrFiles)
Check that the dependencies present in a Class-Path manifest property do exist.
|
static java.util.List<java.net.URL> |
getDependencies(java.util.List<java.net.URL> jarFiles)
Return list of Class-Path dependencies from a list of Jar files.
|
static java.util.List<java.net.URL> |
getDependencies(java.util.List<java.net.URL> jarFiles,
boolean recursive)
Return the list of Class-Path dependencies from a list of Jar files.
|
static java.util.List<java.net.URL> |
getDependencies(java.net.URL jarFile)
Return the list of Class-Path dependencies from one Jar file.
|
static java.util.List<java.net.URL> |
getDependencies(java.net.URL jarFile,
boolean recursive)
Return the list of Class-Path dependencies from one Jar file.
|
public static boolean PRINT_ERRORS
public static boolean ALLOW_UNUSED_EXPECTED_FILES
public static boolean checkDependencies(java.net.URL jarFile)
jarFile - the jar filepublic static boolean checkDependencies(java.net.URL jarFile,
boolean recursive)
jarFile - the jar filerecursive - true if the handling of Class-path should be recursivepublic static boolean checkDependenciesFromFiles(java.io.File jarFile,
java.io.File directory)
jarFile - the jar filedirectory - the directory to look for the expected dependenciespublic static boolean checkDependenciesFromFiles(java.io.File jarFile,
java.util.List<java.io.File> directoriesOrFiles)
jarFile - the jar filedirectoriesOrFiles - the directories or files to look for the expected dependenciespublic static boolean checkDependenciesFromFiles(java.io.File jarFile,
boolean recursive,
java.util.List<java.io.File> directoriesOrFiles)
jarFile - the jar filerecursive - true if the handling of Class-path should be recursivedirectoriesOrFiles - the directories or files to look for the expected dependenciespublic static boolean checkDependenciesFromFiles(java.io.File jarFile,
boolean recursive,
java.io.File directory)
jarFile - the jar filerecursive - true if the handling of Class-path should be recursivedirectory - the directory to look for the expected dependenciespublic static boolean checkDependencies(java.net.URL jarFile,
java.util.List<java.net.URL> directories)
jarFile - the jar filedirectories - the directories to look for the expected dependenciespublic static boolean checkDependencies(java.net.URL jarFile,
java.util.List<java.net.URL> directories,
java.util.Set<java.lang.String> excludedExpectedJars)
jarFile - the jar filedirectories - the directories to look for the expected dependenciesexcludedExpectedJars - the jar file names to exclude from the list of expected dependenciespublic static boolean checkDependencies(java.net.URL jarFile,
java.net.URL directory,
java.util.Set<java.lang.String> excludedExpectedJars)
jarFile - the jar filedirectory - the directory to look for the expected dependenciesexcludedExpectedJars - the jar file names to exclude from the list of expected dependenciespublic static boolean checkDependencies(java.net.URL jarFile,
boolean recursive,
java.net.URL directory,
java.util.Set<java.lang.String> excludedInputJars,
java.util.Set<java.lang.String> excludedExpectedJars)
jarFile - the jar filerecursive - true if the handling of Class-path should be recursivedirectory - the directory to look for the expected dependenciesexcludedInputJars - he jar file names to exclude from the list of returned Class-path dependenciesexcludedExpectedJars - the jar file names to exclude from the list of expected dependenciespublic static boolean checkDependencies(java.net.URL jarFile,
boolean recursive,
java.net.URL directory,
java.util.Set<java.lang.String> excludedExpectedJars)
jarFile - the jar filerecursive - true if the handling of Class-path should be recursivedirectory - the directory to look for the expected dependenciesexcludedExpectedJars - the jar file names to exclude from the list of expected dependenciespublic static boolean checkDependencies(java.net.URL jarFile,
boolean recursive,
java.util.List<java.net.URL> directories,
java.util.Set<java.lang.String> excludedInputJars,
java.util.Set<java.lang.String> excludedExpectedJars)
jarFile - the jar filerecursive - true if the handling of Class-path should be recursivedirectories - the directories to look for the expected dependenciesexcludedInputJars - he jar file names to exclude from the list of returned Class-path dependenciesexcludedExpectedJars - the jar file names to exclude from the list of expected dependenciespublic static java.util.List<java.net.URL> getDependencies(java.net.URL jarFile)
jarFile - the jar filepublic static java.util.List<java.net.URL> getDependencies(java.net.URL jarFile,
boolean recursive)
jarFile - the jar filerecursive - true if the handling of Class-path should be recursivepublic static java.util.List<java.net.URL> getDependencies(java.util.List<java.net.URL> jarFiles)
jarFiles - the list of jar filespublic static java.util.List<java.net.URL> getDependencies(java.util.List<java.net.URL> jarFiles,
boolean recursive)
jarFiles - the list of jar filesrecursive - true if the handling of Class-path should be recursiveCopyright © 2016-2023 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence