Interface BootArchive
- All Superinterfaces:
Comparable<Task>, ExtensionAware, Named, Task
A Spring Boot "fat" archive task.
- Since:
- 2.0.0
- Author:
- Andy Wilkinson, Moritz Halbritter
-
Nested Class Summary
Nested classes/interfaces inherited from interface Named
Named.Namer -
Field Summary
Fields inherited from interface Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds files to the classpath to include in the archive.@Nullable FileCollectionReturns the classpath that will be included in the archive.Returns whether the JAR tools should be included as a dependency in the layered archive.Returns the fully-qualified name of the application's main class.Returns the target Java version of the project (e.g.voidrequiresUnpack(String... patterns) Adds Ant-style patterns that identify files that must be unpacked from the archive when it is launched.voidrequiresUnpack(Spec<FileTreeElement> spec) Adds a spec that identifies files that must be unpacked from the archive when it is launched.voidresolvedArtifacts(Provider<Set<ResolvedArtifactResult>> resolvedArtifacts) Registers the given lazily providedresolvedArtifacts.voidsetClasspath(Object classpath) Sets the classpath to include in the archive.voidsetClasspath(FileCollection classpath) Sets the classpath to include in the archive.Methods inherited from interface Comparable
compareToMethods inherited from interface ExtensionAware
getExtensionsMethods inherited from interface Task
configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, doNotTrackState, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, notCompatibleWithConfigurationCache, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
-
Method Details
-
getMainClass
-
requiresUnpack
Adds Ant-style patterns that identify files that must be unpacked from the archive when it is launched.- Parameters:
patterns- the patterns
-
requiresUnpack
Adds a spec that identifies files that must be unpacked from the archive when it is launched.- Parameters:
spec- the spec
-
getClasspath
Returns the classpath that will be included in the archive.- Returns:
- the classpath
-
classpath
Adds files to the classpath to include in the archive. The givenclasspathis evaluated as perProject.files(Object...).- Parameters:
classpath- the additions to the classpath
-
setClasspath
Sets the classpath to include in the archive. The givenclasspathis evaluated as perProject.files(Object...).- Parameters:
classpath- the classpath- Since:
- 2.0.7
-
setClasspath
Sets the classpath to include in the archive.- Parameters:
classpath- the classpath- Since:
- 2.0.7
-
getTargetJavaVersion
Returns the target Java version of the project (e.g. as provided by thetargetCompatibilitybuild property).- Returns:
- the target Java version
-
resolvedArtifacts
Registers the given lazily providedresolvedArtifacts. They are used to map from the files in theclasspathto their dependency coordinates.- Parameters:
resolvedArtifacts- the lazily provided resolved artifacts- Since:
- 3.0.7
-
getIncludeTools
-