public final class ApplicationBundler extends Object
Constructor and Description |
---|
ApplicationBundler(ClassAcceptor classAcceptor)
Constructs an ApplicationBundler.
|
ApplicationBundler(Iterable<String> excludePackages)
Constructs an ApplicationBundler.
|
ApplicationBundler(Iterable<String> excludePackages,
Iterable<String> includePackages)
Constructs an ApplicationBundler.
|
Modifier and Type | Method and Description |
---|---|
void |
createBundle(Location target,
Class<?> clz,
Class<?>... classes)
Same as calling
createBundle(Location, Iterable) . |
void |
createBundle(Location target,
Iterable<Class<?>> classes) |
void |
createBundle(Location target,
Iterable<Class<?>> classes,
Iterable<URI> resources)
Creates a jar file which includes all the given classes and all the classes that they depended on.
|
ApplicationBundler |
setClassesDir(String classesDir)
Sets the name of the directory inside the bundle jar that all ".class" files stored in.
|
ApplicationBundler |
setLibDir(String libDir)
Sets the name of the directory inside the bundle jar that all ".jar" files stored in.
|
ApplicationBundler |
setResourcesDir(String resourcesDir)
Sets the name of the directory inside the bundle jar that all resource files stored in.
|
ApplicationBundler |
setTempDir(File tempDir)
Sets the temporary directory used by this class when generating new jars.
|
public ApplicationBundler(Iterable<String> excludePackages)
excludePackages
- Class packages to excludepublic ApplicationBundler(Iterable<String> excludePackages, Iterable<String> includePackages)
excludePackages
- Class packages to excludeincludePackages
- Class packages that should be included. Anything in this list will override the
one provided in excludePackages.public ApplicationBundler(ClassAcceptor classAcceptor)
classAcceptor
- ClassAcceptor for class packages to includepublic ApplicationBundler setTempDir(File tempDir)
java.io.tmpdir
property.public ApplicationBundler setClassesDir(String classesDir)
public ApplicationBundler setLibDir(String libDir)
public ApplicationBundler setResourcesDir(String resourcesDir)
public void createBundle(Location target, Iterable<Class<?>> classes) throws IOException
IOException
public void createBundle(Location target, Class<?> clz, Class<?>... classes) throws IOException
createBundle(Location, Iterable)
.IOException
public void createBundle(Location target, Iterable<Class<?>> classes, Iterable<URI> resources) throws IOException
target
- Where to save the target jar file.resources
- Extra resources to put into the jar file. If resource is a jar file, it'll be put under
lib/ entry, otherwise under the resources/ entry.classes
- Set of classes to start the dependency traversal.IOException
- if failed to create the bundleCopyright © 2013-2020 The Apache Software Foundation. All rights reserved.