diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/buildtool/gradle-kotlin-dsl/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/buildtool/gradle-kotlin-dsl/codestart.yml index 3534bca41ad405..2f4a15c3a0c5f4 100644 --- a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/buildtool/gradle-kotlin-dsl/codestart.yml +++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/buildtool/gradle-kotlin-dsl/codestart.yml @@ -6,12 +6,12 @@ output-strategy: language: base: data: - quarkus: - gradle-plugin: - id: io.quarkus kotlin: version: 1.3.72 shared-data: + quarkus: + gradle-plugin: + id: io.quarkus buildtool: build-dir: build guide: https://quarkus.io/guides/gradle-tooling diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/buildtool/gradle/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/buildtool/gradle/codestart.yml index f40897a830928b..cc6d670ac58866 100644 --- a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/buildtool/gradle/codestart.yml +++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/buildtool/gradle/codestart.yml @@ -6,12 +6,12 @@ output-strategy: language: base: data: - quarkus: - gradle-plugin: - id: io.quarkus kotlin: version: 1.3.72 shared-data: + quarkus: + gradle-plugin: + id: io.quarkus buildtool: build-dir: build guide: https://quarkus.io/guides/gradle-tooling diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/base/README.md b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/commandmode-example/base/README.md similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/base/README.md rename to devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/commandmode-example/base/README.md diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/commandmode-example/codestart.yml similarity index 63% rename from devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/codestart.yml rename to devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/commandmode-example/codestart.yml index 077c82077d2857..5915a3c722b9da 100644 --- a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/codestart.yml +++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/commandmode-example/codestart.yml @@ -1,10 +1,13 @@ name: commandmode-example ref: commandmode -type: example -fallback: true +type: code +tags: example language: base: data: + main: + class-name: HelloCommando + package-name: org.acme.commandmode greeting: message: "hello" default-name: "commando" diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/commandmode-example/java/src/main/java/{package-name.dir}/{main.class-name}.tpl.qute.java b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/commandmode-example/java/src/main/java/{package-name.dir}/{main.class-name}.tpl.qute.java new file mode 100644 index 00000000000000..b7e1dc55d5245f --- /dev/null +++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/commandmode-example/java/src/main/java/{package-name.dir}/{main.class-name}.tpl.qute.java @@ -0,0 +1,19 @@ +package {package-name}; + +import javax.enterprise.context.control.ActivateRequestContext; +import javax.inject.Inject; + +import io.quarkus.runtime.Quarkus; +import io.quarkus.runtime.QuarkusApplication; +import io.quarkus.runtime.annotations.QuarkusMain; + +@QuarkusMain +public class {main.class-name} implements QuarkusApplication { + + @Override + public int run(String... args) throws Exception { + final String name = args.length > 0 ? String.join(" ", args) : "{greeting.default-name}"; + System.out.println("{greeting.message} " + name); + return 0; + } +} diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/commandmode-example/kotlin/src/main/kotlin/{package-name.dir}/{main.class-name}.tpl.qute.kt b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/commandmode-example/kotlin/src/main/kotlin/{package-name.dir}/{main.class-name}.tpl.qute.kt new file mode 100644 index 00000000000000..e60be12295eba8 --- /dev/null +++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/commandmode-example/kotlin/src/main/kotlin/{package-name.dir}/{main.class-name}.tpl.qute.kt @@ -0,0 +1,17 @@ +package {package-name} + +import javax.inject.Inject + +import io.quarkus.runtime.QuarkusApplication +import io.quarkus.runtime.annotations.QuarkusMain + +@QuarkusMain +class {main.class-name}: QuarkusApplication { + + override fun run(vararg args: String?): Int { + val name = if (args.isNotEmpty()) args.joinToString(",") else "{greeting.default-name}" + println(name) + return 0 + } + +} diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/base/README.md b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/base/README.md similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/base/README.md rename to devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/base/README.md diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/base/src/main/resources/META-INF/resources/index.tpl.qute.html b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/base/src/main/resources/META-INF/resources/index.tpl.qute.html similarity index 97% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/base/src/main/resources/META-INF/resources/index.tpl.qute.html rename to devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/base/src/main/resources/META-INF/resources/index.tpl.qute.html index 5227dc15c9fe7b..0ec933397bfc2b 100644 --- a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/base/src/main/resources/META-INF/resources/index.tpl.qute.html +++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/base/src/main/resources/META-INF/resources/index.tpl.qute.html @@ -117,7 +117,7 @@

What can I do from here?

If not already done, run the application in dev mode using: {buildtool.cmd.dev}.