public class BootRun extends DefaultTask
JavaExec
task for running a Spring Boot application.Task.Namer
TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
Constructor and Description |
---|
BootRun() |
Modifier and Type | Method and Description |
---|---|
void |
classpath(java.lang.Object... entries)
Adds the given
entries to the classpath used to run the application. |
void |
execSpec(Action<JavaExecSpec> execSpecConfigurer)
Registers the given
execSpecConfigurer to be called to customize the
JavaExecSpec prior to running the application. |
java.util.List<java.lang.String> |
getArgs()
Returns the arguments to be used to run the application.
|
FileCollection |
getClasspath() |
java.util.List<java.lang.String> |
getJvmArgs()
Returns the JVM arguments to be used to run the application.
|
java.lang.String |
getMainClassName()
Returns the name of the main class to be run.
|
void |
run() |
void |
setArgs(java.util.List<java.lang.String> args)
Configures the application to be run using the given
args . |
void |
setArgs(Provider<java.util.List<java.lang.String>> argsProvider)
Configures the application to be run using the args provided by the given
argsProvider . |
void |
setJvmArgs(java.util.List<java.lang.String> jvmArgs)
Configures the application to be run using the given
jvmArgs . |
void |
setJvmArgs(Provider<java.util.List<java.lang.String>> jvmArgsProvider)
Configures the application to be run using the JVM args provided by the given
jvmArgsProvider . |
void |
setMainClassName(Provider<java.lang.String> mainClassNameProvider)
Sets the name of the main class to be executed using the given
mainClassNameProvider . |
void |
setMainClassName(java.lang.String mainClassName)
Sets the name of the main class to be run.
|
void |
sourceResources(SourceSet sourceSet)
Adds the
source directories of the given
sourceSet's resources to the start of the
classpath in place of the output's
resources directory . |
addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString
public void classpath(java.lang.Object... entries)
entries
to the classpath used to run the application.entries
- the classpath entries@InputFiles public FileCollection getClasspath()
public void sourceResources(SourceSet sourceSet)
source directories
of the given
sourceSet's
resources
to the start of the
classpath in place of the output's
resources directory
.sourceSet
- the source setpublic java.lang.String getMainClassName()
null
public void setMainClassName(Provider<java.lang.String> mainClassNameProvider)
mainClassNameProvider
.mainClassNameProvider
- provider of the main class namepublic void setMainClassName(java.lang.String mainClassName)
mainClassName
- the main class namepublic java.util.List<java.lang.String> getJvmArgs()
null
public void setJvmArgs(Provider<java.util.List<java.lang.String>> jvmArgsProvider)
jvmArgsProvider
.jvmArgsProvider
- the provider of the JVM argspublic void setJvmArgs(java.util.List<java.lang.String> jvmArgs)
jvmArgs
.jvmArgs
- the JVM argspublic java.util.List<java.lang.String> getArgs()
null
public void setArgs(java.util.List<java.lang.String> args)
args
.args
- the argspublic void setArgs(Provider<java.util.List<java.lang.String>> argsProvider)
argsProvider
.argsProvider
- the provider of the argspublic void execSpec(Action<JavaExecSpec> execSpecConfigurer)
execSpecConfigurer
to be called to customize the
JavaExecSpec
prior to running the application.execSpecConfigurer
- the configurerpublic void run()