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}
.
- - Open the example "/hello" endpoint
+ - Open the example "/hello" endpoint
- Add REST resources, Servlets, functions and other services in
{language.dir.code}
.
- Your static assets are located in
src/main/resources/META-INF/resources
.
- Configure your application in
src/main/resources/{config.file-name}
.
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/codestart.yml
similarity index 51%
rename from devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/codestart.yml
rename to devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/codestart.yml
index 85a7d80b3cb6c4..4de8244d7507d5 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/codestart.yml
+++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/codestart.yml
@@ -1,11 +1,16 @@
name: resteasy-example
ref: resteasy
-type: example
+type: code
+tags: example
language:
base:
data:
- rest:
+ resource:
+ class-name: ExampleResource
path: "/resteasy/hello"
response: "hello"
+ package-name: org.acme.resteasy
+ dependencies:
+ - io.quarkus:quarkus-resteasy
test-dependencies:
- io.rest-assured:rest-assured
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/java/src/main/java/org/acme/resteasy/ExampleResource.tpl.qute.java b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/java/src/main/java/{package-name.dir}/{resource.class-name}.tpl.qute.java
similarity index 61%
rename from devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/java/src/main/java/org/acme/resteasy/ExampleResource.tpl.qute.java
rename to devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/java/src/main/java/{package-name.dir}/{resource.class-name}.tpl.qute.java
index a605f5be229766..9f1415d1a35c00 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/java/src/main/java/org/acme/resteasy/ExampleResource.tpl.qute.java
+++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/java/src/main/java/{package-name.dir}/{resource.class-name}.tpl.qute.java
@@ -1,16 +1,16 @@
-package org.acme.resteasy;
+package {package-name};
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
-@Path("{rest.path}")
-public class ExampleResource {
+@Path("{resource.path}")
+public class {resource.class-name} {
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
- return "{rest.response}";
+ return "{resource.response}";
}
}
\ No newline at end of file
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/java/src/native-test/java/org/acme/resteasy/NativeExampleResourceIT.java b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/java/src/native-test/java/{package-name.dir}/Native{resource.class-name}IT.tpl.qute.java
similarity index 53%
rename from devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/java/src/native-test/java/org/acme/resteasy/NativeExampleResourceIT.java
rename to devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/java/src/native-test/java/{package-name.dir}/Native{resource.class-name}IT.tpl.qute.java
index 0a94d8d9ce4e66..8c54cc543b42f8 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/java/src/native-test/java/org/acme/resteasy/NativeExampleResourceIT.java
+++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/java/src/native-test/java/{package-name.dir}/Native{resource.class-name}IT.tpl.qute.java
@@ -1,9 +1,9 @@
-package org.acme.resteasy;
+package {package-name};
import io.quarkus.test.junit.NativeImageTest;
@NativeImageTest
-public class NativeExampleResourceIT extends ExampleResourceTest {
+public class Native{resource.class-name}IT extends {resource.class-name}Test {
// Execute the same tests but in native mode.
}
\ No newline at end of file
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/java/src/test/java/org/acme/resteasy/ExampleResourceTest.tpl.qute.java b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/java/src/test/java/{package-name.dir}/{resource.class-name}Test.tpl.qute.java
similarity index 66%
rename from devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/java/src/test/java/org/acme/resteasy/ExampleResourceTest.tpl.qute.java
rename to devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/java/src/test/java/{package-name.dir}/{resource.class-name}Test.tpl.qute.java
index 2062b430ed275a..0dfcaaf81c3556 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/java/src/test/java/org/acme/resteasy/ExampleResourceTest.tpl.qute.java
+++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/java/src/test/java/{package-name.dir}/{resource.class-name}Test.tpl.qute.java
@@ -1,4 +1,4 @@
-package org.acme.resteasy;
+package {package-name};
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.Test;
@@ -7,15 +7,15 @@
import static org.hamcrest.CoreMatchers.is;
@QuarkusTest
-public class ExampleResourceTest {
+public class {resource.class-name}Test {
@Test
public void testHelloEndpoint() {
given()
- .when().get("{rest.path}")
+ .when().get("{resource.path}")
.then()
.statusCode(200)
- .body(is("{rest.response}"));
+ .body(is("{resource.response}"));
}
}
\ No newline at end of file
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/kotlin/src/main/kotlin/org/acme/resteasy/ExampleResource.tpl.qute.kt b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/kotlin/src/main/kotlin/{package-name.dir}/{resource.class-name}.tpl.qute.kt
similarity index 57%
rename from devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/kotlin/src/main/kotlin/org/acme/resteasy/ExampleResource.tpl.qute.kt
rename to devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/kotlin/src/main/kotlin/{package-name.dir}/{resource.class-name}.tpl.qute.kt
index 8b60e4e0cf9cb4..3e02aea1804dac 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/kotlin/src/main/kotlin/org/acme/resteasy/ExampleResource.tpl.qute.kt
+++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/kotlin/src/main/kotlin/{package-name.dir}/{resource.class-name}.tpl.qute.kt
@@ -1,14 +1,14 @@
-package org.acme.resteasy
+package {package-name}
import javax.ws.rs.GET
import javax.ws.rs.Path
import javax.ws.rs.Produces
import javax.ws.rs.core.MediaType
-@Path("{rest.path}")
-class ExampleResource {
+@Path("{resource.path}")
+class {resource.class-name} {
@GET
@Produces(MediaType.TEXT_PLAIN)
- fun hello() = "{rest.response}"
+ fun hello() = "{resource.response}"
}
\ No newline at end of file
diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/kotlin/src/native-test/kotlin/{package-name.dir}/Native{resource.class-name}IT.tpl.qute.kt b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/kotlin/src/native-test/kotlin/{package-name.dir}/Native{resource.class-name}IT.tpl.qute.kt
new file mode 100644
index 00000000000000..e4d92d1565b504
--- /dev/null
+++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/kotlin/src/native-test/kotlin/{package-name.dir}/Native{resource.class-name}IT.tpl.qute.kt
@@ -0,0 +1,6 @@
+package {package-name}
+
+import io.quarkus.test.junit.NativeImageTest
+
+@NativeImageTest
+class Native{resource.class-name}IT : {resource.class-name}Test()
\ No newline at end of file
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/kotlin/src/test/kotlin/org/acme/resteasy/ExampleResourceTest.tpl.qute.kt b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/kotlin/src/test/kotlin/{package-name.dir}/{resource.class-name}Test.tpl.qute.kt
similarity index 65%
rename from devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/kotlin/src/test/kotlin/org/acme/resteasy/ExampleResourceTest.tpl.qute.kt
rename to devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/kotlin/src/test/kotlin/{package-name.dir}/{resource.class-name}Test.tpl.qute.kt
index c097be9645c3b2..e130d90936ea70 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/kotlin/src/test/kotlin/org/acme/resteasy/ExampleResourceTest.tpl.qute.kt
+++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/kotlin/src/test/kotlin/{package-name.dir}/{resource.class-name}Test.tpl.qute.kt
@@ -1,4 +1,4 @@
-package org.acme.resteasy
+package {package-name}
import io.quarkus.test.junit.QuarkusTest
import io.restassured.RestAssured.given
@@ -6,15 +6,15 @@ import org.hamcrest.CoreMatchers.`is`
import org.junit.jupiter.api.Test
@QuarkusTest
-class ExampleResourceTest {
+class {resource.class-name}Test {
@Test
fun testHelloEndpoint() {
given()
- .`when`().get("{rest.path}")
+ .`when`().get("{resource.path}")
.then()
.statusCode(200)
- .body(`is`("{rest.response}"))
+ .body(`is`("{resource.response}"))
}
}
\ No newline at end of file
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/scala/src/main/scala/org/acme/resteasy/ExampleResource.tpl.qute.scala b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/scala/src/main/scala/{package-name.dir}/{resource.class-name}.tpl.qute.scala
similarity index 54%
rename from devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/scala/src/main/scala/org/acme/resteasy/ExampleResource.tpl.qute.scala
rename to devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/scala/src/main/scala/{package-name.dir}/{resource.class-name}.tpl.qute.scala
index d1164266ad7d73..f48e321131f508 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/scala/src/main/scala/org/acme/resteasy/ExampleResource.tpl.qute.scala
+++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/scala/src/main/scala/{package-name.dir}/{resource.class-name}.tpl.qute.scala
@@ -1,12 +1,12 @@
-package org.acme.resteasy
+package {package-name}
import javax.ws.rs.\{GET, Path, Produces}
import javax.ws.rs.core.MediaType
-@Path("{rest.path}")
-class ExampleResource {
+@Path("{resource.path}")
+class {resource.class-name} {
@GET
@Produces(Array[String](MediaType.TEXT_PLAIN))
- def hello() = "{rest.response}"
+ def hello() = "{resource.response}"
}
\ No newline at end of file
diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/scala/src/native-test/scala/{package-name.dir}/Native{resource.class-name}IT.tpl.qute.scala b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/scala/src/native-test/scala/{package-name.dir}/Native{resource.class-name}IT.tpl.qute.scala
new file mode 100644
index 00000000000000..04622a9647ada8
--- /dev/null
+++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/scala/src/native-test/scala/{package-name.dir}/Native{resource.class-name}IT.tpl.qute.scala
@@ -0,0 +1,6 @@
+package {package-name}
+
+import io.quarkus.test.junit.NativeImageTest
+
+@NativeImageTest
+class Native{resource.class-name}IT extends {resource.class-name}Test
\ No newline at end of file
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/scala/src/test/scala/org/acme/resteasy/ExampleResourceTest.tpl.qute.scala b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/scala/src/test/scala/{package-name.dir}/{resource.class-name}Test.tpl.qute.scala
similarity index 65%
rename from devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/scala/src/test/scala/org/acme/resteasy/ExampleResourceTest.tpl.qute.scala
rename to devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/scala/src/test/scala/{package-name.dir}/{resource.class-name}Test.tpl.qute.scala
index fb8524d9d849bb..1ac6d66c15948c 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/scala/src/test/scala/org/acme/resteasy/ExampleResourceTest.tpl.qute.scala
+++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/code/resteasy-example/scala/src/test/scala/{package-name.dir}/{resource.class-name}Test.tpl.qute.scala
@@ -1,4 +1,4 @@
-package org.acme.resteasy
+package {package-name}
import io.quarkus.test.junit.QuarkusTest
import io.restassured.RestAssured.given
@@ -6,15 +6,15 @@ import org.hamcrest.CoreMatchers.`is`
import org.junit.jupiter.api.Test
@QuarkusTest
-class ExampleResourceTest {
+class {resource.class-name}Test {
@Test
def testHelloEndpoint() = {
given()
- .`when`().get("{rest.path}")
+ .`when`().get("{resource.path}")
.then()
.statusCode(200)
- .body(`is`("{rest.response}"))
+ .body(`is`("{resource.response}"))
}
}
\ No newline at end of file
diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/java/src/main/java/org/acme/commandmode/GreetingMain.tpl.qute.java b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/java/src/main/java/org/acme/commandmode/GreetingMain.tpl.qute.java
deleted file mode 100644
index f1f4b7f4ce7d2c..00000000000000
--- a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/java/src/main/java/org/acme/commandmode/GreetingMain.tpl.qute.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.acme.commandmode;
-
-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 GreetingMain implements QuarkusApplication {
-
- @Inject
- GreetingService service;
-
- @Override
- public int run(String... args) throws Exception {
-
- if(args.length>0) {
- System.out.println(service.greeting(String.join(" ", args)));
- } else {
- System.out.println(service.greeting("{greeting.default-name}"));
- }
-
- return 0;
- }
-}
diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/java/src/main/java/org/acme/commandmode/GreetingService.tpl.qute.java b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/java/src/main/java/org/acme/commandmode/GreetingService.tpl.qute.java
deleted file mode 100644
index 08aee0c573065d..00000000000000
--- a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/java/src/main/java/org/acme/commandmode/GreetingService.tpl.qute.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package org.acme.commandmode;
-
-import javax.enterprise.context.ApplicationScoped;
-
-@ApplicationScoped
-public class GreetingService {
-
- public String greeting(String name) {
- return "{greeting.message} " + name;
- }
-
-}
\ No newline at end of file
diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/kotlin/src/main/kotlin/org/acme/commandmode/GreetingMain.tpl.qute.kt b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/kotlin/src/main/kotlin/org/acme/commandmode/GreetingMain.tpl.qute.kt
deleted file mode 100644
index f3696b05a14451..00000000000000
--- a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/kotlin/src/main/kotlin/org/acme/commandmode/GreetingMain.tpl.qute.kt
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.acme.commandmode
-
-import javax.inject.Inject
-
-import io.quarkus.runtime.QuarkusApplication
-import io.quarkus.runtime.annotations.QuarkusMain
-
-@QuarkusMain
-class GreetingMain: QuarkusApplication {
-
- @Inject
- lateinit var service: GreetingService
- override fun run(vararg args: String?): Int {
- if (args.isNotEmpty()) {
- System.out.println(service.greeting(args.joinToString(",")))
- } else {
- System.out.println(service.greeting("{greeting.default-name}"))
- }
- return 0
- }
-
-}
diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/kotlin/src/main/kotlin/org/acme/commandmode/GreetingService.tpl.qute.kt b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/kotlin/src/main/kotlin/org/acme/commandmode/GreetingService.tpl.qute.kt
deleted file mode 100644
index 5a6237d15b6829..00000000000000
--- a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/example/commandmode-example/kotlin/src/main/kotlin/org/acme/commandmode/GreetingService.tpl.qute.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.acme.commandmode
-
-import javax.enterprise.context.ApplicationScoped
-
-@ApplicationScoped
-class GreetingService {
- fun greeting(name: String) = "{greeting.message} $name"
-}
\ No newline at end of file
diff --git a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/tooling/dockerfiles/base/src/main/docker/Dockerfile.tpl.qute.fast-jar b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/tooling/dockerfiles/base/src/main/docker/Dockerfile.tpl.qute.fast-jar
index 208d90482c1699..fcaba104d72635 100644
--- a/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/tooling/dockerfiles/base/src/main/docker/Dockerfile.tpl.qute.fast-jar
+++ b/devtools/platform-descriptor-json/src/main/resources/bundled-codestarts/tooling/dockerfiles/base/src/main/docker/Dockerfile.tpl.qute.fast-jar
@@ -7,18 +7,18 @@
#
# Then, build the image with:
#
-# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/{project.artifact-id}-jvm .
+# docker build -f src/main/docker/Dockerfile.fast-jar -t quarkus/{project.artifact-id}-fast-jar .
#
# Then run the container using:
#
-# docker run -i --rm -p 8080:8080 quarkus/{project.artifact-id}-jvm
+# docker run -i --rm -p 8080:8080 quarkus/{project.artifact-id}-fast-jar
#
# If you want to include the debug port into your docker image
# you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5050
#
# Then run the container using :
#
-# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/{project.artifact-id}-jvm
+# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/{project.artifact-id}-fast-jar
#
###
FROM {dockerfile.fast-jar.from}
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/amazon-lambda-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/amazon-lambda-example/codestart.yml
index f5c43e276f5013..ce73a5b331e4f2 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/amazon-lambda-example/codestart.yml
+++ b/devtools/platform-descriptor-json/src/main/resources/codestarts/amazon-lambda-example/codestart.yml
@@ -1,7 +1,9 @@
----
name: amazon-lambda-example
ref: amazon-lambda
-type: example
+type: code
+tags:
+ - example
+ - compatibility-issues
language:
base:
shared-data:
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/azure-functions-http-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/azure-functions-http-example/codestart.yml
index 723e95e028857c..df0e5778977186 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/azure-functions-http-example/codestart.yml
+++ b/devtools/platform-descriptor-json/src/main/resources/codestarts/azure-functions-http-example/codestart.yml
@@ -1,7 +1,10 @@
----
name: azure-functions-http-example
ref: azure-functions-http
-type: example
+type: code
+tags:
+ - example
+ - compatibility-issues
+ - maven-only
language:
base:
shared-data:
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/config-yaml-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/config-yaml-example/codestart.yml
index 36f49d25014dec..19dd0451d0f777 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/config-yaml-example/codestart.yml
+++ b/devtools/platform-descriptor-json/src/main/resources/codestarts/config-yaml-example/codestart.yml
@@ -1,7 +1,7 @@
----
name: config-yaml-example
ref: config-yaml
-type: example
+type: code
+tags: example
language:
base:
dependencies:
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/funqy-amazon-lambda-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/funqy-amazon-lambda-example/codestart.yml
index e7470dfa07674a..ce5f7bca076566 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/funqy-amazon-lambda-example/codestart.yml
+++ b/devtools/platform-descriptor-json/src/main/resources/codestarts/funqy-amazon-lambda-example/codestart.yml
@@ -1,7 +1,9 @@
----
name: funqy-amazon-lambda-example
ref: funqy-amazon-lambda
-type: example
+type: code
+tags:
+ - example
+ - compatibility-issues
language:
base:
shared-data:
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/funqy-http-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/funqy-http-example/codestart.yml
index 1528de53b86b0e..0b134d28aa63c2 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/funqy-http-example/codestart.yml
+++ b/devtools/platform-descriptor-json/src/main/resources/codestarts/funqy-http-example/codestart.yml
@@ -1,7 +1,7 @@
----
name: funqy-http-example
ref: funqy-http
-type: example
+type: code
+tags: example
language:
base:
dependencies:
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/funqy-knative-events-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/funqy-knative-events-example/codestart.yml
index 06a85fe5213b5a..5931413b4a2e67 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/funqy-knative-events-example/codestart.yml
+++ b/devtools/platform-descriptor-json/src/main/resources/codestarts/funqy-knative-events-example/codestart.yml
@@ -1,7 +1,9 @@
----
name: funqy-knative-events-example
ref: funqy-knative-events
-type: example
+type: code
+tags:
+ - example
+ - compatibility-issues
language:
base:
data:
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/qute-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/qute-example/codestart.yml
index f4de5208a01cb2..7457fb6dfb1ca5 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/qute-example/codestart.yml
+++ b/devtools/platform-descriptor-json/src/main/resources/codestarts/qute-example/codestart.yml
@@ -1,6 +1,7 @@
name: qute-example
ref: qute
-type: example
+type: code
+tags: example
language:
base:
dependencies:
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/qute-example/kotlin/src/native-test/kotlin/org/acme/qute/NativeHelloResourceIT.kt b/devtools/platform-descriptor-json/src/main/resources/codestarts/qute-example/kotlin/src/native-test/kotlin/org/acme/qute/NativeHelloResourceIT.kt
index 3c087749cdffda..4079932de97379 100644
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/qute-example/kotlin/src/native-test/kotlin/org/acme/qute/NativeHelloResourceIT.kt
+++ b/devtools/platform-descriptor-json/src/main/resources/codestarts/qute-example/kotlin/src/native-test/kotlin/org/acme/qute/NativeHelloResourceIT.kt
@@ -1,4 +1,4 @@
-package codestarts.qute - example.kotlin.src.native - test.kotlin.org.acme.qute
+package org.acme.qute
import io.quarkus.test.junit.NativeImageTest
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/kotlin/src/native-test/kotlin/org/acme/resteasy/NativeExampleResourceIT.kt b/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/kotlin/src/native-test/kotlin/org/acme/resteasy/NativeExampleResourceIT.kt
deleted file mode 100644
index edf12f47ef27e9..00000000000000
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/kotlin/src/native-test/kotlin/org/acme/resteasy/NativeExampleResourceIT.kt
+++ /dev/null
@@ -1,6 +0,0 @@
-package org.acme.resteasy
-
-import io.quarkus.test.junit.NativeImageTest
-
-@NativeImageTest
-class NativeExampleResourceIT : ExampleResourceTest()
\ No newline at end of file
diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/scala/src/native-test/scala/org/acme/resteasy/NativeExampleResourceIT.scala b/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/scala/src/native-test/scala/org/acme/resteasy/NativeExampleResourceIT.scala
deleted file mode 100644
index 5227f9fe33c382..00000000000000
--- a/devtools/platform-descriptor-json/src/main/resources/codestarts/resteasy-example/scala/src/native-test/scala/org/acme/resteasy/NativeExampleResourceIT.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-package org.acme.resteasy
-
-import io.quarkus.test.junit.NativeImageTest
-
-@NativeImageTest
-class NativeExampleResourceIT extends ExampleResourceTest
\ No newline at end of file
diff --git a/independent-projects/tools/codestarts/codestarts.adoc b/independent-projects/tools/codestarts/codestarts.adoc
index d0caef85605ca0..9cf9932c4aa8cd 100644
--- a/independent-projects/tools/codestarts/codestarts.adoc
+++ b/independent-projects/tools/codestarts/codestarts.adoc
@@ -22,7 +22,7 @@ Base:
Extra:
* tooling: Anything that can be added to improve the project (e.g. dockerfiles)
-* example: Any Quarkus extension can provide example code. The user can decide to activate it or not.
+* code: Any Quarkus extension can provide example code. The user can decide to activate it or not.
Each codestart consists of:
@@ -50,7 +50,7 @@ When generating a Quarkus project:
. buildtool
. config
. tooling
-. example
+. code
The data used to generate a specific codestart is a merge of:
@@ -77,7 +77,8 @@ codestart.yml:
----
name: the unique name - REQUIRED
ref: the reference name (not unique) to use for extension matching (else the name is used)
-type: the type [example (default), project, buildtool, language, config] or any custom type
+type: the type [code (default), project, buildtool, language, config] or any custom type
+tags: an array of tags (add `example` for example codestarts)
fallback: flag to indicate that it should be selected as fallback when no codestart has been selected with type - Only for base types
preselected: flag to indicate that it should be pre-selected - Only for extra types.
spec:
@@ -137,7 +138,8 @@ codestart.yml:
---
name: foo-example
ref: foo
-type: example
+type: code
+tags: example
spec:
base:
data:
diff --git a/independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/Codestart.java b/independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/Codestart.java
index 4deda936470bdc..c79922e851f262 100644
--- a/independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/Codestart.java
+++ b/independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/Codestart.java
@@ -48,6 +48,10 @@ public boolean implementsLanguage(String languageName) {
return implementedLanguages.isEmpty() || implementedLanguages.contains(languageName);
}
+ public boolean containsTag(String tag) {
+ return getSpec().getTags().contains(tag);
+ }
+
public Map getLocalData(String languageName) {
return NestedMaps.deepMerge(Stream.of(getBaseLanguageSpec().getData(), getLanguageSpec(languageName).getData()));
}
diff --git a/independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/CodestartData.java b/independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/CodestartData.java
index b5900109299e10..4d324b7abb0532 100644
--- a/independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/CodestartData.java
+++ b/independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/CodestartData.java
@@ -23,7 +23,12 @@ public static Optional getBuildtool(final Map data) {
static Map buildCodestartData(final Codestart codestart, final String languageName,
final Map data) {
- return NestedMaps.deepMerge(Stream.of(codestart.getLocalData(languageName), data));
+ final Optional