public class Repackager extends Packager
Packager.MainClassTimeoutWarningListener
Constructor and Description |
---|
Repackager(File source) |
Repackager(File source,
LayoutFactory layoutFactory) |
Modifier and Type | Method and Description |
---|---|
void |
repackage(File destination,
Libraries libraries)
Repackage to the given destination so that it can be launched using '
java -jar'.
|
void |
repackage(File destination,
Libraries libraries,
LaunchScript launchScript)
Repackage to the given destination so that it can be launched using '
java -jar'.
|
void |
repackage(Libraries libraries)
Repackage the source file so that it can be run using 'java -jar'.
|
void |
setBackupSource(boolean backupSource)
Sets if source files should be backed up when they would be overwritten.
|
addMainClassTimeoutWarningListener, findMainMethod, getBackupFile, getLayout, getSource, isAlreadyPackaged, isAlreadyPackaged, setIncludeRelevantJarModeJars, setLayers, setLayout, setLayoutFactory, setMainClass, write
public Repackager(File source)
public Repackager(File source, LayoutFactory layoutFactory)
public void setBackupSource(boolean backupSource)
backupSource
- if source files should be backed uppublic void repackage(Libraries libraries) throws IOException
libraries
- the libraries required to run the archiveIOException
- if the file cannot be repackagedpublic void repackage(File destination, Libraries libraries) throws IOException
destination
- the destination file (may be the same as the source)libraries
- the libraries required to run the archiveIOException
- if the file cannot be repackagedpublic void repackage(File destination, Libraries libraries, LaunchScript launchScript) throws IOException
destination
- the destination file (may be the same as the source)libraries
- the libraries required to run the archivelaunchScript
- an optional launch script prepended to the front of the jarIOException
- if the file cannot be repackaged