org.sourceforge.jxutil.app
Class OneJAR
java.lang.Object
|
+--org.sourceforge.jxutil.app.OneJAR
- public class OneJAR
- extends Object
A dependency aware JAR packager.
Usage:
java -cp classPath org.sourceforge.jxutil.app.OneJAR jarFile [classes...]
[-m manifest-file]
When used without classes the jarFile is modified to contain a closure of
dependencies that can be resolved to classes in the classPath.
With classes, the jarFile is created to additionally contain the classes with
the dependencies resolved.
- Author:
- Keve Müller
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
verbosity
private static int verbosity
OneJAR
public OneJAR()
loadDir
private static void loadDir(File dir,
String prefix,
Map map)
throws IOException
- Load a directory including all subdirectories and build
String classname to ClassDataSource mappings.
- Parameters:
dir
- The directory to scan.prefix
- The package prefix.map
- The map to store the results in.
- Throws:
IOException
- If a file system access error occurs.
loadProvides
private static void loadProvides(String jarFile,
Set providedSet)
throws IOException
IOException
loadReferences
private static void loadReferences(String jd,
Map map)
throws IOException
- Load the classes defined at a given location (directory or JAR).
The passed map is populated with the ClassDataSource elements that are
found under the given location. They are keyed by the class name.
- Parameters:
jd
- The String representation of a file system directory or a
JAR file.map
- The map to populate.
IOException
main
public static void main(String[] argv)
oneJar
private static void oneJar(String[] providedGlobalA,
String[] referencesA,
String[] sourcesA,
String manifestFile)
throws IOException
IOException
resolve
private static void resolve(String jarSource,
Map resolution,
String manifestFile)
throws IOException
IOException
usage
private static void usage()
Copyright © 2001,2002 Keve Müller, et al.; see LICENSE file for details.