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(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. |
List<String> |
getArgs()
Returns the arguments to be used to run the application.
|
FileCollection |
getClasspath() |
List<String> |
getJvmArgs()
Returns the JVM arguments to be used to run the application.
|
String |
getMain()
Returns the name of the main class to be run.
|
void |
run() |
void |
setArgs(List<String> args)
Configures the application to be run using the given
args . |
void |
setArgs(Provider<List<String>> argsProvider)
Configures the application to be run using the args provided by the given
argsProvider . |
void |
setJvmArgs(List<String> jvmArgs)
Configures the application to be run using the given
jvmArgs . |
void |
setJvmArgs(Provider<List<String>> jvmArgsProvider)
Configures the application to be run using the JVM args provided by the given
jvmArgsProvider . |
void |
setMain(Provider<String> mainProvider)
Sets the main class to be executed using the given
mainProvider . |
void |
setMain(String main)
Sets 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(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 String getMain()
null
public void setMain(Provider<String> mainProvider)
mainProvider
.mainProvider
- provider of the main class namepublic void setMain(String main)
main
- the main class namepublic List<String> getJvmArgs()
null
public void setJvmArgs(Provider<List<String>> jvmArgsProvider)
jvmArgsProvider
.jvmArgsProvider
- the provider of the JVM argspublic void setJvmArgs(List<String> jvmArgs)
jvmArgs
.jvmArgs
- the JVM argspublic List<String> getArgs()
null
public void setArgs(List<String> args)
args
.args
- the argspublic void setArgs(Provider<List<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()