Add 'rabbit' thin launcher profile to all apps and --deployer=thin

This commit is contained in:
Dave Syer
2016-12-16 08:41:07 +00:00
parent c1c2f9d940
commit ca120e6302
11 changed files with 103 additions and 4 deletions

View File

@@ -77,6 +77,8 @@ public class LauncherCommand extends OptionParsingCommand {
private OptionSpec<Void> debugOption;
private OptionSpec<Void> listOption;
private OptionSpec<String> deployerOption;
private OptionSpec<String> profileOption;
private OptionSpec<Void> versionOption;
@Override
@@ -88,6 +90,12 @@ public class LauncherCommand extends OptionParsingCommand {
"Debug logging for the deployer");
this.listOption = option(Arrays.asList("list", "l"),
"List the deployables (don't launch anything)");
this.deployerOption = option(Arrays.asList("deployer"),
"Use a different deployer instead of the default local one (either 'local' or 'thin')")
.withRequiredArg().defaultsTo("local");
this.profileOption = option(Arrays.asList("profile", "p"),
"Use a different Spring profile (or profiles) for the deployer app, e.g. 'rabbit' for a Spring Cloud Bus with RabbitMQ")
.withOptionalArg();
this.versionOption = option(Arrays.asList("version", "v"),
"Show the version (don't launch anything)");
}
@@ -135,6 +143,12 @@ public class LauncherCommand extends OptionParsingCommand {
if (options.has(this.debugOption)) {
args.add("--debug=true");
}
if (options.has(this.profileOption)) {
args.add("--spring.profiles.active=" + profileOption.value(options));
}
if (options.has(this.deployerOption)) {
args.add("--thin.profile=" + deployerOption.value(options));
}
if (options.has(this.listOption)) {
args.add("--launcher.list=true");
}