public class Repackager extends Object
Constructor and Description |
---|
Repackager(File source) |
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(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.
|
void |
setLayout(Layout layout)
Sets the layout to use for the jar.
|
void |
setMainClass(String mainClass)
Sets the main class that should be run.
|
public Repackager(File source)
public void setMainClass(String mainClass)
mainClass
- the main class namepublic void setBackupSource(boolean backupSource)
backupSource
- if source files should be backed uppublic void setLayout(Layout layout)
Layouts.forFile(File)
.layout
- the layoutpublic void repackage(Libraries libraries) throws IOException
libraries
- the libraries required to run the archiveIOException
public 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
Copyright © 2013. All rights reserved.