Base class for LensKit tasks.
Fields inherited from class | Fields |
---|---|
class ConventionTask |
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION |
class DefaultTask |
TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION |
Type | Name and description |
---|---|
FileCollection |
classpath The classpath to use. |
boolean |
dependsOnClasspath Whether this task depends on the files on its classpath. |
boolean |
dryRun Enable dry-run support. |
JavaExecSpec |
invoker Access the underlying invoker that will be used to run the LensKit code. |
java.util.List<java.lang.String> |
jvmArgs |
java.lang.Object |
logFile The log file. |
java.lang.Object |
logFileLevel The log file output level.. |
java.lang.Object |
logLevel The output logging level. |
java.lang.Object |
logbackConfiguration A Logback configuration file. |
java.lang.String |
maxMemory The maximum memory the LensKit task should use. |
Constructor and description |
---|
LenskitTask
() |
Type | Name and description |
---|---|
protected void |
applyFinalSettings() Apply the LensKit JVM settings to the invoker to prepare it for running. |
protected void |
doCleanup(ExecResult result) Method run after running the command. |
protected void |
doPrepare() Method run before running the command. |
FileCollection |
getClasspathFiles() |
java.lang.String |
getCommand() |
java.util.List |
getCommandArgs() |
void |
invoker(groovy.lang.Closure block) Apply additional JVM configuration. |
void |
perform() Execute the LensKit task. |
The classpath to use.
Whether this task depends on the files on its classpath.
Enable dry-run support. If turned on, the runner prepares but does not execute the task.
Access the underlying invoker that will be used to run the LensKit code. Most code will not need this; it allows build scripts to set additional JVM options that are not exposed as specific properties if necessary. Properties exposed by LensKit tasks (such as getMaxMemory()) will generally override their corresponding settings in the invoker.
The log file. Defaults to no log file.
The log file output level..
The output logging level.
A Logback configuration file. If specified, its content overrides all other logging-related options.
The maximum memory the LensKit task should use. Defaults to LenskitExtension.getMaxMemory.
Apply the LensKit JVM settings to the invoker to prepare it for running.
Method run after running the command. It is run if there is a failure running the LensKit command, but not if the setup for the command (doPrepare(), getCommandArgs(), etc.) fail.
The
- result, or `null` if the command could not be executed at all.Method run before running the command. Used to set up (e.g. write spec files) before the command can be run.
Apply additional JVM configuration.
block
- The configuration block, evaluated against getInvoker().Execute the LensKit task.