类 BootJar
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.api.tasks.AbstractCopyTask
org.gradle.api.tasks.bundling.AbstractArchiveTask
org.gradle.api.tasks.bundling.Zip
org.gradle.jvm.tasks.Jar
org.gradle.api.tasks.bundling.Jar
org.springframework.boot.gradle.tasks.bundling.BootJar
- 所有已实现的接口:
Comparable<Task>,ContentFilterable,CopyProcessingSpec,CopySourceSpec,CopySpec,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.file.copy.CopySpecSource,org.gradle.api.internal.IConventionAware,org.gradle.api.internal.TaskInternal,Named,ExtensionAware,Task,PatternFilterable,Configurable<Task>,BootArchive
@DisableCachingByDefault(because="Not worth caching")
public abstract class BootJar
extends Jar
implements BootArchive
A custom
Jar task that produces a Spring Boot executable jar.- 从以下版本开始:
- 2.0.0
- 作者:
- Andy Wilkinson, Madhura Bhave, Scott Frederick, Phillip Webb
-
嵌套类概要
从接口继承的嵌套类/接口 org.gradle.api.Task
Task.Namer -
字段概要
从类继承的字段 org.gradle.jvm.tasks.Jar
DEFAULT_EXTENSION从类继承的字段 org.gradle.api.tasks.bundling.Zip
ZIP_EXTENSION从接口继承的字段 org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Calls the givenactionto add content to theBOOT-INFdirectory of the jar.voidAdds files to the classpath to include in the archive.voidcopy()protected org.gradle.api.internal.file.copy.CopyActionReturns aCopySpecthat can be used to add content to theBOOT-INFdirectory of the jar.Returns the classpath that will be included in the archive.Returns theLaunchScriptConfigurationthat will control the script that is prepended to the archive.Returns the spec that describes the layers in a layered jar.protected booleanisLibrary(FileCopyDetails details) Return if theFileCopyDetailsare for a library.voidConfigures the archive to have a prepended launch script.voidlaunchScript(Action<LaunchScriptConfiguration> action) Configures the archive to have a prepended launch script, customizing its configuration using the givenaction.voidlayered(Action<LayeredSpec> action) Configures the jar's layering using the givenaction.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.protected ZipCompressionresolveZipCompression(FileCopyDetails details) Return theZipCompressionthat should be used when adding the file represented by the givendetailsto the jar.voidsetClasspath(Object classpath) Sets the classpath to include in the archive.voidsetClasspath(FileCollection classpath) Sets the classpath to include in the archive.从类继承的方法 org.gradle.jvm.tasks.Jar
getManifest, getManifestContentCharset, getMetadataCharset, getMetaInf, manifest, metaInf, metaInf, setManifest, setManifestContentCharset, setMetadataCharset从类继承的方法 org.gradle.api.tasks.bundling.Zip
getCompressor, getEntryCompression, isZip64, setEntryCompression, setZip64从类继承的方法 org.gradle.api.tasks.bundling.AbstractArchiveTask
createCopyActionExecuter, getArchiveAppendix, getArchiveBaseName, getArchiveClassifier, getArchiveExtension, getArchiveFile, getArchiveFileName, getArchivePath, getArchiveVersion, getDestinationDirectory, into, into, into, isPreserveFileTimestamps, isReproducibleFileOrder, setPreserveFileTimestamps, setReproducibleFileOrder从类继承的方法 org.gradle.api.tasks.AbstractCopyTask
createRootSpec, dirPermissions, eachFile, eachFile, exclude, exclude, exclude, exclude, expand, expand, filePermissions, filesMatching, filesMatching, filesNotMatching, filesNotMatching, filter, filter, filter, filter, from, from, from, getDirectoryFileTreeFactory, getDirMode, getDirPermissions, getDocumentationRegistry, getDuplicatesStrategy, getExcludes, getFileLookup, getFileMode, getFilePermissions, getFileResolver, getFileSystem, getFilteringCharset, getIncludeEmptyDirs, getIncludes, getInstantiator, getMainSpec, getObjectFactory, getPropertyFactory, getRootSpec, getSource, include, include, include, include, isCaseSensitive, rename, rename, rename, rename, setCaseSensitive, setDirMode, setDuplicatesStrategy, setExcludes, setFileMode, setFilteringCharset, setIncludeEmptyDirs, setIncludes, with从类继承的方法 org.gradle.api.internal.ConventionTask
conventionMapping, conventionMapping, getConventionMapping从类继承的方法 org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService从类继承的方法 org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjects从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.springframework.boot.gradle.tasks.bundling.BootArchive
getIncludeTools, getLoaderImplementation, getMainClass, getTargetJavaVersion从接口继承的方法 java.lang.Comparable
compareTo从接口继承的方法 org.gradle.api.plugins.ExtensionAware
getExtensions从接口继承的方法 org.gradle.api.Task
configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, doNotTrackState, finalizedBy, getActions, getAnt, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getFinalizedBy, getGroup, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getPath, getProject, getShouldRunAfter, 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
-
构造器详细资料
-
BootJar
public BootJar()Creates a newBootJartask.
-
-
方法详细资料
-
resolvedArtifacts
从接口复制的说明:BootArchiveRegisters the given lazily providedresolvedArtifacts. They are used to map from the files in theclasspathto their dependency coordinates.- 指定者:
resolvedArtifacts在接口中BootArchive- 参数:
resolvedArtifacts- the lazily provided resolved artifacts
-
copy
public void copy()- 覆盖:
copy在类中AbstractCopyTask
-
createCopyAction
protected org.gradle.api.internal.file.copy.CopyAction createCopyAction()- 覆盖:
createCopyAction在类中Zip
-
requiresUnpack
从接口复制的说明:BootArchiveAdds Ant-style patterns that identify files that must be unpacked from the archive when it is launched.- 指定者:
requiresUnpack在接口中BootArchive- 参数:
patterns- the patterns
-
requiresUnpack
从接口复制的说明:BootArchiveAdds a spec that identifies files that must be unpacked from the archive when it is launched.- 指定者:
requiresUnpack在接口中BootArchive- 参数:
spec- the spec
-
getLaunchScript
从接口复制的说明:BootArchiveReturns theLaunchScriptConfigurationthat will control the script that is prepended to the archive.- 指定者:
getLaunchScript在接口中BootArchive- 返回:
- the launch script configuration, or
nullif the launch script has not been configured.
-
launchScript
public void launchScript()从接口复制的说明:BootArchiveConfigures the archive to have a prepended launch script.- 指定者:
launchScript在接口中BootArchive
-
launchScript
从接口复制的说明:BootArchiveConfigures the archive to have a prepended launch script, customizing its configuration using the givenaction.- 指定者:
launchScript在接口中BootArchive- 参数:
action- the action to apply
-
getLayered
Returns the spec that describes the layers in a layered jar.- 返回:
- the spec for the layers
- 从以下版本开始:
- 2.3.0
-
layered
Configures the jar's layering using the givenaction.- 参数:
action- the action to apply- 从以下版本开始:
- 2.3.0
-
getClasspath
从接口复制的说明:BootArchiveReturns the classpath that will be included in the archive.- 指定者:
getClasspath在接口中BootArchive- 返回:
- the classpath
-
classpath
从接口复制的说明:BootArchiveAdds files to the classpath to include in the archive. The givenclasspathis evaluated as perProject.files(Object...).- 指定者:
classpath在接口中BootArchive- 参数:
classpath- the additions to the classpath
-
setClasspath
从接口复制的说明:BootArchiveSets the classpath to include in the archive. The givenclasspathis evaluated as perProject.files(Object...).- 指定者:
setClasspath在接口中BootArchive- 参数:
classpath- the classpath
-
setClasspath
从接口复制的说明:BootArchiveSets the classpath to include in the archive.- 指定者:
setClasspath在接口中BootArchive- 参数:
classpath- the classpath
-
getBootInf
Returns aCopySpecthat can be used to add content to theBOOT-INFdirectory of the jar.- 返回:
- a
CopySpecforBOOT-INF - 从以下版本开始:
- 2.0.3
-
bootInf
Calls the givenactionto add content to theBOOT-INFdirectory of the jar.- 参数:
action- theActionto call- 返回:
- the
CopySpecforBOOT-INFthat was passed to theAction - 从以下版本开始:
- 2.0.3
-
resolveZipCompression
Return theZipCompressionthat should be used when adding the file represented by the givendetailsto the jar. By default, anylibraryisstoredand all other files aredeflated.- 参数:
details- the file copy details- 返回:
- the compression to use
-
isLibrary
Return if theFileCopyDetailsare for a library. By default any file inBOOT-INF/libis considered to be a library.- 参数:
details- the file copy details- 返回:
trueif the details are for a library- 从以下版本开始:
- 2.3.0
-