templates.TemplateProject.template Maven / Gradle / Ivy
import bear.annotations.Configuration
import bear.annotations.Project
import bear.core.*
import bear.task.TaskCallable
import bear.annotations.Method
import static bear.task.TaskResult.OK
import static bear.task.NamedCallable.named
@Project(shortName = "${dashedTitle}", name = "${spacedTitle}")
@Configuration(
properties = ".bear/${dashedTitle}",
stage = "one",
useUI = true,
user = "${user}",
password = "${password}"
)
public class ${projectTitle} extends BearProject<${projectTitle}> {
Bear bear;
@Override
protected GlobalContext configureMe(GlobalContextFactory factory) throws Exception
{
bear.stages.set(new Stages(global)
.addQuick("one", "${host}")
.addQuick("two", "${host}, vm02")
.addQuick("three", "${host}, vm02, vm03")
.addQuick("u-1", "${host}")
.addQuick("u-2", "${host}, vm05")
.addQuick("u-3", "${host}, vm05, vm06")
);
return global;
}
@Method
def ls(){
run([named("ls task", { _, task ->
println _.sys.lsQuick(".")
} as TaskCallable)])
}
static main(args)
{
new ${projectTitle}().ls()
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy