diff --git a/devtools/cli/src/main/java/io/quarkus/cli/Create.java b/devtools/cli/src/main/java/io/quarkus/cli/Create.java index 704b17babab55..1b36cdeff41e0 100644 --- a/devtools/cli/src/main/java/io/quarkus/cli/Create.java +++ b/devtools/cli/src/main/java/io/quarkus/cli/Create.java @@ -115,7 +115,6 @@ else if (targetBuildTool.gradleKotlinDsl) .version(version) .sourceType(sourceType) .extensions(extensions) - .codestartsEnabled(true) .noExamples(noExamples) .execute().isSuccess(); diff --git a/devtools/maven/src/main/java/io/quarkus/maven/CreateProjectMojo.java b/devtools/maven/src/main/java/io/quarkus/maven/CreateProjectMojo.java index 368689afe4908..5fa9cb9c80db6 100644 --- a/devtools/maven/src/main/java/io/quarkus/maven/CreateProjectMojo.java +++ b/devtools/maven/src/main/java/io/quarkus/maven/CreateProjectMojo.java @@ -74,8 +74,8 @@ public class CreateProjectMojo extends AbstractMojo { @Parameter(property = "projectVersion") private String projectVersion; - @Parameter(property = "codestartsEnabled", defaultValue = "false") - private boolean codestartsEnabled; + @Parameter(property = "legacyCodegen", defaultValue = "false") + private boolean legacyCodegen; @Parameter(property = "noExamples", defaultValue = "false") private boolean noExamples; @@ -195,7 +195,7 @@ public void execute() throws MojoExecutionException { .sourceType(sourceType) .className(className) .extensions(extensions) - .codestartsEnabled(codestartsEnabled) + .legacyCodegen(legacyCodegen) .noExamples(noExamples); if (path != null) { createProject.setValue("path", path); @@ -203,7 +203,7 @@ public void execute() throws MojoExecutionException { success = createProject.execute().isSuccess(); - if (!codestartsEnabled) { + if (legacyCodegen) { File createdDependenciesBuildFile = new File(projectRoot, buildToolEnum.getDependenciesFile()); if (BuildTool.MAVEN.equals(buildToolEnum)) { createMavenWrapper(createdDependenciesBuildFile, ToolsUtils.readQuarkusProperties(platform)); diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/base/README.md b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/base/README.md similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/base/README.md rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/base/README.md diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/codestart.yml similarity index 91% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/codestart.yml rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/codestart.yml index ce73a5b331e4f..7012acda0be67 100644 --- a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/codestart.yml +++ b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/codestart.yml @@ -3,7 +3,7 @@ ref: amazon-lambda type: code tags: - example - - compatibility-issues + - singleton-example language: base: shared-data: diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/java/payload.json b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/java/payload.json similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/java/payload.json rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/java/payload.json diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/java/src/main/java/org/acme/lambda/GreetingLambda.java b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/java/src/main/java/org/acme/lambda/GreetingLambda.java similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/java/src/main/java/org/acme/lambda/GreetingLambda.java rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/java/src/main/java/org/acme/lambda/GreetingLambda.java diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/java/src/main/java/org/acme/lambda/Person.java b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/java/src/main/java/org/acme/lambda/Person.java similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/java/src/main/java/org/acme/lambda/Person.java rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/java/src/main/java/org/acme/lambda/Person.java diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/java/src/native-test/java/org/acme/lambda/LambdaHandlerTestIT.java b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/java/src/native-test/java/org/acme/lambda/LambdaHandlerTestIT.java similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/java/src/native-test/java/org/acme/lambda/LambdaHandlerTestIT.java rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/java/src/native-test/java/org/acme/lambda/LambdaHandlerTestIT.java diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/java/src/test/java/org/acme/lambda/LambdaHandlerTest.java b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/java/src/test/java/org/acme/lambda/LambdaHandlerTest.java similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/java/src/test/java/org/acme/lambda/LambdaHandlerTest.java rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/java/src/test/java/org/acme/lambda/LambdaHandlerTest.java diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/java/src/test/resources/application.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/java/src/test/resources/application.yml similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/amazon-lambda-example/java/src/test/resources/application.yml rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/amazon-lambda-example/java/src/test/resources/application.yml diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/base/README.md b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/base/README.md similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/base/README.md rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/base/README.md diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/base/azure-config/function.tpl.qute.json b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/base/azure-config/function.tpl.qute.json similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/base/azure-config/function.tpl.qute.json rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/base/azure-config/function.tpl.qute.json diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/base/azure-config/host.json b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/base/azure-config/host.json similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/base/azure-config/host.json rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/base/azure-config/host.json diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/base/azure-config/local.settings.json b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/base/azure-config/local.settings.json similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/base/azure-config/local.settings.json rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/base/azure-config/local.settings.json diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/base/pom.tpl.qute.xml b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/base/pom.tpl.qute.xml similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/base/pom.tpl.qute.xml rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/base/pom.tpl.qute.xml diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/base/src/main/resources/application.tpl.qute.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/base/src/main/resources/application.tpl.qute.yml similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/base/src/main/resources/application.tpl.qute.yml rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/base/src/main/resources/application.tpl.qute.yml diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/codestart.yml similarity index 94% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/codestart.yml rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/codestart.yml index 8b45b26888bfa..f3c7850d98ecb 100644 --- a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/azure-functions-http-example/codestart.yml +++ b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/azure-functions-http-example/codestart.yml @@ -3,7 +3,7 @@ ref: azure-functions-http type: code tags: - example - - compatibility-issues + - singleton-example - maven-only language: base: diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/base/README.md b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/base/README.md similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/base/README.md rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/base/README.md diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/codestart.yml similarity index 92% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/codestart.yml rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/codestart.yml index ce5f7bca07656..c36bd8bd06640 100644 --- a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/codestart.yml +++ b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/codestart.yml @@ -3,7 +3,7 @@ ref: funqy-amazon-lambda type: code tags: - example - - compatibility-issues + - singleton-example language: base: shared-data: diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/payload.json b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/payload.json similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/payload.json rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/payload.json diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/src/main/java/org/acme/funqy/GreetingFunction.java b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/src/main/java/org/acme/funqy/GreetingFunction.java similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/src/main/java/org/acme/funqy/GreetingFunction.java rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/src/main/java/org/acme/funqy/GreetingFunction.java diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/src/main/java/org/acme/funqy/Person.java b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/src/main/java/org/acme/funqy/Person.java similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/src/main/java/org/acme/funqy/Person.java rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/src/main/java/org/acme/funqy/Person.java diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/src/native-test/java/org/acme/funqy/FunqyIT.java b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/src/native-test/java/org/acme/funqy/FunqyIT.java similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/src/native-test/java/org/acme/funqy/FunqyIT.java rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/src/native-test/java/org/acme/funqy/FunqyIT.java diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/src/native-test/java/resources/application.properties b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/src/native-test/java/resources/application.properties similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/src/native-test/java/resources/application.properties rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/src/native-test/java/resources/application.properties diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/src/test/java/org/acme/funqy/FunqyTest.java b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/src/test/java/org/acme/funqy/FunqyTest.java similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/src/test/java/org/acme/funqy/FunqyTest.java rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/src/test/java/org/acme/funqy/FunqyTest.java diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/src/test/resources/application.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/src/test/resources/application.yml similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-amazon-lambda-example/java/src/test/resources/application.yml rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-amazon-lambda-example/java/src/test/resources/application.yml diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/base/README.md b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/base/README.md similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/base/README.md rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/base/README.md diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/codestart.yml b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/codestart.yml similarity index 93% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/codestart.yml rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/codestart.yml index 5931413b4a2e6..d0a066f0ff215 100644 --- a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/codestart.yml +++ b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/codestart.yml @@ -3,7 +3,7 @@ ref: funqy-knative-events type: code tags: - example - - compatibility-issues + - singleton-example language: base: data: diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/java/src/main/java/org/acme/funqy/cloudevent/CloudEventGreeting.java b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/java/src/main/java/org/acme/funqy/cloudevent/CloudEventGreeting.java similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/java/src/main/java/org/acme/funqy/cloudevent/CloudEventGreeting.java rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/java/src/main/java/org/acme/funqy/cloudevent/CloudEventGreeting.java diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/java/src/main/java/org/acme/funqy/cloudevent/Person.java b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/java/src/main/java/org/acme/funqy/cloudevent/Person.java similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/java/src/main/java/org/acme/funqy/cloudevent/Person.java rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/java/src/main/java/org/acme/funqy/cloudevent/Person.java diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/java/src/main/k8s/funqy-service.tpl.qute.yaml b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/java/src/main/k8s/funqy-service.tpl.qute.yaml similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/java/src/main/k8s/funqy-service.tpl.qute.yaml rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/java/src/main/k8s/funqy-service.tpl.qute.yaml diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/java/src/main/k8s/funqy-trigger.tpl.qute.yaml b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/java/src/main/k8s/funqy-trigger.tpl.qute.yaml similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/java/src/main/k8s/funqy-trigger.tpl.qute.yaml rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/java/src/main/k8s/funqy-trigger.tpl.qute.yaml diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/java/src/native-test/java/org/acme/funqy/cloudevent/FunqyIT.java b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/java/src/native-test/java/org/acme/funqy/cloudevent/FunqyIT.java similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/java/src/native-test/java/org/acme/funqy/cloudevent/FunqyIT.java rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/java/src/native-test/java/org/acme/funqy/cloudevent/FunqyIT.java diff --git a/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/java/src/test/java/org/acme/funqy/cloudevent/FunqyTest.java b/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/java/src/test/java/org/acme/funqy/cloudevent/FunqyTest.java similarity index 100% rename from devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/advanced-examples/funqy-knative-events-example/java/src/test/java/org/acme/funqy/cloudevent/FunqyTest.java rename to devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/singleton-examples/funqy-knative-events-example/java/src/test/java/org/acme/funqy/cloudevent/FunqyTest.java diff --git a/docs/src/main/asciidoc/amazon-dynamodb.adoc b/docs/src/main/asciidoc/amazon-dynamodb.adoc index 52e24f7600958..abca766e671ea 100644 --- a/docs/src/main/asciidoc/amazon-dynamodb.adoc +++ b/docs/src/main/asciidoc/amazon-dynamodb.adoc @@ -105,7 +105,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=amazon-dynamodb-quickstart \ -DclassName="org.acme.dynamodb.FruitResource" \ -Dpath="/fruits" \ - -Dextensions="resteasy-jsonb,amazon-dynamodb,resteasy-mutiny" + -Dextensions="resteasy,resteasy-jsonb,amazon-dynamodb,resteasy-mutiny" cd amazon-dynamodb-quickstart ---- diff --git a/docs/src/main/asciidoc/amazon-kms.adoc b/docs/src/main/asciidoc/amazon-kms.adoc index 0dba85a11eabe..2ff860703ac2f 100644 --- a/docs/src/main/asciidoc/amazon-kms.adoc +++ b/docs/src/main/asciidoc/amazon-kms.adoc @@ -97,7 +97,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=amazon-kms-quickstart \ -DclassName="org.acme.kms.QuarkusKmsSyncResource" \ -Dpath="/sync" \ - -Dextensions="resteasy-jsonb,amazon-kms,resteasy-mutiny" + -Dextensions="resteasy,resteasy-jsonb,amazon-kms,resteasy-mutiny" cd amazon-kms-quickstart ---- diff --git a/docs/src/main/asciidoc/amazon-s3.adoc b/docs/src/main/asciidoc/amazon-s3.adoc index 6c7a69e1b4009..a53f7d2938ba8 100644 --- a/docs/src/main/asciidoc/amazon-s3.adoc +++ b/docs/src/main/asciidoc/amazon-s3.adoc @@ -86,7 +86,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=amazon-s3-quickstart \ -DclassName="org.acme.s3.S3SyncClientResource" \ -Dpath="/s3" \ - -Dextensions="resteasy-jsonb,amazon-s3" + -Dextensions="resteasy,resteasy-jsonb,amazon-s3" cd amazon-s3-quickstart ---- diff --git a/docs/src/main/asciidoc/amazon-ses.adoc b/docs/src/main/asciidoc/amazon-ses.adoc index d3a62a6064f2c..19de9d2056529 100644 --- a/docs/src/main/asciidoc/amazon-ses.adoc +++ b/docs/src/main/asciidoc/amazon-ses.adoc @@ -106,7 +106,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=amazon-ses-quickstart \ -DclassName="org.acme.ses.QuarkusSesSyncResource" \ -Dpath="/sync" \ - -Dextensions="resteasy-jsonb,amazon-ses,resteasy-mutiny" + -Dextensions="resteasy,resteasy-jsonb,amazon-ses,resteasy-mutiny" cd amazon-ses-quickstart ---- diff --git a/docs/src/main/asciidoc/amazon-sns.adoc b/docs/src/main/asciidoc/amazon-sns.adoc index 5f1e9e03bf37b..a94771120cfb2 100644 --- a/docs/src/main/asciidoc/amazon-sns.adoc +++ b/docs/src/main/asciidoc/amazon-sns.adoc @@ -94,7 +94,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=amazon-sns-quickstart \ -DclassName="org.acme.sns.QuarksCannonSyncResource" \ -Dpath="/sync-cannon" \ - -Dextensions="resteasy-jsonb,amazon-sns,resteasy-mutiny" + -Dextensions="resteasy,resteasy-jsonb,amazon-sns,resteasy-mutiny" cd amazon-sns-quickstart ---- diff --git a/docs/src/main/asciidoc/amazon-sqs.adoc b/docs/src/main/asciidoc/amazon-sqs.adoc index 89c21822304ae..7786a06071adf 100644 --- a/docs/src/main/asciidoc/amazon-sqs.adoc +++ b/docs/src/main/asciidoc/amazon-sqs.adoc @@ -95,7 +95,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=amazon-sqs-quickstart \ -DclassName="org.acme.sqs.QuarksCannonSyncResource" \ -Dpath="/sync-cannon" \ - -Dextensions="resteasy-jsonb,amazon-sqs,resteasy-mutiny" + -Dextensions="resteasy,resteasy-jsonb,amazon-sqs,resteasy-mutiny" cd amazon-sqs-quickstart ---- diff --git a/docs/src/main/asciidoc/building-my-first-extension.adoc b/docs/src/main/asciidoc/building-my-first-extension.adoc index 246423f826271..a593181827aa8 100644 --- a/docs/src/main/asciidoc/building-my-first-extension.adoc +++ b/docs/src/main/asciidoc/building-my-first-extension.adoc @@ -740,7 +740,7 @@ $mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=greeting-app \ -DprojectVersion=1.0-SNAPSHOT \ - -DclassName=HelloResource + -DnoExamples ---- `cd` into `greeting-app` and add the dependency on `quarkus-greeting` extension we created above. diff --git a/docs/src/main/asciidoc/cache.adoc b/docs/src/main/asciidoc/cache.adoc index 884f712e52914..fcd09e1c01877 100644 --- a/docs/src/main/asciidoc/cache.adoc +++ b/docs/src/main/asciidoc/cache.adoc @@ -49,7 +49,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=cache-quickstart \ -DclassName="org.acme.cache.WeatherForecastResource" \ -Dpath="/weather" \ - -Dextensions="cache,resteasy-jsonb" + -Dextensions="cache,resteasy,resteasy-jsonb" ---- This command generates the Maven project with a REST endpoint and imports the `cache` and `resteasy-jsonb` extensions. diff --git a/docs/src/main/asciidoc/centralized-log-management.adoc b/docs/src/main/asciidoc/centralized-log-management.adoc index ea235ab3a159c..b01c9e22a36f1 100644 --- a/docs/src/main/asciidoc/centralized-log-management.adoc +++ b/docs/src/main/asciidoc/centralized-log-management.adoc @@ -30,7 +30,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=gelf-logging \ -DclassName="org.acme.quickstart.GelfLoggingResource" \ -Dpath="/gelf-logging" \ - -Dextensions="logging-gelf" + -Dextensions="resteasty,logging-gelf" ---- If you already have your Quarkus project configured, you can add the `logging-gelf` extension diff --git a/docs/src/main/asciidoc/config.adoc b/docs/src/main/asciidoc/config.adoc index 226a5e27b7acf..fc136db40c313 100644 --- a/docs/src/main/asciidoc/config.adoc +++ b/docs/src/main/asciidoc/config.adoc @@ -39,6 +39,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=config-quickstart \ -DclassName="org.acme.config.GreetingResource" \ -Dpath="/greeting" + -Dextensions="resteasty" cd config-quickstart ---- diff --git a/docs/src/main/asciidoc/consul-config.adoc b/docs/src/main/asciidoc/consul-config.adoc index 09525166fd1fd..1df4642a06cd5 100644 --- a/docs/src/main/asciidoc/consul-config.adoc +++ b/docs/src/main/asciidoc/consul-config.adoc @@ -53,7 +53,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=consul-config-quickstart \ -DclassName="org.acme.consul.config.GreetingResource" \ -Dpath="/greeting" \ - -Dextensions="consul-config" + -Dextensions="resteasy,consul-config" cd consul-config-quickstart ---- diff --git a/docs/src/main/asciidoc/deploying-to-kubernetes.adoc b/docs/src/main/asciidoc/deploying-to-kubernetes.adoc index 93e14ef961f88..219ee142e4062 100644 --- a/docs/src/main/asciidoc/deploying-to-kubernetes.adoc +++ b/docs/src/main/asciidoc/deploying-to-kubernetes.adoc @@ -34,7 +34,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=kubernetes-quickstart \ -DclassName="org.acme.rest.GreetingResource" \ -Dpath="/greeting" \ - -Dextensions="kubernetes, jib" + -Dextensions="resteasy,kubernetes,jib" cd kubernetes-quickstart ---- diff --git a/docs/src/main/asciidoc/deploying-to-openshift.adoc b/docs/src/main/asciidoc/deploying-to-openshift.adoc index bfd18bbaba440..84f2f64a25603 100644 --- a/docs/src/main/asciidoc/deploying-to-openshift.adoc +++ b/docs/src/main/asciidoc/deploying-to-openshift.adoc @@ -32,7 +32,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=openshift-quickstart \ -DclassName="org.acme.rest.GreetingResource" \ -Dpath="/greeting" \ - -Dextensions="openshift" + -Dextensions="resteasy,openshift" cd openshift-quickstart ---- diff --git a/docs/src/main/asciidoc/elasticsearch.adoc b/docs/src/main/asciidoc/elasticsearch.adoc index 0fa996c2f6f40..3615ffc3b734e 100644 --- a/docs/src/main/asciidoc/elasticsearch.adoc +++ b/docs/src/main/asciidoc/elasticsearch.adoc @@ -56,7 +56,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=elasticsearch-quickstart \ -DclassName="org.acme.elasticsearch.FruitResource" \ -Dpath="/fruits" \ - -Dextensions="resteasy-jackson,elasticsearch-rest-client" + -Dextensions="resteasy,resteasy-jackson,elasticsearch-rest-client" cd elasticsearch-quickstart ---- diff --git a/docs/src/main/asciidoc/funqy-gcp-functions.adoc b/docs/src/main/asciidoc/funqy-gcp-functions.adoc index 2ea9ae8eeb342..75f048d5408d6 100644 --- a/docs/src/main/asciidoc/funqy-gcp-functions.adoc +++ b/docs/src/main/asciidoc/funqy-gcp-functions.adoc @@ -58,7 +58,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=funqy-google-cloud-functions \ -DclassName="org.acme.quickstart.GreetingResource" \ -Dpath="/hello" \ - -Dextensions="funqy-google-cloud-functions" + -Dextensions="resteasy,funqy-google-cloud-functions" ---- Now, let's remove what's not needed inside the generated application: diff --git a/docs/src/main/asciidoc/gcp-functions-http.adoc b/docs/src/main/asciidoc/gcp-functions-http.adoc index c47d7fe60ffd5..7bdbe90270ec4 100644 --- a/docs/src/main/asciidoc/gcp-functions-http.adoc +++ b/docs/src/main/asciidoc/gcp-functions-http.adoc @@ -51,7 +51,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=google-cloud-functions-http \ -DclassName="org.acme.quickstart.GreetingResource" \ -Dpath="/hello" \ - -Dextensions="google-cloud-functions-http,resteasy-json,undertow,vertx-web,funqy-http" + -Dextensions="resteasy,google-cloud-functions-http,resteasy-json,undertow,vertx-web,funqy-http" ---- == Login to Google Cloud diff --git a/docs/src/main/asciidoc/gcp-functions.adoc b/docs/src/main/asciidoc/gcp-functions.adoc index 70678112f6cbe..86ee125271ac5 100644 --- a/docs/src/main/asciidoc/gcp-functions.adoc +++ b/docs/src/main/asciidoc/gcp-functions.adoc @@ -49,7 +49,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=google-cloud-functions \ -DclassName="org.acme.quickstart.GreetingResource" \ -Dpath="/hello" \ - -Dextensions="google-cloud-functions" + -Dextensions="resteasy,google-cloud-functions" ---- Now, let's remove what's not needed inside the generated application: diff --git a/docs/src/main/asciidoc/getting-started-reactive.adoc b/docs/src/main/asciidoc/getting-started-reactive.adoc index a4aee183aad28..3b69a412f802f 100644 --- a/docs/src/main/asciidoc/getting-started-reactive.adoc +++ b/docs/src/main/asciidoc/getting-started-reactive.adoc @@ -171,7 +171,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=getting-started-reactive \ -DclassName="org.acme.quickstart.ReactiveGreetingResource" \ -Dpath="/hello" \ - -Dextensions="resteasy-mutiny, resteasy-jsonb" + -Dextensions="resteasy,resteasy-mutiny,resteasy-jsonb" cd getting-started-reactive ---- @@ -181,14 +181,14 @@ For Windows users [source,shell,subs=attributes+] ---- -mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create -DprojectGroupId=org.acme -DprojectArtifactId=getting-started-reactive -DclassName="org.acme.quickstart.ReactiveGreetingResource" -Dpath="/hello" -Dextensions="resteasy-mutiny,resteasy-jsonb" +mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create -DprojectGroupId=org.acme -DprojectArtifactId=getting-started-reactive -DclassName="org.acme.quickstart.ReactiveGreetingResource" -Dpath="/hello" -Dextensions="resteasy,resteasy-mutiny,resteasy-jsonb" ---- - If using Powershell, wrap `-D` parameters in double quotes [source,shell,subs=attributes+] ---- -mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create "-DprojectGroupId=org.acme" "-DprojectArtifactId=getting-started-reactive" "-DclassName=org.acme.quickstart.ReactiveGreetingResource" "-Dpath=/hello" "-Dextensions=resteasy-mutiny,resteasy-jsonb" +mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create "-DprojectGroupId=org.acme" "-DprojectArtifactId=getting-started-reactive" "-DclassName=org.acme.quickstart.ReactiveGreetingResource" "-Dpath=/hello" "-Dextensions=resteasy,resteasy-mutiny,resteasy-jsonb" ---- It generates the following in `./getting-started-reactive`: @@ -407,7 +407,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=getting-started-reactive-crud \ -DclassName="org.acme.reactive.crud.FruitResource" \ -Dpath="/fruits" \ - -Dextensions="resteasy-mutiny, resteasy-jsonb, reactive-pg-client" + -Dextensions="resteasy,resteasy-mutiny,resteasy-jsonb,reactive-pg-client" cd getting-started-reactive-crud ---- diff --git a/docs/src/main/asciidoc/getting-started.adoc b/docs/src/main/asciidoc/getting-started.adoc index 95f41d366d594..2551e501c4fe7 100644 --- a/docs/src/main/asciidoc/getting-started.adoc +++ b/docs/src/main/asciidoc/getting-started.adoc @@ -81,7 +81,8 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=getting-started \ -DclassName="org.acme.getting.started.GreetingResource" \ - -Dpath="/hello" + -Dpath="/hello" \ + -Dextensions="resteasy" cd getting-started ---- @@ -91,14 +92,14 @@ For Windows users [source,shell,subs=attributes+] ---- -mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create -DprojectGroupId=org.acme -DprojectArtifactId=getting-started -DclassName="org.acme.getting.started.GreetingResource" -Dpath="/hello" +mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create -DprojectGroupId=org.acme -DprojectArtifactId=getting-started -DclassName="org.acme.getting.started.GreetingResource" -Dpath="/hello" -Dextensions="resteasy" ---- - If using Powershell , wrap `-D` parameters in double quotes [source,shell,subs=attributes+] ---- -mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create "-DprojectGroupId=org.acme" "-DprojectArtifactId=getting-started" "-DclassName=org.acme.getting.started.GreetingResource" "-Dpath=/hello" +mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create "-DprojectGroupId=org.acme" "-DprojectArtifactId=getting-started" "-DclassName=org.acme.getting.started.GreetingResource" "-Dpath=/hello" "-Dextensions=resteasy" ---- It generates the following in `./getting-started`: @@ -107,7 +108,7 @@ It generates the following in `./getting-started`: * an `org.acme.getting.started.GreetingResource` resource exposed on `/hello` * an associated unit test * a landing page that is accessible on `http://localhost:8080` after starting the application -* example `Dockerfile` files for both `native` and `jvm` modes in `src/main/docker` +* example `Dockerfile` files for `native`, `jvm` and `fast-jar` modes in `src/main/docker` * the application configuration file Once generated, look at the `pom.xml`. diff --git a/docs/src/main/asciidoc/gradle-tooling.adoc b/docs/src/main/asciidoc/gradle-tooling.adoc index da246adcf7239..434df36119944 100644 --- a/docs/src/main/asciidoc/gradle-tooling.adoc +++ b/docs/src/main/asciidoc/gradle-tooling.adoc @@ -24,7 +24,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=my-artifactId \ -DprojectVersion=my-version \ -DclassName="org.my.group.MyResource" \ - -Dextensions="resteasy-jsonb" \ + -Dextensions="resteasy,resteasy-jsonb" \ -DbuildTool=gradle ---- diff --git a/docs/src/main/asciidoc/hibernate-search-elasticsearch.adoc b/docs/src/main/asciidoc/hibernate-search-elasticsearch.adoc index 3c77c52090b31..de709d6d2c689 100644 --- a/docs/src/main/asciidoc/hibernate-search-elasticsearch.adoc +++ b/docs/src/main/asciidoc/hibernate-search-elasticsearch.adoc @@ -62,7 +62,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=hibernate-search-elasticsearch-quickstart \ -DclassName="org.acme.hibernate.search.elasticsearch.LibraryResource" \ -Dpath="/library" \ - -Dextensions="hibernate-orm-panache, hibernate-search-elasticsearch, resteasy-jsonb, jdbc-postgresql" + -Dextensions="resteasy,hibernate-orm-panachehibernate-search-elasticsearch,resteasy-jsonb,jdbc-postgresql" cd hibernate-search-elasticsearch-quickstart ---- diff --git a/docs/src/main/asciidoc/kafka-streams.adoc b/docs/src/main/asciidoc/kafka-streams.adoc index 543faaaf432ee..fe5f21c34cabd 100644 --- a/docs/src/main/asciidoc/kafka-streams.adoc +++ b/docs/src/main/asciidoc/kafka-streams.adoc @@ -246,7 +246,7 @@ Create another project like so: mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=kafka-streams-quickstart-aggregator \ - -Dextensions="kafka-streams,resteasy-jsonb" \ + -Dextensions="resteasy,kafka-streams,resteasy-jsonb" \ && mv kafka-streams-quickstart-aggregator aggregator ---- diff --git a/docs/src/main/asciidoc/kotlin.adoc b/docs/src/main/asciidoc/kotlin.adoc index 2918d0eb8f735..e58cf1741c103 100644 --- a/docs/src/main/asciidoc/kotlin.adoc +++ b/docs/src/main/asciidoc/kotlin.adoc @@ -36,7 +36,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=rest-kotlin-quickstart \ -DclassName="org.acme.rest.GreetingResource" \ -Dpath="/greeting" \ - -Dextensions="kotlin,resteasy-jsonb" + -Dextensions="resteasy,kotlin,resteasy-jsonb" cd rest-kotlin-quickstart ---- diff --git a/docs/src/main/asciidoc/lifecycle.adoc b/docs/src/main/asciidoc/lifecycle.adoc index 9244a450c10e8..5ee0a2cfa9737 100644 --- a/docs/src/main/asciidoc/lifecycle.adoc +++ b/docs/src/main/asciidoc/lifecycle.adoc @@ -43,7 +43,8 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=lifecycle-quickstart \ -DclassName="org.acme.lifecycle.GreetingResource" \ - -Dpath="/hello" + -Dpath="/hello" \ + -Dextensions="resteasy" cd lifecycle-quickstart ---- diff --git a/docs/src/main/asciidoc/maven-tooling.adoc b/docs/src/main/asciidoc/maven-tooling.adoc index 225d8aaae94bf..21e1e150d9953 100644 --- a/docs/src/main/asciidoc/maven-tooling.adoc +++ b/docs/src/main/asciidoc/maven-tooling.adoc @@ -18,7 +18,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=my-groupId \ -DprojectArtifactId=my-artifactId \ -DprojectVersion=my-version \ - -DclassName="org.my.group.MyResource" + -DnoExamples ---- NOTE: If you just launch `mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create` the Maven plugin asks diff --git a/docs/src/main/asciidoc/microprofile-fault-tolerance.adoc b/docs/src/main/asciidoc/microprofile-fault-tolerance.adoc index ee823f0e992dc..2607f6d151973 100644 --- a/docs/src/main/asciidoc/microprofile-fault-tolerance.adoc +++ b/docs/src/main/asciidoc/microprofile-fault-tolerance.adoc @@ -51,7 +51,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=microprofile-fault-tolerance-quickstart \ -DclassName="org.acme.microprofile.faulttolerance.CoffeeResource" \ -Dpath="/coffee" \ - -Dextensions="smallrye-fault-tolerance, resteasy-jsonb" + -Dextensions="resteasy,smallrye-fault-tolerance,resteasy-jsonb" cd microprofile-fault-tolerance-quickstart ---- diff --git a/docs/src/main/asciidoc/microprofile-graphql.adoc b/docs/src/main/asciidoc/microprofile-graphql.adoc index 37d35ebd95707..89cc0db5d20c3 100644 --- a/docs/src/main/asciidoc/microprofile-graphql.adoc +++ b/docs/src/main/asciidoc/microprofile-graphql.adoc @@ -71,7 +71,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=microprofile-graphql-quickstart \ -DclassName="org.acme.microprofile.graphql.FilmResource" \ - -Dextensions="graphql" + -Dextensions="resteasy,graphql" cd microprofile-graphql-quickstart ---- diff --git a/docs/src/main/asciidoc/mongodb-panache.adoc b/docs/src/main/asciidoc/mongodb-panache.adoc index f8a1a82cb0b04..eae3ba2d56245 100644 --- a/docs/src/main/asciidoc/mongodb-panache.adoc +++ b/docs/src/main/asciidoc/mongodb-panache.adoc @@ -70,7 +70,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=mongodb-panache-quickstart \ -DclassName="org.acme.mongodb.panache.PersonResource" \ -Dpath="/persons" \ - -Dextensions="resteasy-jsonb,mongodb-panache" + -Dextensions="resteasy,resteasy-jsonb,mongodb-panache" cd mongodb-panache-quickstart ---- diff --git a/docs/src/main/asciidoc/mongodb.adoc b/docs/src/main/asciidoc/mongodb.adoc index 103f59af08b68..1c88a0b8f1275 100644 --- a/docs/src/main/asciidoc/mongodb.adoc +++ b/docs/src/main/asciidoc/mongodb.adoc @@ -48,7 +48,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=mongodb-quickstart \ -DclassName="org.acme.mongodb.FruitResource" \ -Dpath="/fruits" \ - -Dextensions="resteasy-jsonb,mongodb-client,resteasy-mutiny,context-propagation" + -Dextensions="resteasy,resteasy-jsonb,mongodb-client,resteasy-mutiny,context-propagation" cd mongodb-quickstart ---- diff --git a/docs/src/main/asciidoc/neo4j.adoc b/docs/src/main/asciidoc/neo4j.adoc index 1f7873f2d6176..300b3b14db7db 100644 --- a/docs/src/main/asciidoc/neo4j.adoc +++ b/docs/src/main/asciidoc/neo4j.adoc @@ -127,7 +127,7 @@ First, we need a new project. Create a new project with the following command: mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=neo4j-quickstart \ - -Dextensions="neo4j,resteasy-jsonb" + -Dextensions="resteasy,neo4j,resteasy-jsonb" cd neo4j-quickstart ---- diff --git a/docs/src/main/asciidoc/openapi-swaggerui.adoc b/docs/src/main/asciidoc/openapi-swaggerui.adoc index dd2ea45bc7551..6860bc3d462b3 100644 --- a/docs/src/main/asciidoc/openapi-swaggerui.adoc +++ b/docs/src/main/asciidoc/openapi-swaggerui.adoc @@ -44,7 +44,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=openapi-swaggerui-quickstart \ -DclassName="org.acme.openapi.swaggerui.FruitResource" \ -Dpath="/fruits" \ - -Dextensions="resteasy-jsonb" + -Dextensions="resteasy,resteasy-jsonb" cd openapi-swaggerui-quickstart ---- diff --git a/docs/src/main/asciidoc/opentracing.adoc b/docs/src/main/asciidoc/opentracing.adoc index da30a960035ef..d19c34394dbe6 100644 --- a/docs/src/main/asciidoc/opentracing.adoc +++ b/docs/src/main/asciidoc/opentracing.adoc @@ -46,7 +46,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=opentracing-quickstart \ -DclassName="org.acme.opentracing.TracedResource" \ -Dpath="/hello" \ - -Dextensions="quarkus-smallrye-opentracing" + -Dextensions="resteasy,quarkus-smallrye-opentracing" cd opentracing-quickstart ---- diff --git a/docs/src/main/asciidoc/optaplanner.adoc b/docs/src/main/asciidoc/optaplanner.adoc index 22f600404956c..2e7b4f5bcc45e 100644 --- a/docs/src/main/asciidoc/optaplanner.adoc +++ b/docs/src/main/asciidoc/optaplanner.adoc @@ -70,7 +70,7 @@ Alternatively, generate it from the command line with Maven: mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=optaplanner-quickstart \ - -Dextensions="resteasy, resteasy-jackson, optaplanner-quarkus, optaplanner-quarkus-jackson" + -Dextensions="resteasy,resteasy-jackson,optaplanner-quarkus,optaplanner-quarkus-jackson" cd optaplanner-quickstart ---- diff --git a/docs/src/main/asciidoc/quartz.adoc b/docs/src/main/asciidoc/quartz.adoc index 91e9240274758..4cbcd38fe5441 100644 --- a/docs/src/main/asciidoc/quartz.adoc +++ b/docs/src/main/asciidoc/quartz.adoc @@ -49,7 +49,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=quartz-quickstart \ -DclassName="org.acme.quartz.TaskResource" \ -Dpath="/tasks" \ - -Dextensions="quartz, hibernate-orm-panache, flyway, resteasy-jsonb, jdbc-postgresql" + -Dextensions="resteasy,quartz,hibernate-orm-panache,flyway,resteasy-jsonb,jdbc-postgresql" cd quartz-quickstart ---- diff --git a/docs/src/main/asciidoc/reactive-event-bus.adoc b/docs/src/main/asciidoc/reactive-event-bus.adoc index d21b8e72fbcfc..87c06d44afd74 100644 --- a/docs/src/main/asciidoc/reactive-event-bus.adoc +++ b/docs/src/main/asciidoc/reactive-event-bus.adoc @@ -30,7 +30,7 @@ If you are creating a new project, set the `extensions` parameter are follows: mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=vertx-quickstart \ - -Dextensions="vertx,resteasy-mutiny" + -Dextensions="resteasy,vertx,resteasy-mutiny" cd vertx-quickstart ---- @@ -267,7 +267,7 @@ First create a new project using: mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=vertx-http-quickstart \ - -Dextensions="vertx" + -Dextensions="resteasy,vertx" cd vertx-http-quickstart ---- diff --git a/docs/src/main/asciidoc/redis.adoc b/docs/src/main/asciidoc/redis.adoc index 6af97023ab759..59d8282651409 100644 --- a/docs/src/main/asciidoc/redis.adoc +++ b/docs/src/main/asciidoc/redis.adoc @@ -48,7 +48,7 @@ First, we need a new project. Create a new project with the following command: mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=redis-quickstart \ - -Dextensions="redis-client, resteasy-jsonb, resteasy-mutiny" + -Dextensions="resteasy,redis-client,resteasy-jsonb,resteasy-mutiny" cd redis-quickstart ---- diff --git a/docs/src/main/asciidoc/rest-client-multipart.adoc b/docs/src/main/asciidoc/rest-client-multipart.adoc index 1d12856d9db35..ce536c49d91ab 100644 --- a/docs/src/main/asciidoc/rest-client-multipart.adoc +++ b/docs/src/main/asciidoc/rest-client-multipart.adoc @@ -42,7 +42,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=rest-client-multipart-quickstart \ -DclassName="org.acme.rest.client.multipart.MultipartClientResource" \ -Dpath="/client" \ - -Dextensions="rest-client, resteasy, resteasy-multipart" + -Dextensions="rest-client,resteasy,resteasy-multipart" cd rest-client-multipart-quickstart ---- diff --git a/docs/src/main/asciidoc/rest-client.adoc b/docs/src/main/asciidoc/rest-client.adoc index fe59c8e1ad48b..d02a4d9f11305 100644 --- a/docs/src/main/asciidoc/rest-client.adoc +++ b/docs/src/main/asciidoc/rest-client.adoc @@ -41,7 +41,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=rest-client-quickstart \ -DclassName="org.acme.rest.client.CountriesResource" \ -Dpath="/country" \ - -Dextensions="rest-client, resteasy-jsonb" + -Dextensions="resteasy,rest-client,resteasy-jsonb" cd rest-client-quickstart ---- diff --git a/docs/src/main/asciidoc/rest-json.adoc b/docs/src/main/asciidoc/rest-json.adoc index d2cd3e998ea34..25751fc5276e2 100644 --- a/docs/src/main/asciidoc/rest-json.adoc +++ b/docs/src/main/asciidoc/rest-json.adoc @@ -48,7 +48,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=rest-json-quickstart \ -DclassName="org.acme.rest.json.FruitResource" \ -Dpath="/fruits" \ - -Dextensions="resteasy-jsonb" + -Dextensions="resteasy,resteasy-jsonb" cd rest-json-quickstart ---- @@ -72,7 +72,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=rest-json-quickstart \ -DclassName="org.acme.rest.json.FruitResource" \ -Dpath="/fruits" \ - -Dextensions="resteasy-jackson" + -Dextensions="resteasy,resteasy-jackson" cd rest-json-quickstart ---- diff --git a/docs/src/main/asciidoc/scheduler.adoc b/docs/src/main/asciidoc/scheduler.adoc index 9fab6275c102f..b2010d8b5666a 100644 --- a/docs/src/main/asciidoc/scheduler.adoc +++ b/docs/src/main/asciidoc/scheduler.adoc @@ -48,7 +48,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=scheduler-quickstart \ -DclassName="org.acme.scheduler.CountResource" \ -Dpath="/count" \ - -Dextensions="scheduler" + -Dextensions="resteasy,scheduler" cd scheduler-quickstart ---- diff --git a/docs/src/main/asciidoc/security-jdbc.adoc b/docs/src/main/asciidoc/security-jdbc.adoc index 4a5b37ca9df9b..b0cf272acbf69 100644 --- a/docs/src/main/asciidoc/security-jdbc.adoc +++ b/docs/src/main/asciidoc/security-jdbc.adoc @@ -49,7 +49,8 @@ First, we need a new project. Create a new project with the following command: mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=security-jdbc-quickstart \ - -Dextensions="elytron-security-jdbc, jdbc-postgresql, resteasy" + -Dextensions="elytron-security-jdbc,jdbc-postgresql,resteasy" \ + -DnoExamples cd security-jdbc-quickstart ---- diff --git a/docs/src/main/asciidoc/security-jpa.adoc b/docs/src/main/asciidoc/security-jpa.adoc index 10fba0fcc1bb3..1d7d73c818181 100644 --- a/docs/src/main/asciidoc/security-jpa.adoc +++ b/docs/src/main/asciidoc/security-jpa.adoc @@ -50,7 +50,7 @@ First, we need a new project. Create a new project with the following command: mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=security-jpa-quickstart \ - -Dextensions="security-jpa, jdbc-postgresql, resteasy, hibernate-orm-panache" + -Dextensions="security-jpa,jdbc-postgresql,resteasy,hibernate-orm-panache" cd security-jpa-quickstart ---- diff --git a/docs/src/main/asciidoc/security-jwt.adoc b/docs/src/main/asciidoc/security-jwt.adoc index 06eabaa6b3b04..b9f3767a6e88e 100644 --- a/docs/src/main/asciidoc/security-jwt.adoc +++ b/docs/src/main/asciidoc/security-jwt.adoc @@ -34,7 +34,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=security-jwt-quickstart \ -DclassName="org.acme.security.jwt.TokenSecuredResource" \ -Dpath="/secured" \ - -Dextensions="resteasy-jsonb, jwt" + -Dextensions="resteasy,resteasy-jsonb,jwt" cd security-jwt-quickstart ---- diff --git a/docs/src/main/asciidoc/security-keycloak-authorization.adoc b/docs/src/main/asciidoc/security-keycloak-authorization.adoc index d09a0710c312f..e39196d888585 100644 --- a/docs/src/main/asciidoc/security-keycloak-authorization.adoc +++ b/docs/src/main/asciidoc/security-keycloak-authorization.adoc @@ -73,7 +73,7 @@ Create a new project with the following command: mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=security-keycloak-authorization-quickstart \ - -Dextensions="oidc, keycloak-authorization, resteasy-jsonb" + -Dextensions="resteasy,oidc,keycloak-authorization,resteasy-jsonb" cd security-keycloak-authorization-quickstart ---- diff --git a/docs/src/main/asciidoc/security-ldap.adoc b/docs/src/main/asciidoc/security-ldap.adoc index ade36f17dd895..a974a8827ec7c 100644 --- a/docs/src/main/asciidoc/security-ldap.adoc +++ b/docs/src/main/asciidoc/security-ldap.adoc @@ -49,7 +49,7 @@ First, we need a new project. Create a new project with the following command: mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=security-ldap-quickstart \ - -Dextensions="elytron-security-ldap, resteasy" + -Dextensions="elytron-security-ldap,resteasy" cd security-ldap-quickstart ---- diff --git a/docs/src/main/asciidoc/security-oauth2.adoc b/docs/src/main/asciidoc/security-oauth2.adoc index abc74d71ab551..d0c99e8d09c16 100644 --- a/docs/src/main/asciidoc/security-oauth2.adoc +++ b/docs/src/main/asciidoc/security-oauth2.adoc @@ -42,7 +42,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=security-oauth2-quickstart \ -DclassName="org.acme.security.oauth2.TokenSecuredResource" \ -Dpath="/secured" \ - -Dextensions="resteasy-jsonb, security-oauth2" + -Dextensions="resteasy,resteasy-jsonb,security-oauth2" cd security-oauth2-quickstart ---- diff --git a/docs/src/main/asciidoc/security-openid-connect-multitenancy.adoc b/docs/src/main/asciidoc/security-openid-connect-multitenancy.adoc index 86d2e37364b11..fe8b917354bf1 100644 --- a/docs/src/main/asciidoc/security-openid-connect-multitenancy.adoc +++ b/docs/src/main/asciidoc/security-openid-connect-multitenancy.adoc @@ -53,7 +53,7 @@ First, we need a new project. Create a new project with the following command: mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=security-openid-connect-multi-tenancy \ - -Dextensions="oidc, resteasy-jsonb" + -Dextensions="resteasy,oidc,resteasy-jsonb" cd security-openid-connect-multi-tenancy ---- diff --git a/docs/src/main/asciidoc/security-openid-connect.adoc b/docs/src/main/asciidoc/security-openid-connect.adoc index 3717c07de8f48..51e4563a297a9 100644 --- a/docs/src/main/asciidoc/security-openid-connect.adoc +++ b/docs/src/main/asciidoc/security-openid-connect.adoc @@ -62,7 +62,7 @@ First, we need a new project. Create a new project with the following command: mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectGroupId=org.acme \ -DprojectArtifactId=security-openid-connect-quickstart \ - -Dextensions="oidc, resteasy-jsonb" + -Dextensions="resteasy,oidc,resteasy-jsonb" cd security-openid-connect-quickstart ---- diff --git a/docs/src/main/asciidoc/spring-boot-properties.adoc b/docs/src/main/asciidoc/spring-boot-properties.adoc index 2e224ab68450e..6f1e2bf259e40 100644 --- a/docs/src/main/asciidoc/spring-boot-properties.adoc +++ b/docs/src/main/asciidoc/spring-boot-properties.adoc @@ -42,7 +42,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=spring-boot-properties-quickstart \ -DclassName="org.acme.spring.boot.properties.GreetingResource" \ -Dpath="/greeting" \ - -Dextensions="spring-boot-properties" + -Dextensions="resteasy,spring-boot-properties" cd spring-boot-properties-quickstart ---- diff --git a/docs/src/main/asciidoc/spring-cache.adoc b/docs/src/main/asciidoc/spring-cache.adoc index bbe0ea000e8bc..23e7469f864fd 100644 --- a/docs/src/main/asciidoc/spring-cache.adoc +++ b/docs/src/main/asciidoc/spring-cache.adoc @@ -36,7 +36,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=spring-cache-quickstart \ -DclassName="org.acme.spring.cache.GreeterResource" \ -Dpath="/greeting" \ - -Dextensions="spring-di,spring-cache" + -Dextensions="resteasy,spring-di,spring-cache" cd spring-cache-quickstart ---- diff --git a/docs/src/main/asciidoc/spring-cloud-config-client.adoc b/docs/src/main/asciidoc/spring-cloud-config-client.adoc index 1a27ea32046b8..5b7c0741a9dcb 100644 --- a/docs/src/main/asciidoc/spring-cloud-config-client.adoc +++ b/docs/src/main/asciidoc/spring-cloud-config-client.adoc @@ -42,7 +42,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=spring-cloud-config-quickstart \ -DclassName="org.acme.spring.cloud.config.client.GreetingResource" \ -Dpath="/greeting" \ - -Dextensions="spring-cloud-config-client" + -Dextensions="resteasy,spring-cloud-config-client" cd spring-cloud-config-quickstart ---- diff --git a/docs/src/main/asciidoc/spring-data-jpa.adoc b/docs/src/main/asciidoc/spring-data-jpa.adoc index 54d4aadfda32e..68c2411bb95ee 100644 --- a/docs/src/main/asciidoc/spring-data-jpa.adoc +++ b/docs/src/main/asciidoc/spring-data-jpa.adoc @@ -42,7 +42,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=spring-data-jpa-quickstart \ -DclassName="org.acme.spring.data.jpa.FruitResource" \ -Dpath="/greeting" \ - -Dextensions="spring-data-jpa,resteasy-jsonb,quarkus-jdbc-postgresql" + -Dextensions="resteasy,spring-data-jpa,resteasy-jsonb,quarkus-jdbc-postgresql" cd spring-data-jpa-quickstart ---- diff --git a/docs/src/main/asciidoc/spring-di.adoc b/docs/src/main/asciidoc/spring-di.adoc index 03335f70a9e09..6b7338a62d171 100644 --- a/docs/src/main/asciidoc/spring-di.adoc +++ b/docs/src/main/asciidoc/spring-di.adoc @@ -44,7 +44,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=spring-di-quickstart \ -DclassName="org.acme.spring.di.GreeterResource" \ -Dpath="/greeting" \ - -Dextensions="spring-di" + -Dextensions="resteasy,spring-di" cd spring-di-quickstart ---- diff --git a/docs/src/main/asciidoc/spring-scheduled.adoc b/docs/src/main/asciidoc/spring-scheduled.adoc index f8255d9560d2a..45649e66ecc26 100644 --- a/docs/src/main/asciidoc/spring-scheduled.adoc +++ b/docs/src/main/asciidoc/spring-scheduled.adoc @@ -45,7 +45,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=spring-scheduler-quickstart \ -DclassName="org.acme.spring.scheduler.CountResource" \ -Dpath="/count" \ - -Dextensions="spring-scheduled" + -Dextensions="resteasy,spring-scheduled" cd spring-scheduler-quickstart ---- diff --git a/docs/src/main/asciidoc/spring-security.adoc b/docs/src/main/asciidoc/spring-security.adoc index 9a533d1bc6a44..e00e38798abee 100644 --- a/docs/src/main/asciidoc/spring-security.adoc +++ b/docs/src/main/asciidoc/spring-security.adoc @@ -45,7 +45,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=spring-security-quickstart \ -DclassName="org.acme.spring.security.GreetingController" \ -Dpath="/greeting" \ - -Dextensions="spring-web, spring-security, quarkus-elytron-security-properties-file" + -Dextensions="resteasy,spring-web,spring-security,quarkus-elytron-security-properties-file" cd spring-security-quickstart ---- diff --git a/docs/src/main/asciidoc/spring-web.adoc b/docs/src/main/asciidoc/spring-web.adoc index c0933cb00c49f..c30b4b06746d5 100644 --- a/docs/src/main/asciidoc/spring-web.adoc +++ b/docs/src/main/asciidoc/spring-web.adoc @@ -44,7 +44,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=spring-web-quickstart \ -DclassName="org.acme.spring.web.GreetingController" \ -Dpath="/greeting" \ - -Dextensions="spring-web" + -Dextensions="resteasy,spring-web" cd spring-web-quickstart ---- diff --git a/docs/src/main/asciidoc/validation.adoc b/docs/src/main/asciidoc/validation.adoc index 54a5fbcce5373..d6fb8ddff6330 100644 --- a/docs/src/main/asciidoc/validation.adoc +++ b/docs/src/main/asciidoc/validation.adoc @@ -49,7 +49,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=validation-quickstart \ -DclassName="org.acme.validation.BookResource" \ -Dpath="/books" \ - -Dextensions="resteasy-jsonb, hibernate-validator" + -Dextensions="resteasy,resteasy-jsonb,hibernate-validator" cd validation-quickstart ---- diff --git a/docs/src/main/asciidoc/vault-transit.adoc b/docs/src/main/asciidoc/vault-transit.adoc index 4f73b7a343bcd..ea5d5ef567cdf 100644 --- a/docs/src/main/asciidoc/vault-transit.adoc +++ b/docs/src/main/asciidoc/vault-transit.adoc @@ -151,7 +151,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=vault-transit-quickstart \ -DclassName="org.acme.quickstart.GreetingResource" \ -Dpath="/hello" \ - -Dextensions="vault,resteasy-jsonb" + -Dextensions="resteasy,vault,resteasy-jsonb" cd vault-transit-quickstart ---- diff --git a/docs/src/main/asciidoc/vault.adoc b/docs/src/main/asciidoc/vault.adoc index ef2863bc1da07..3d3d7b251f26d 100644 --- a/docs/src/main/asciidoc/vault.adoc +++ b/docs/src/main/asciidoc/vault.adoc @@ -241,7 +241,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=vault-quickstart \ -DclassName="org.acme.quickstart.GreetingResource" \ -Dpath="/hello" \ - -Dextensions="vault" + -Dextensions="resteasy,vault" cd vault-quickstart ---- diff --git a/docs/src/main/asciidoc/writing-extensions.adoc b/docs/src/main/asciidoc/writing-extensions.adoc index 39efbe5839a9f..25ff47db582ce 100644 --- a/docs/src/main/asciidoc/writing-extensions.adoc +++ b/docs/src/main/asciidoc/writing-extensions.adoc @@ -2137,7 +2137,7 @@ mvn io.quarkus:quarkus-maven-plugin:{quarkus-version}:create \ -DprojectArtifactId=rest-json \ -DclassName="org.acme.rest.json.FruitResource" \ -Dpath="/fruits" \ - -Dextensions="resteasy-jsonb" + -Dextensions="resteasy,resteasy-jsonb" cd rest-json ---- diff --git a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/codestarts/QuarkusCodestartCatalog.java b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/codestarts/QuarkusCodestartCatalog.java index 245c068f71d1b..8502175d82b56 100644 --- a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/codestarts/QuarkusCodestartCatalog.java +++ b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/codestarts/QuarkusCodestartCatalog.java @@ -23,7 +23,7 @@ public final class QuarkusCodestartCatalog extends GenericCodestartCatalog select(QuarkusCodestartProjectInput projectInput + "' yet)"); } } + + // check compatibility issues + final long examplesWithCompatIssues = projectCodestarts.stream() + .filter(QuarkusCodestartCatalog::isExample) + .filter(c -> c.containsTag(Tag.SINGLETON_EXAMPLE.getKey())) + .count(); + + if (examplesWithCompatIssues == 1) { + // remove other examples + projectCodestarts.removeIf(c -> isExample(c) && !c.containsTag(Tag.SINGLETON_EXAMPLE.getKey())); + } else if (examplesWithCompatIssues > 1) { + throw new CodestartException( + "Only one extension with singleton example can be selected at a time (you can always use 'noExamples' if needed)"); + } + return projectCodestarts; } diff --git a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/codestarts/QuarkusCodestartProjectInputBuilder.java b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/codestarts/QuarkusCodestartProjectInputBuilder.java index 1f255e17378cc..baf004517d244 100644 --- a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/codestarts/QuarkusCodestartProjectInputBuilder.java +++ b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/codestarts/QuarkusCodestartProjectInputBuilder.java @@ -15,6 +15,10 @@ public class QuarkusCodestartProjectInputBuilder extends CodestartProjectInputBu boolean noBuildToolWrapper; BuildTool buildTool = BuildTool.MAVEN; + QuarkusCodestartProjectInputBuilder() { + super(); + } + public QuarkusCodestartProjectInputBuilder addExtensions(Collection extensions) { super.addDependencies(extensions); return this; diff --git a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/CreateProject.java b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/CreateProject.java index 6eed9503336e0..cf7641335ccbd 100644 --- a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/CreateProject.java +++ b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/CreateProject.java @@ -7,6 +7,7 @@ import io.quarkus.devtools.commands.data.QuarkusCommandInvocation; import io.quarkus.devtools.commands.data.QuarkusCommandOutcome; import io.quarkus.devtools.commands.handlers.CreateProjectCommandHandler; +import io.quarkus.devtools.commands.handlers.LegacyCreateProjectCommandHandler; import io.quarkus.devtools.project.BuildTool; import io.quarkus.devtools.project.QuarkusProject; import io.quarkus.devtools.project.codegen.SourceType; @@ -32,7 +33,6 @@ public class CreateProject { public static final String NAME = "create-project"; - public static final String CODESTARTS_ENABLED = ToolsUtils.dotJoin(ToolsConstants.QUARKUS, NAME, "codestarts-enabled"); public static final String NO_DOCKERFILES = ToolsUtils.dotJoin(ToolsConstants.QUARKUS, NAME, "no-dockerfiles"); public static final String NO_BUILDTOOL_WRAPPER = ToolsUtils.dotJoin(ToolsConstants.QUARKUS, NAME, "no-buildtool-wrapper"); public static final String NO_EXAMPLES = ToolsUtils.dotJoin(ToolsConstants.QUARKUS, NAME, "no-examples"); @@ -40,6 +40,7 @@ public class CreateProject { private static final Pattern JAVA_VERSION_PATTERN = Pattern.compile("(?:1\\.)?(\\d+)(?:\\..*)?"); + private boolean legacyCodegen = false; private final Path projectDirPath; private final QuarkusPlatformDescriptor platformDescr; private String javaTarget; @@ -111,15 +112,11 @@ public CreateProject codestarts(Set codestarts) { return this; } - public CreateProject codestartsEnabled(boolean value) { - setValue(CODESTARTS_ENABLED, value); + public CreateProject legacyCodegen(boolean value) { + this.legacyCodegen = value; return this; } - public CreateProject codestartsEnabled() { - return codestartsEnabled(true); - } - public CreateProject noExamples(boolean value) { setValue(NO_EXAMPLES, value); return this; @@ -182,6 +179,9 @@ public QuarkusCommandOutcome execute() throws QuarkusCommandException { final QuarkusProject quarkusProject = QuarkusProject.of(projectDirPath, platformDescr, buildTool); final QuarkusCommandInvocation invocation = new QuarkusCommandInvocation(quarkusProject, values); + if (legacyCodegen) { + return new LegacyCreateProjectCommandHandler().execute(invocation); + } return new CreateProjectCommandHandler().execute(invocation); } diff --git a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java index 2a2476eb12bb9..183a29df63a9a 100644 --- a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java +++ b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/CreateProjectCommandHandler.java @@ -1,12 +1,14 @@ package io.quarkus.devtools.commands.handlers; import static io.quarkus.devtools.commands.CreateProject.CODESTARTS; -import static io.quarkus.devtools.commands.CreateProject.CODESTARTS_ENABLED; import static io.quarkus.devtools.commands.CreateProject.NO_BUILDTOOL_WRAPPER; import static io.quarkus.devtools.commands.CreateProject.NO_DOCKERFILES; import static io.quarkus.devtools.commands.CreateProject.NO_EXAMPLES; import static io.quarkus.devtools.commands.handlers.QuarkusCommandHandlers.computeCoordsFromQuery; -import static io.quarkus.devtools.project.codegen.ProjectGenerator.*; +import static io.quarkus.devtools.project.codegen.ProjectGenerator.BOM_ARTIFACT_ID; +import static io.quarkus.devtools.project.codegen.ProjectGenerator.BOM_GROUP_ID; +import static io.quarkus.devtools.project.codegen.ProjectGenerator.BOM_VERSION; +import static io.quarkus.devtools.project.codegen.ProjectGenerator.QUARKUS_VERSION; import io.quarkus.bootstrap.model.AppArtifactCoords; import io.quarkus.bootstrap.model.AppArtifactKey; @@ -15,19 +17,11 @@ import io.quarkus.devtools.codestarts.QuarkusCodestartCatalog; import io.quarkus.devtools.codestarts.QuarkusCodestartData.LegacySupport; import io.quarkus.devtools.codestarts.QuarkusCodestartProjectInput; -import io.quarkus.devtools.codestarts.utils.NestedMaps; import io.quarkus.devtools.commands.data.QuarkusCommandException; import io.quarkus.devtools.commands.data.QuarkusCommandInvocation; import io.quarkus.devtools.commands.data.QuarkusCommandOutcome; import io.quarkus.devtools.messagewriter.MessageIcons; -import io.quarkus.devtools.project.BuildTool; -import io.quarkus.devtools.project.buildfile.GroovyGradleBuildFilesCreator; -import io.quarkus.devtools.project.buildfile.KotlinGradleBuildFilesCreator; import io.quarkus.devtools.project.codegen.ProjectGenerator; -import io.quarkus.devtools.project.codegen.ProjectGeneratorRegistry; -import io.quarkus.devtools.project.codegen.SourceType; -import io.quarkus.devtools.project.codegen.rest.BasicRestProjectGenerator; -import io.quarkus.devtools.project.extensions.ExtensionManager; import io.quarkus.platform.descriptor.QuarkusPlatformDescriptor; import io.quarkus.platform.tools.ToolsUtils; import java.io.IOException; @@ -36,7 +30,6 @@ import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Optional; import java.util.Properties; import java.util.Set; import java.util.stream.Collectors; @@ -64,194 +57,49 @@ public QuarkusCommandOutcome execute(QuarkusCommandInvocation invocation) throws } }); - if (invocation.getValue(CODESTARTS_ENABLED, false)) { - final List extensionsToAdd = computeCoordsFromQuery(invocation, extensionsQuery).stream() - .map(AppArtifactCoords::getKey) - .collect(Collectors.toList()); - - try { - Map platformData = new HashMap<>(); - if (platformDescr.getMetadata().get("maven") != null) { - platformData.put("maven", platformDescr.getMetadata().get("maven")); - } - if (platformDescr.getMetadata().get("gradle") != null) { - platformData.put("gradle", platformDescr.getMetadata().get("gradle")); - } - final QuarkusCodestartProjectInput input = QuarkusCodestartProjectInput.builder() - .addExtensions(extensionsToAdd) - .buildTool(invocation.getQuarkusProject().getBuildTool()) - .addCodestarts(invocation.getValue(CODESTARTS, new HashSet<>())) - .noExamples(invocation.getValue(NO_EXAMPLES, false)) - .noBuildToolWrapper(invocation.getValue(NO_BUILDTOOL_WRAPPER, false)) - .noDockerfiles(invocation.getValue(NO_DOCKERFILES, false)) - .addData(platformData) - .addData(LegacySupport.convertFromLegacy(invocation.getValues())) - .messageWriter(invocation.log()) - .build(); - invocation.log().info("-----------"); - if (!extensionsToAdd.isEmpty()) { - invocation.log().info("selected extensions: \n" - + extensionsToAdd.stream().map(e -> "- " + e.getGroupId() + ":" + e.getArtifactId() + "\n") - .collect(Collectors.joining())); - } - - final QuarkusCodestartCatalog catalog = QuarkusCodestartCatalog - .fromQuarkusPlatformDescriptor(invocation.getPlatformDescriptor()); - final CodestartProjectDefinition projectDefinition = catalog.createProject(input); - projectDefinition.generate(invocation.getQuarkusProject().getProjectDirPath()); - invocation.log() - .info("\n-----------\n" + MessageIcons.NOOP_ICON + " " - + projectDefinition.getRequiredCodestart(CodestartType.PROJECT).getName() - + " project has been successfully generated in:\n--> " - + invocation.getQuarkusProject().getProjectDirPath().toString() + "\n-----------"); - - } catch (IOException e) { - throw new QuarkusCommandException("Failed to create project", e); - } - return QuarkusCommandOutcome.success(); - } - - addPlatformDataToLegacyCodegen(invocation); + final List extensionsToAdd = computeCoordsFromQuery(invocation, extensionsQuery).stream() + .map(AppArtifactCoords::getKey) + .collect(Collectors.toList()); try { - String className = invocation.getStringValue(CLASS_NAME); - if (className != null) { - className = invocation.getValue(SOURCE_TYPE, SourceType.JAVA).stripExtensionFrom(className); - int idx = className.lastIndexOf('.'); - if (idx >= 0) { - String pkgName = invocation.getStringValue(PACKAGE_NAME); - if (pkgName == null) { - invocation.setValue(PACKAGE_NAME, className.substring(0, idx)); - } - className = className.substring(idx + 1); - } - invocation.setValue(CLASS_NAME, className); + Map platformData = new HashMap<>(); + if (platformDescr.getMetadata().get("maven") != null) { + platformData.put("maven", platformDescr.getMetadata().get("maven")); + } + if (platformDescr.getMetadata().get("gradle") != null) { + platformData.put("gradle", platformDescr.getMetadata().get("gradle")); + } + final QuarkusCodestartProjectInput input = QuarkusCodestartProjectInput.builder() + .addExtensions(extensionsToAdd) + .buildTool(invocation.getQuarkusProject().getBuildTool()) + .addCodestarts(invocation.getValue(CODESTARTS, new HashSet<>())) + .noExamples(invocation.getValue(NO_EXAMPLES, false)) + .noBuildToolWrapper(invocation.getValue(NO_BUILDTOOL_WRAPPER, false)) + .noDockerfiles(invocation.getValue(NO_DOCKERFILES, false)) + .addData(platformData) + .addData(LegacySupport.convertFromLegacy(invocation.getValues())) + .messageWriter(invocation.log()) + .build(); + invocation.log().info("-----------"); + if (!extensionsToAdd.isEmpty()) { + invocation.log().info("selected extensions: \n" + + extensionsToAdd.stream().map(e -> "- " + e.getGroupId() + ":" + e.getArtifactId() + "\n") + .collect(Collectors.joining())); } - final List extensionsToAdd = computeCoordsFromQuery(invocation, extensionsQuery); - - // extensionsToAdd is null when an error occurred while matching extensions - if (extensionsToAdd != null) { - ProjectGeneratorRegistry.get(BasicRestProjectGenerator.NAME).generate(invocation); + final QuarkusCodestartCatalog catalog = QuarkusCodestartCatalog + .fromQuarkusPlatformDescriptor(invocation.getPlatformDescriptor()); + final CodestartProjectDefinition projectDefinition = catalog.createProject(input); + projectDefinition.generate(invocation.getQuarkusProject().getProjectDirPath()); + invocation.log() + .info("\n-----------\n" + MessageIcons.NOOP_ICON + " " + + projectDefinition.getRequiredCodestart(CodestartType.PROJECT).getName() + + " project has been successfully generated in:\n--> " + + invocation.getQuarkusProject().getProjectDirPath().toString() + "\n-----------"); - //TODO ia3andy extensions should be added directly during the project generation - if (invocation.getQuarkusProject().getBuildTool().equals(BuildTool.GRADLE)) { - final GroovyGradleBuildFilesCreator generator = new GroovyGradleBuildFilesCreator( - invocation.getQuarkusProject()); - generator.create( - invocation.getStringValue(PROJECT_GROUP_ID), - invocation.getStringValue(PROJECT_ARTIFACT_ID), - invocation.getStringValue(PROJECT_VERSION), - quarkusProps, - extensionsToAdd); - } else if (invocation.getQuarkusProject().getBuildTool().equals(BuildTool.GRADLE_KOTLIN_DSL)) { - final KotlinGradleBuildFilesCreator generator = new KotlinGradleBuildFilesCreator( - invocation.getQuarkusProject()); - generator.create( - invocation.getStringValue(PROJECT_GROUP_ID), - invocation.getStringValue(PROJECT_ARTIFACT_ID), - invocation.getStringValue(PROJECT_VERSION), - quarkusProps, - extensionsToAdd); - } else { - final ExtensionManager.InstallResult result = invocation.getQuarkusProject().getExtensionManager() - .install(extensionsToAdd); - result.getInstalled() - .forEach(a -> invocation.log() - .info(MessageIcons.OK_ICON + " Extension " + a.getGroupId() + ":" + a.getArtifactId() - + " has been installed")); - } - } } catch (IOException e) { throw new QuarkusCommandException("Failed to create project", e); } return QuarkusCommandOutcome.success(); } - - // # CLOSE YOUR EYES PLEASE - static void addPlatformDataToLegacyCodegen(QuarkusCommandInvocation invocation) { - final BuildTool buildTool = invocation.getQuarkusProject().getBuildTool(); - if (BuildTool.MAVEN == buildTool) { - final Optional mavenRepositories = NestedMaps.getValue(invocation.getPlatformDescriptor().getMetadata(), - "maven.repositories"); - if (mavenRepositories.isPresent() - && !mavenRepositories.get().isEmpty()) { - // We only take the first one here to make things simpler: - final Map repo = (Map) mavenRepositories.get().get(0); - if (repo != null && repo.get("id") instanceof String && repo.get("url") instanceof String) { - final StringBuilder repositories = new StringBuilder() - .append("\n") - .append(" \n") - .append(" \n") - .append(" ").append(repo.get("id")).append("\n") - .append(" ").append(repo.get("url")).append("\n") - .append(" \n") - .append(" ").append(repo.getOrDefault("releases-enabled", true)) - .append("\n") - .append(" \n") - .append(" \n") - .append(" ").append(repo.getOrDefault("snapshots-enabled", true)) - .append("\n") - .append(" \n") - .append(" \n") - .append(" \n"); - invocation.setValue(MAVEN_REPOSITORIES, repositories.toString()); - } - } - final Optional mavenPluginRepositories = NestedMaps - .getValue(invocation.getPlatformDescriptor().getMetadata(), "maven.plugin-repositories"); - if (mavenPluginRepositories.isPresent() - && !mavenPluginRepositories.get().isEmpty()) { - // We only take the first one here to make things simpler: - final Map repo = (Map) mavenPluginRepositories.get().get(0); - if (repo != null && repo.get("id") instanceof String && repo.get("url") instanceof String) { - final StringBuilder pluginRepositories = new StringBuilder() - .append("\n") - .append(" \n") - .append(" \n") - .append(" ").append(repo.get("id")).append("\n") - .append(" ").append(repo.get("url")).append("\n") - .append(" \n") - .append(" ").append(repo.getOrDefault("releases-enabled", true)) - .append("\n") - .append(" \n") - .append(" \n") - .append(" ").append(repo.getOrDefault("snapshots-enabled", true)) - .append("\n") - .append(" \n") - .append(" \n") - .append(" \n"); - invocation.setValue(MAVEN_PLUGIN_REPOSITORIES, pluginRepositories.toString()); - } - } - } else if (BuildTool.GRADLE == buildTool || BuildTool.GRADLE_KOTLIN_DSL == buildTool) { - final Optional gradleRepositories = NestedMaps - .getValue(invocation.getPlatformDescriptor().getMetadata(), "gradle.repositories"); - if (gradleRepositories.isPresent() - && !gradleRepositories.get().isEmpty()) { - // We only take the first one here to make things simpler: - final Map repo = (Map) gradleRepositories.get().get(0); - if (repo != null && repo.get("url") instanceof String) { - final String repositories = buildTool == BuildTool.GRADLE - ? "\n maven { url \"" + repo.get("url") + "\" }" - : "\n maven { url = uri(\"" + repo.get("url") + "\") }"; - invocation.setValue(MAVEN_REPOSITORIES, repositories); - } - } - final Optional gradlePluginRepositories = NestedMaps - .getValue(invocation.getPlatformDescriptor().getMetadata(), "gradle.plugin-repositories"); - if (gradlePluginRepositories.isPresent() - && !gradlePluginRepositories.get().isEmpty()) { - // We only take the first one here to make things simpler: - final Map repo = (Map) gradlePluginRepositories.get().get(0); - if (repo != null && repo.get("url") instanceof String) { - final String pluginRepositories = buildTool == BuildTool.GRADLE - ? "\n maven { url \"" + repo.get("url") + "\" }" - : "\n maven { url = uri(\"" + repo.get("url") + "\") }"; - invocation.setValue(MAVEN_PLUGIN_REPOSITORIES, pluginRepositories); - } - } - } - } - // # YOU CAN OPEN NOW :) } diff --git a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/LegacyCreateProjectCommandHandler.java b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/LegacyCreateProjectCommandHandler.java new file mode 100644 index 0000000000000..8a45c6f909df9 --- /dev/null +++ b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/commands/handlers/LegacyCreateProjectCommandHandler.java @@ -0,0 +1,196 @@ +package io.quarkus.devtools.commands.handlers; + +import static io.quarkus.devtools.commands.handlers.QuarkusCommandHandlers.computeCoordsFromQuery; +import static io.quarkus.devtools.project.codegen.ProjectGenerator.*; + +import io.quarkus.bootstrap.model.AppArtifactCoords; +import io.quarkus.devtools.codestarts.utils.NestedMaps; +import io.quarkus.devtools.commands.data.QuarkusCommandException; +import io.quarkus.devtools.commands.data.QuarkusCommandInvocation; +import io.quarkus.devtools.commands.data.QuarkusCommandOutcome; +import io.quarkus.devtools.messagewriter.MessageIcons; +import io.quarkus.devtools.project.BuildTool; +import io.quarkus.devtools.project.buildfile.GroovyGradleBuildFilesCreator; +import io.quarkus.devtools.project.buildfile.KotlinGradleBuildFilesCreator; +import io.quarkus.devtools.project.codegen.ProjectGenerator; +import io.quarkus.devtools.project.codegen.ProjectGeneratorRegistry; +import io.quarkus.devtools.project.codegen.SourceType; +import io.quarkus.devtools.project.codegen.rest.BasicRestProjectGenerator; +import io.quarkus.devtools.project.extensions.ExtensionManager; +import io.quarkus.platform.descriptor.QuarkusPlatformDescriptor; +import io.quarkus.platform.tools.ToolsUtils; +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Properties; +import java.util.Set; + +/** + * Instances of this class are thread-safe. They create a new project extracting all the necessary properties from an instance + * of {@link QuarkusCommandInvocation}. + */ +public class LegacyCreateProjectCommandHandler implements QuarkusCommandHandler { + + @Override + public QuarkusCommandOutcome execute(QuarkusCommandInvocation invocation) throws QuarkusCommandException { + final QuarkusPlatformDescriptor platformDescr = invocation.getPlatformDescriptor(); + invocation.setValue(BOM_GROUP_ID, platformDescr.getBomGroupId()); + invocation.setValue(BOM_ARTIFACT_ID, platformDescr.getBomArtifactId()); + invocation.setValue(QUARKUS_VERSION, platformDescr.getQuarkusVersion()); + invocation.setValue(BOM_VERSION, platformDescr.getBomVersion()); + final Set extensionsQuery = invocation.getValue(ProjectGenerator.EXTENSIONS, Collections.emptySet()); + + final Properties quarkusProps = ToolsUtils.readQuarkusProperties(platformDescr); + quarkusProps.forEach((k, v) -> { + String name = k.toString().replace("-", "_"); + if (!invocation.hasValue(name)) { + invocation.setValue(k.toString().replace("-", "_"), v.toString()); + } + }); + + addPlatformDataToLegacyCodegen(invocation); + + try { + String className = invocation.getStringValue(CLASS_NAME); + if (className != null) { + className = invocation.getValue(SOURCE_TYPE, SourceType.JAVA).stripExtensionFrom(className); + int idx = className.lastIndexOf('.'); + if (idx >= 0) { + String pkgName = invocation.getStringValue(PACKAGE_NAME); + if (pkgName == null) { + invocation.setValue(PACKAGE_NAME, className.substring(0, idx)); + } + className = className.substring(idx + 1); + } + invocation.setValue(CLASS_NAME, className); + } + + final List extensionsToAdd = computeCoordsFromQuery(invocation, extensionsQuery); + + // extensionsToAdd is null when an error occurred while matching extensions + if (extensionsToAdd != null) { + ProjectGeneratorRegistry.get(BasicRestProjectGenerator.NAME).generate(invocation); + + //TODO ia3andy extensions should be added directly during the project generation + if (invocation.getQuarkusProject().getBuildTool().equals(BuildTool.GRADLE)) { + final GroovyGradleBuildFilesCreator generator = new GroovyGradleBuildFilesCreator( + invocation.getQuarkusProject()); + generator.create( + invocation.getStringValue(PROJECT_GROUP_ID), + invocation.getStringValue(PROJECT_ARTIFACT_ID), + invocation.getStringValue(PROJECT_VERSION), + quarkusProps, + extensionsToAdd); + } else if (invocation.getQuarkusProject().getBuildTool().equals(BuildTool.GRADLE_KOTLIN_DSL)) { + final KotlinGradleBuildFilesCreator generator = new KotlinGradleBuildFilesCreator( + invocation.getQuarkusProject()); + generator.create( + invocation.getStringValue(PROJECT_GROUP_ID), + invocation.getStringValue(PROJECT_ARTIFACT_ID), + invocation.getStringValue(PROJECT_VERSION), + quarkusProps, + extensionsToAdd); + } else { + final ExtensionManager.InstallResult result = invocation.getQuarkusProject().getExtensionManager() + .install(extensionsToAdd); + result.getInstalled() + .forEach(a -> invocation.log() + .info(MessageIcons.OK_ICON + " Extension " + a.getGroupId() + ":" + a.getArtifactId() + + " has been installed")); + } + } + } catch (IOException e) { + throw new QuarkusCommandException("Failed to create project", e); + } + return QuarkusCommandOutcome.success(); + } + + // # CLOSE YOUR EYES PLEASE + static void addPlatformDataToLegacyCodegen(QuarkusCommandInvocation invocation) { + final BuildTool buildTool = invocation.getQuarkusProject().getBuildTool(); + if (BuildTool.MAVEN == buildTool) { + final Optional mavenRepositories = NestedMaps.getValue(invocation.getPlatformDescriptor().getMetadata(), + "maven.repositories"); + if (mavenRepositories.isPresent() + && !mavenRepositories.get().isEmpty()) { + // We only take the first one here to make things simpler: + final Map repo = (Map) mavenRepositories.get().get(0); + if (repo != null && repo.get("id") instanceof String && repo.get("url") instanceof String) { + final StringBuilder repositories = new StringBuilder() + .append("\n") + .append(" \n") + .append(" \n") + .append(" ").append(repo.get("id")).append("\n") + .append(" ").append(repo.get("url")).append("\n") + .append(" \n") + .append(" ").append(repo.getOrDefault("releases-enabled", true)) + .append("\n") + .append(" \n") + .append(" \n") + .append(" ").append(repo.getOrDefault("snapshots-enabled", true)) + .append("\n") + .append(" \n") + .append(" \n") + .append(" \n"); + invocation.setValue(MAVEN_REPOSITORIES, repositories.toString()); + } + } + final Optional mavenPluginRepositories = NestedMaps + .getValue(invocation.getPlatformDescriptor().getMetadata(), "maven.plugin-repositories"); + if (mavenPluginRepositories.isPresent() + && !mavenPluginRepositories.get().isEmpty()) { + // We only take the first one here to make things simpler: + final Map repo = (Map) mavenPluginRepositories.get().get(0); + if (repo != null && repo.get("id") instanceof String && repo.get("url") instanceof String) { + final StringBuilder pluginRepositories = new StringBuilder() + .append("\n") + .append(" \n") + .append(" \n") + .append(" ").append(repo.get("id")).append("\n") + .append(" ").append(repo.get("url")).append("\n") + .append(" \n") + .append(" ").append(repo.getOrDefault("releases-enabled", true)) + .append("\n") + .append(" \n") + .append(" \n") + .append(" ").append(repo.getOrDefault("snapshots-enabled", true)) + .append("\n") + .append(" \n") + .append(" \n") + .append(" \n"); + invocation.setValue(MAVEN_PLUGIN_REPOSITORIES, pluginRepositories.toString()); + } + } + } else if (BuildTool.GRADLE == buildTool || BuildTool.GRADLE_KOTLIN_DSL == buildTool) { + final Optional gradleRepositories = NestedMaps + .getValue(invocation.getPlatformDescriptor().getMetadata(), "gradle.repositories"); + if (gradleRepositories.isPresent() + && !gradleRepositories.get().isEmpty()) { + // We only take the first one here to make things simpler: + final Map repo = (Map) gradleRepositories.get().get(0); + if (repo != null && repo.get("url") instanceof String) { + final String repositories = buildTool == BuildTool.GRADLE + ? "\n maven { url \"" + repo.get("url") + "\" }" + : "\n maven { url = uri(\"" + repo.get("url") + "\") }"; + invocation.setValue(MAVEN_REPOSITORIES, repositories); + } + } + final Optional gradlePluginRepositories = NestedMaps + .getValue(invocation.getPlatformDescriptor().getMetadata(), "gradle.plugin-repositories"); + if (gradlePluginRepositories.isPresent() + && !gradlePluginRepositories.get().isEmpty()) { + // We only take the first one here to make things simpler: + final Map repo = (Map) gradlePluginRepositories.get().get(0); + if (repo != null && repo.get("url") instanceof String) { + final String pluginRepositories = buildTool == BuildTool.GRADLE + ? "\n maven { url \"" + repo.get("url") + "\" }" + : "\n maven { url = uri(\"" + repo.get("url") + "\") }"; + invocation.setValue(MAVEN_PLUGIN_REPOSITORIES, pluginRepositories); + } + } + } + } + // # YOU CAN OPEN NOW :) +} diff --git a/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/QuarkusCodestartRunIT.java b/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/QuarkusCodestartRunIT.java index 45d2a701bc9af..483a99c10369d 100644 --- a/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/QuarkusCodestartRunIT.java +++ b/integration-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/QuarkusCodestartRunIT.java @@ -56,12 +56,12 @@ private Stream provideGenerateCombinations() throws IOException { .filter(c -> !EXCLUDED.contains(c.getName())) .collect(Collectors.toList()); final List> runAlone = examples.stream() - .filter(c -> c.containsTag(Tag.COMPATIBILITY_ISSUES.getKey())) + .filter(c -> c.containsTag(Tag.SINGLETON_EXAMPLE.getKey())) .map(Codestart::getName) .map(Collections::singletonList) .collect(Collectors.toList()); final List runTogether = examples.stream() - .filter(c -> !c.containsTag(Tag.COMPATIBILITY_ISSUES.getKey())) + .filter(c -> !c.containsTag(Tag.SINGLETON_EXAMPLE.getKey())) .map(Codestart::getName) .collect(Collectors.toList()); return Stream.of("java", "kotlin", "scala") diff --git a/integration-tests/devtools/src/test/java/io/quarkus/devtools/commands/CreateProjectPlatformMetadataTest.java b/integration-tests/devtools/src/test/java/io/quarkus/devtools/commands/CreateProjectPlatformMetadataTest.java index dbf24cb357bca..dac02c1546b6b 100644 --- a/integration-tests/devtools/src/test/java/io/quarkus/devtools/commands/CreateProjectPlatformMetadataTest.java +++ b/integration-tests/devtools/src/test/java/io/quarkus/devtools/commands/CreateProjectPlatformMetadataTest.java @@ -31,11 +31,11 @@ public class CreateProjectPlatformMetadataTest extends PlatformAwareTestBase { private static final ObjectMapper JSON_MAPPER = new ObjectMapper(); @ParameterizedTest - @ValueSource(booleans = { true, false }) - public void create(boolean codestartsEnabled) throws Exception { + @ValueSource(booleans = { false, true }) + public void create(boolean legacyCodegen) throws Exception { final File file = new File("target/meta-rest"); ProjectTestUtil.delete(file); - createProject(BuildTool.MAVEN, file, "io.quarkus", "basic-rest", "1.0.0-SNAPSHOT", codestartsEnabled); + createProject(BuildTool.MAVEN, file, "io.quarkus", "basic-rest", "1.0.0-SNAPSHOT", legacyCodegen); assertThat(file.toPath().resolve("pom.xml")) .exists() .satisfies(checkContains("redhat")) @@ -47,11 +47,11 @@ public void create(boolean codestartsEnabled) throws Exception { } @ParameterizedTest - @ValueSource(booleans = { true, false }) - public void createGradle(boolean codestartsEnabled) throws Exception { + @ValueSource(booleans = { false, true }) + public void createGradle(boolean legacyCodegen) throws Exception { final File file = new File("target/meta-rest-gradle"); ProjectTestUtil.delete(file); - createProject(BuildTool.GRADLE, file, "io.quarkus", "basic-rest", "1.0.0-SNAPSHOT", codestartsEnabled); + createProject(BuildTool.GRADLE, file, "io.quarkus", "basic-rest", "1.0.0-SNAPSHOT", legacyCodegen); assertThat(file.toPath().resolve("build.gradle")) .exists() .satisfies(checkContains("maven { url \"https://maven.repository.redhat.com\" }")); @@ -61,7 +61,7 @@ public void createGradle(boolean codestartsEnabled) throws Exception { public void createGradleKotlin() throws Exception { final File file = new File("target/meta-rest-gradle-kts"); ProjectTestUtil.delete(file); - createProject(BuildTool.GRADLE_KOTLIN_DSL, file, "io.quarkus", "basic-rest", "1.0.0-SNAPSHOT", true); + createProject(BuildTool.GRADLE_KOTLIN_DSL, file, "io.quarkus", "basic-rest", "1.0.0-SNAPSHOT", false); assertThat(file.toPath().resolve("build.gradle.kts")) .exists() .satisfies(checkContains("maven { url = uri(\"https://maven.repository.redhat.com\") }")); @@ -77,7 +77,7 @@ private Map getMetadata() throws java.io.IOException { } private void createProject(BuildTool buildTool, File file, String groupId, String artifactId, String version, - boolean codestartsEnabled) + boolean legacyCodegen) throws QuarkusCommandException, IOException { final QuarkusPlatformDescriptor platformDescriptor = getPlatformDescriptor(); final QuarkusPlatformDescriptor spy = spy(platformDescriptor); @@ -86,7 +86,7 @@ private void createProject(BuildTool buildTool, File file, String groupId, Strin .buildTool(buildTool) .groupId(groupId) .artifactId(artifactId) - .codestartsEnabled(codestartsEnabled) + .legacyCodegen(legacyCodegen) .version(version) .quarkusMavenPluginVersion("2.3.5") .quarkusGradlePluginVersion("2.3.5-gradle") diff --git a/integration-tests/devtools/src/test/java/io/quarkus/devtools/commands/ListExtensionsTest.java b/integration-tests/devtools/src/test/java/io/quarkus/devtools/commands/ListExtensionsTest.java index d05b5cad30c3c..a2a32d3dac483 100644 --- a/integration-tests/devtools/src/test/java/io/quarkus/devtools/commands/ListExtensionsTest.java +++ b/integration-tests/devtools/src/test/java/io/quarkus/devtools/commands/ListExtensionsTest.java @@ -13,6 +13,7 @@ import java.io.PrintStream; import java.nio.file.Files; import java.nio.file.Path; +import java.util.Collections; import java.util.HashSet; import java.util.Map; import java.util.function.Function; @@ -198,6 +199,7 @@ private QuarkusProject createNewProject(final File pom) throws IOException, Quar .groupId("org.acme") .artifactId("add-extension-test") .version("0.0.1-SNAPSHOT") + .extensions(Collections.singleton("quarkus-resteasy")) .execute(); return QuarkusProject.maven(projectDirPath, getPlatformDescriptor()); }