Package rife.bld.operations
Class UberJarOperation
Creates an uberjar archive of the provided jars and resources.
- Since:
- 1.5
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the destination directory in which the uberjar archive will be created.destinationDirectory
(File directory) Provides the destination directory in which the uberjar archive will be created.Retrieves the destination file name that will be used for the uberjar archive creation.destinationFileName
(String name) Provides the destination file name that will be used for the uberjar archive creation.void
execute()
Performs the uberjar operation.protected void
executeCollectSourceJarContents
(File stagingDirectory) Part of theexecute()
operation, collect the contents of all the source jars.protected void
executeCollectSourceResources
(File stagingDirectory) Part of theexecute()
operation, collect the source resources.protected void
executeCreateUberJarArchive
(File stagingDirectory) Part of theexecute()
operation, create the uberjar archive.fromProject
(BaseProject project) Configures an uberjar operation from aBaseProject
.Retrieves the list of jar source files that will be used for the uberjar archive creation.jarSourceFiles
(File... files) Provides source jar files that will be used for the uberjar archive creation.jarSourceFiles
(List<File> files) Provides a list of source jar files that will be used for the uberjar archive creation.Retrieves the main class to run from the uberjar archive.Provides the main class to run from the uberjar archive.Retrieves the list of source directories that will be used for the uberjar archive creation.sourceDirectories
(List<NamedFile> directories) Provides a list of source directories that will be used for the uberjar archive creation.sourceDirectories
(NamedFile... directories) Provides source directories that will be used for the uberjar archive creation.Methods inherited from class rife.bld.operations.AbstractOperation
executeOnce, executeOnce, silent, silent
-
Constructor Details
-
UberJarOperation
public UberJarOperation()
-
-
Method Details
-
execute
Performs the uberjar operation.- Specified by:
execute
in classAbstractOperation<UberJarOperation>
- Throws:
IOException
- when an exception occurred during the uberjar creation processFileUtilsErrorException
- when an exception occurred during the uberjar creation process- Since:
- 1.5
-
executeCollectSourceJarContents
protected void executeCollectSourceJarContents(File stagingDirectory) throws FileUtilsErrorException Part of theexecute()
operation, collect the contents of all the source jars.- Throws:
FileUtilsErrorException
- Since:
- 1.5
-
executeCollectSourceResources
Part of theexecute()
operation, collect the source resources.- Throws:
FileUtilsErrorException
- Since:
- 1.5
-
executeCreateUberJarArchive
Part of theexecute()
operation, create the uberjar archive.- Throws:
IOException
- Since:
- 1.5
-
fromProject
Configures an uberjar operation from aBaseProject
.- Parameters:
project
- the project to configure the uberjar operation from- Since:
- 1.5
-
jarSourceFiles
Provides source jar files that will be used for the uberjar archive creation.- Parameters:
files
- source files- Returns:
- this operation instance
- Since:
- 1.5.18
-
jarSourceFiles
Provides a list of source jar files that will be used for the uberjar archive creation.A copy will be created to allow this list to be independently modifiable.
- Parameters:
files
- a list of jar source files- Returns:
- this operation instance
- Since:
- 1.5
-
sourceDirectories
Provides source directories that will be used for the uberjar archive creation.- Parameters:
directories
- source directories- Returns:
- this operation instance
- Since:
- 1.5.18
-
sourceDirectories
Provides a list of source directories that will be used for the uberjar archive creation.A copy will be created to allow this list to be independently modifiable.
- Parameters:
directories
- a list of source directories- Returns:
- this operation instance
- Since:
- 1.5
-
destinationDirectory
Provides the destination directory in which the uberjar archive will be created.- Parameters:
directory
- the uberjar destination directory- Returns:
- this operation instance
- Since:
- 1.5
-
destinationFileName
Provides the destination file name that will be used for the uberjar archive creation.- Parameters:
name
- the uberjar archive destination file name- Returns:
- this operation instance
- Since:
- 1.5
-
mainClass
Provides the main class to run from the uberjar archive.- Parameters:
name
- the main class to run- Returns:
- this operation instance
- Since:
- 1.5
-
jarSourceFiles
Retrieves the list of jar source files that will be used for the uberjar archive creation.This is a modifiable list that can be retrieved and changed.
- Returns:
- the uberjar archive's jar source files
- Since:
- 1.5
-
sourceDirectories
Retrieves the list of source directories that will be used for the uberjar archive creation.This is a modifiable list that can be retrieved and changed.
- Returns:
- the uberjar archive's source directories
- Since:
- 1.5
-
destinationDirectory
Retrieves the destination directory in which the uberjar archive will be created.- Returns:
- the uberjar archive's destination directory
- Since:
- 1.5
-
destinationFileName
Retrieves the destination file name that will be used for the uberjar archive creation.- Returns:
- the uberjar archive's destination file name
- Since:
- 1.5
-
mainClass
Retrieves the main class to run from the uberjar archive.- Returns:
- the main class to run
- Since:
- 1.5
-