Package rife.bld.extension
Class AbstractBootOperation<T extends AbstractBootOperation<T>>
java.lang.Object
rife.bld.operations.AbstractOperation<AbstractBootOperation<T>>
rife.bld.extension.AbstractBootOperation<T>
- Type Parameters:
T- the type parameter
- Direct Known Subclasses:
BootJarOperation,BootWarOperation
public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
extends AbstractOperation<AbstractBootOperation<T>>
Implements common methods used by Spring Boot operations, such as
BootJarOperation and
BootWarOperation.- Since:
- 1.0
- Author:
- Erik C. Thauvin
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the destination directory in which the archive will be created.destinationDirectory(File directory) Provides the destination directory in which the archive will be created.destinationDirectory(String directory) Provides the destination directory in which the archive will be created.destinationDirectory(Path directory) Provides the destination directory in which the archive will be created.Retrieves the file name that will be used for the archive creation.destinationFileName(String name) Provides the file name that will be used for the archive creation.protected voidexecuteCopyBootLoader(File stagingDirectory) Part of theexecuteoperation, copies the Spring Boot loader launcher archive content to the staging directory.protected voidexecuteCopyInfClassesFiles(File stagingInfDirectory) protected voidexecuteCopyInfLibs(File stagingInfDirectory) Part of theexecuteoperation, copies theBOOT-INFor (@code WEB-INF) libs.protected FileexecuteCreateArchive(File stagingDirectory) Part of theexecuteoperation, creates the archive from the staging directory.protected voidexecuteCreateManifest(File stagingDirectory) Part of theexecuteoperation, creates the manifest for the archive.abstract TfromProject(Project project) Configures the operation from aProject.infLibs()Retrieves the libraries inBOOT-INForWEB-INF.Provides the libraries that will be stored inBOOT-INForWEB-INF.Provides the libraries that will be stored inBOOT-INForWEB-INF.Provides the libraries that will be stored inBOOT-INForWEB-INF.infLibs(Collection<File> jars) Provides the libraries that will be stored inBOOT-INForWEB-INF.infLibsPaths(Collection<Path> jars) Provides the libraries that will be stored inBOOT-INForWEB-INF.infLibsStrings(Collection<String> jars) Provides the libraries that will be stored inBOOT-INForWEB-INF.protected StringRetrieves the Spring Boot loader launcher fully qualified class name.launcherClass(String className) Provides the Spring Boot loader launcher fully qualified class name.Retrieves the Spring Boot loader launcher libraries.launcherLibs(File... jars) Provides the libraries for the Spring Boot loader launcher.launcherLibs(String... jars) Provides the libraries for the Spring Boot loader launcher.launcherLibs(Path... jars) Provides the libraries for the Spring Boot loader launcher.launcherLibs(Collection<File> jars) Provides the libraries for the Spring Boot loader launcher.launcherLibsPaths(Collection<Path> jars) Provides the libraries for the Spring Boot loader launcher.launcherLibsStrings(Collection<String> jars) Provides the libraries for the Spring Boot loader launcher.Retrieves the main class name.protected TProvides the fully qualified main class name.manifestAttribute(String name, String value) Provides an attribute to put in the archive manifest.Retrieves the attributes that will be put in the archive manifest.manifestAttributes(Map<String, String> attributes) Provides a map of attributes to put in the archive manifest.Retrieves the source directories that will be used for the archive creation.sourceDirectories(File... directories) Provides source directories that will be used for the archive creation.sourceDirectories(String... directories) Provides source directories that will be used for the archive creation.sourceDirectories(Path... directories) Provides source directories that will be used for the archive creation.sourceDirectories(Collection<File> directories) Provides source directories that will be used for the archive creation.sourceDirectoriesPaths(Collection<Path> directories) Provides source directories that will be used for the archive creation.sourceDirectoriesStrings(Collection<String> directories) Provides source directories that will be used for the archive creation.protected booleanVerifies that all the elements (mainClass,launcherClassandlauncherLibs) required to create the archive have been provided, throws anIllegalArgumentExceptionotherwise.Methods inherited from class rife.bld.operations.AbstractOperation
execute, executeOnce, executeOnce, silent, silent
-
Field Details
-
LOGGER
-
-
Constructor Details
-
AbstractBootOperation
public AbstractBootOperation()
-
-
Method Details
-
destinationDirectory
Retrieves the destination directory in which the archive will be created.- Returns:
- the destination directory
-
destinationDirectory
Provides the destination directory in which the archive will be created.- Parameters:
directory- the destination directory- Returns:
- this operation instance
- Throws:
IOException- if an error occurs
-
destinationDirectory
Provides the destination directory in which the archive will be created.- Parameters:
directory- the destination directory- Returns:
- this operation instance
- Throws:
IOException- if an error occurs
-
destinationDirectory
Provides the destination directory in which the archive will be created.- Parameters:
directory- the destination directory- Returns:
- this operation instance
- Throws:
IOException- if an error occurs
-
destinationFileName
Provides the file name that will be used for the archive creation.- Parameters:
name- the archive file name- Returns:
- this operation instance
-
destinationFileName
Retrieves the file name that will be used for the archive creation.- Returns:
- the archive file name
-
executeCopyBootLoader
protected void executeCopyBootLoader(File stagingDirectory) throws FileUtilsErrorException, ExitStatusException Part of theexecuteoperation, copies the Spring Boot loader launcher archive content to the staging directory.- Parameters:
stagingDirectory- the staging directory- Throws:
FileUtilsErrorException- if an error occursExitStatusException
-
executeCopyInfClassesFiles
- Parameters:
stagingInfDirectory- Tte stagingINFdirectory- Throws:
IOException- if an error occurs
-
executeCopyInfLibs
Part of theexecuteoperation, copies theBOOT-INFor (@code WEB-INF) libs.- Parameters:
stagingInfDirectory- the stagingINFdirectory- Throws:
IOException- if an error occurs
-
executeCreateArchive
Part of theexecuteoperation, creates the archive from the staging directory.- Parameters:
stagingDirectory- the staging directory- Returns:
- the archive
- Throws:
IOException- if an error occurs
-
executeCreateManifest
Part of theexecuteoperation, creates the manifest for the archive.- Parameters:
stagingDirectory- the staging directory- Throws:
IOException- if an error occurs
-
fromProject
Configures the operation from aProject.- Parameters:
project- the project- Returns:
- this operation instance
- Throws:
IOException- if an error occurs
-
infLibs
Provides the libraries that will be stored inBOOT-INForWEB-INF.- Parameters:
jars- a collection of Java archive files- Returns:
- this operation instance
- See Also:
-
infLibs
Provides the libraries that will be stored inBOOT-INForWEB-INF.- Parameters:
jars- one or more Java archive files- Returns:
- this operation instance
- See Also:
-
infLibs
Provides the libraries that will be stored inBOOT-INForWEB-INF.- Parameters:
jars- one or more Java archive files- Returns:
- this operation instance
- See Also:
-
infLibs
Provides the libraries that will be stored inBOOT-INForWEB-INF.- Parameters:
jars- one or more Java archive files- Returns:
- this operation instance
- See Also:
-
infLibs
Retrieves the libraries inBOOT-INForWEB-INF.- Returns:
- the Java archives
-
infLibsPaths
Provides the libraries that will be stored inBOOT-INForWEB-INF.- Parameters:
jars- one or more Java archive files- Returns:
- this operation instance
- See Also:
-
infLibsStrings
Provides the libraries that will be stored inBOOT-INForWEB-INF.- Parameters:
jars- one or more Java archive files- Returns:
- this operation instance
- See Also:
-
launcherClass
Provides the Spring Boot loader launcher fully qualified class name.For examples:
org.springframework.boot.loader.JarLauncherorg.springframework.boot.loader.PropertiesLauncherorg.springframework.boot.loader.WarLauncher
- Parameters:
className- the launcher class name- Returns:
- this operation instance
-
launcherClass
Retrieves the Spring Boot loader launcher fully qualified class name.- Returns:
- the launcher class name
-
launcherLibs
Retrieves the Spring Boot loader launcher libraries.- Returns:
- the Java archives
-
launcherLibs
Provides the libraries for the Spring Boot loader launcher.- Parameters:
jars- a collection of Java archives- Returns:
- this operation instance
- Throws:
IOException- if a JAR could not be found- See Also:
-
launcherLibs
Provides the libraries for the Spring Boot loader launcher.- Parameters:
jars- one or more Java archives- Returns:
- this operation instance
- Throws:
IOException- if a JAR could not be found- See Also:
-
launcherLibs
Provides the libraries for the Spring Boot loader launcher.- Parameters:
jars- one or more Java archives- Returns:
- this operation instance
- Throws:
IOException- if a JAR could not be found- See Also:
-
launcherLibs
Provides the libraries for the Spring Boot loader launcher.- Parameters:
jars- one or more Java archives- Returns:
- this operation instance
- Throws:
IOException- if a JAR could not be found- See Also:
-
launcherLibsPaths
Provides the libraries for the Spring Boot loader launcher.- Parameters:
jars- one or more Java archives- Returns:
- this operation instance
- Throws:
IOException- if a JAR could not be found- See Also:
-
launcherLibsStrings
Provides the libraries for the Spring Boot loader launcher.- Parameters:
jars- one or more Java archives- Returns:
- this operation instance
- Throws:
IOException- if a JAR could not be found- See Also:
-
mainClass
Provides the fully qualified main class name.- Parameters:
className- the class name- Returns:
- this operation instance
-
mainClass
Retrieves the main class name.- Returns:
- the class name
-
manifestAttribute
Provides an attribute to put in the archive manifest.- Parameters:
name- the attribute namevalue- the attribute value- Returns:
- this operation instance
-
manifestAttributes
Retrieves the attributes that will be put in the archive manifest.- Returns:
- the manifest attributes
-
manifestAttributes
Provides a map of attributes to put in the archive manifest.- Parameters:
attributes- the manifest attributes- Returns:
- this operation instance
- See Also:
-
sourceDirectories
Provides source directories that will be used for the archive creation.- Parameters:
directories- one or more source directories- Returns:
- this operation instance
- See Also:
-
sourceDirectories
Provides source directories that will be used for the archive creation.- Parameters:
directories- one or more source directories- Returns:
- this operation instance
- See Also:
-
sourceDirectories
Provides source directories that will be used for the archive creation.- Parameters:
directories- one or more source directories- Returns:
- this operation instance
- See Also:
-
sourceDirectories
Provides source directories that will be used for the archive creation.- Parameters:
directories- one or more source directories- Returns:
- this operation instance
- See Also:
-
sourceDirectories
Retrieves the source directories that will be used for the archive creation.- Returns:
- the source directories
-
sourceDirectoriesPaths
Provides source directories that will be used for the archive creation.- Parameters:
directories- one or more source directories- Returns:
- this operation instance
- See Also:
-
sourceDirectoriesStrings
Provides source directories that will be used for the archive creation.- Parameters:
directories- one or more source directories- Returns:
- this operation instance
- See Also:
-
verifyExecute
Verifies that all the elements (mainClass,launcherClassandlauncherLibs) required to create the archive have been provided, throws anIllegalArgumentExceptionotherwise.- Returns:
trueor anIllegalArgumentException- Throws:
IllegalArgumentException- if an error occurs
-