|
|
@ -89,10 +89,12 @@ public class InitCommand extends OptionParsingCommand {
|
|
|
|
|
|
|
|
|
|
|
|
private OptionSpec<String> description;
|
|
|
|
private OptionSpec<String> description;
|
|
|
|
|
|
|
|
|
|
|
|
private OptionSpec<String> packaging;
|
|
|
|
private OptionSpec<String> packageName;
|
|
|
|
|
|
|
|
|
|
|
|
private OptionSpec<String> type;
|
|
|
|
private OptionSpec<String> type;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private OptionSpec<String> packaging;
|
|
|
|
|
|
|
|
|
|
|
|
private OptionSpec<String> build;
|
|
|
|
private OptionSpec<String> build;
|
|
|
|
|
|
|
|
|
|
|
|
private OptionSpec<String> format;
|
|
|
|
private OptionSpec<String> format;
|
|
|
@ -140,13 +142,14 @@ public class InitCommand extends OptionParsingCommand {
|
|
|
|
"Project name; infer application name").withRequiredArg();
|
|
|
|
"Project name; infer application name").withRequiredArg();
|
|
|
|
this.description = option("description", "Project description")
|
|
|
|
this.description = option("description", "Project description")
|
|
|
|
.withRequiredArg();
|
|
|
|
.withRequiredArg();
|
|
|
|
this.packaging = option(Arrays.asList("packaging", "p"),
|
|
|
|
this.packageName = option("package-name", "Package name").withRequiredArg();
|
|
|
|
"Project packaging (for example 'jar')").withRequiredArg();
|
|
|
|
|
|
|
|
this.type = option(
|
|
|
|
this.type = option(
|
|
|
|
Arrays.asList("type", "t"),
|
|
|
|
Arrays.asList("type", "t"),
|
|
|
|
"Project type. Not normally needed if you use --build "
|
|
|
|
"Project type. Not normally needed if you use --build "
|
|
|
|
+ "and/or --format. Check the capabilities of the service "
|
|
|
|
+ "and/or --format. Check the capabilities of the service "
|
|
|
|
+ "(--list) for more details").withRequiredArg();
|
|
|
|
+ "(--list) for more details").withRequiredArg();
|
|
|
|
|
|
|
|
this.packaging = option(Arrays.asList("packaging", "p"),
|
|
|
|
|
|
|
|
"Project packaging (for example 'jar')").withRequiredArg();
|
|
|
|
this.build = option("build",
|
|
|
|
this.build = option("build",
|
|
|
|
"Build system to use (for example 'maven' or 'gradle')")
|
|
|
|
"Build system to use (for example 'maven' or 'gradle')")
|
|
|
|
.withRequiredArg().defaultsTo("maven");
|
|
|
|
.withRequiredArg().defaultsTo("maven");
|
|
|
@ -226,8 +229,8 @@ public class InitCommand extends OptionParsingCommand {
|
|
|
|
if (options.has(this.javaVersion)) {
|
|
|
|
if (options.has(this.javaVersion)) {
|
|
|
|
request.setJavaVersion(options.valueOf(this.javaVersion));
|
|
|
|
request.setJavaVersion(options.valueOf(this.javaVersion));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (options.has(this.packaging)) {
|
|
|
|
if (options.has(this.packageName)) {
|
|
|
|
request.setPackaging(options.valueOf(this.packaging));
|
|
|
|
request.setPackageName(options.valueOf(this.packageName));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
request.setBuild(options.valueOf(this.build));
|
|
|
|
request.setBuild(options.valueOf(this.build));
|
|
|
|
request.setFormat(options.valueOf(this.format));
|
|
|
|
request.setFormat(options.valueOf(this.format));
|
|
|
@ -235,6 +238,9 @@ public class InitCommand extends OptionParsingCommand {
|
|
|
|
if (options.has(this.type)) {
|
|
|
|
if (options.has(this.type)) {
|
|
|
|
request.setType(options.valueOf(this.type));
|
|
|
|
request.setType(options.valueOf(this.type));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (options.has(this.packaging)) {
|
|
|
|
|
|
|
|
request.setPackaging(options.valueOf(this.packaging));
|
|
|
|
|
|
|
|
}
|
|
|
|
if (options.has(this.language)) {
|
|
|
|
if (options.has(this.language)) {
|
|
|
|
request.setLanguage(options.valueOf(this.language));
|
|
|
|
request.setLanguage(options.valueOf(this.language));
|
|
|
|
}
|
|
|
|
}
|
|
|
|