Package rife.bld.extension
Class BootJarOperation
Builds and creates a Spring Boot executable Java archive (JAR).
Usage:
@BuildCommand(summary = "Creates an executable JAR for the project")
public void bootjar() throws Exception {
new BootJarOperation()
.fromProject(this)
.execute();
}
- Since:
- 1.0
- Author:
- Erik C. Thauvin
-
Field Summary
Fields inherited from class rife.bld.extension.AbstractBootOperation
LOGGER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Performs the BootJar operation.protected FileexecuteCreateBootInfDirectory(File stagingDirectory) Part of theexecuteoperation, creates theBOOT-INFstaging directory.fromProject(Project project) Configures the operation from aProject.Methods inherited from class rife.bld.extension.AbstractBootOperation
destinationDirectory, destinationDirectory, destinationDirectory, destinationDirectory, destinationFileName, destinationFileName, executeCopyBootLoader, executeCopyInfClassesFiles, executeCopyInfLibs, executeCreateArchive, executeCreateManifest, infLibs, infLibs, infLibs, infLibs, infLibs, infLibsPaths, infLibsStrings, launcherClass, launcherClass, launcherLibs, launcherLibs, launcherLibs, launcherLibs, launcherLibs, launcherLibsPaths, launcherLibsStrings, mainClass, mainClass, manifestAttribute, manifestAttributes, manifestAttributes, sourceDirectories, sourceDirectories, sourceDirectories, sourceDirectories, sourceDirectories, sourceDirectoriesPaths, sourceDirectoriesStrings, verifyExecuteMethods inherited from class rife.bld.operations.AbstractOperation
executeOnce, executeOnce, silent, silent
-
Constructor Details
-
BootJarOperation
public BootJarOperation()
-
-
Method Details
-
execute
Performs the BootJar operation.- Specified by:
executein classAbstractOperation<AbstractBootOperation<BootJarOperation>>- Throws:
Exception
-
executeCreateBootInfDirectory
Part of theexecuteoperation, creates theBOOT-INFstaging directory.- Parameters:
stagingDirectory- the staging directory- Returns:
- the
BOOT-INFdirectory location - Throws:
IOException- if an error occurs
-
fromProject
Configures the operation from aProject.Sets the following:
- The
destination file nametoarchiveBaseNameandversion - The
INF libstocompileClasspathJarsandruntimeClasspathJars - The
launcher classtoJarLauncher - The
launcher libstostandaloneClasspathJars - The
main classtomainClass - The
Manifest-Version,Main-ClassandStart-Classmanifest attributes - The
source directoriestobuildMainDirectoryandsrcMainResourcesDirectory
- Specified by:
fromProjectin classAbstractBootOperation<BootJarOperation>- Parameters:
project- the project- Returns:
- this operation instance
- Throws:
IOException- if an error occurs
- The
-