diff --git a/extensions/amazon-lambda/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/amazon-lambda/runtime/src/main/resources/META-INF/quarkus-extension.yaml index 8553d6e8d847e..754fce2370f31 100644 --- a/extensions/amazon-lambda/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/amazon-lambda/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -10,6 +10,6 @@ metadata: status: "preview" codestart: name: "amazon-lambda" - kind: "singleton-example" + kind: "example" languages: "java" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" diff --git a/extensions/azure-functions-http/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/azure-functions-http/runtime/src/main/resources/META-INF/quarkus-extension.yaml index e03b7f3c3561e..3ed3338f23954 100644 --- a/extensions/azure-functions-http/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/azure-functions-http/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -10,6 +10,6 @@ metadata: status: "preview" codestart: name: "azure-functions-http" - kind: "singleton-example" + kind: "example" languages: "java" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" diff --git a/extensions/funqy/funqy-amazon-lambda/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/funqy/funqy-amazon-lambda/runtime/src/main/resources/META-INF/quarkus-extension.yaml index cb395e98d2648..01365eeacd748 100644 --- a/extensions/funqy/funqy-amazon-lambda/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/funqy/funqy-amazon-lambda/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -12,6 +12,6 @@ metadata: status: "experimental" codestart: name: "funqy-amazon-lambda" - kind: "singleton-example" + kind: "example" languages: "java" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" diff --git a/extensions/funqy/funqy-google-cloud-functions/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/funqy/funqy-google-cloud-functions/runtime/src/main/resources/META-INF/quarkus-extension.yaml index d4e9df67e6453..ea4df58c21f01 100644 --- a/extensions/funqy/funqy-google-cloud-functions/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/funqy/funqy-google-cloud-functions/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -13,6 +13,6 @@ metadata: status: "experimental" codestart: name: "funqy-google-cloud-functions-example" - kind: "singleton-example" + kind: "example" languages: "java" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" \ No newline at end of file diff --git a/extensions/funqy/funqy-knative-events/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/funqy/funqy-knative-events/runtime/src/main/resources/META-INF/quarkus-extension.yaml index 73e6df3faf1c3..3b84bf50b9921 100644 --- a/extensions/funqy/funqy-knative-events/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/funqy/funqy-knative-events/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -11,6 +11,6 @@ metadata: status: "experimental" codestart: name: "funqy-knative-events" - kind: "singleton-example" + kind: "example" languages: "java" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" diff --git a/extensions/google-cloud-functions-http/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/google-cloud-functions-http/runtime/src/main/resources/META-INF/quarkus-extension.yaml index 9035d572bcf38..5ee244dc0c75c 100644 --- a/extensions/google-cloud-functions-http/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/google-cloud-functions-http/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -12,6 +12,6 @@ metadata: status: "preview" codestart: name: "google-cloud-functions-http" - kind: "singleton-example" + kind: "example" languages: "java" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" diff --git a/extensions/google-cloud-functions/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/google-cloud-functions/runtime/src/main/resources/META-INF/quarkus-extension.yaml index aca38b5b5e1bf..36e37f1ea0c7d 100755 --- a/extensions/google-cloud-functions/runtime/src/main/resources/META-INF/quarkus-extension.yaml +++ b/extensions/google-cloud-functions/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -11,6 +11,6 @@ metadata: status: "preview" codestart: name: "google-cloud-functions" - kind: "singleton-example" + kind: "example" languages: "java" artifact: "io.quarkus:quarkus-project-core-extension-codestarts" 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 f0081d35f04a5..0f5626222fff2 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 @@ -35,6 +35,7 @@ public class CreateProject { public static final String NO_BUILDTOOL_WRAPPER = ToolsUtils.dotJoin(ToolsConstants.QUARKUS, NAME, "no-buildtool-wrapper"); public static final String NO_CODE = ToolsUtils.dotJoin(ToolsConstants.QUARKUS, NAME, "no-code"); public static final String EXAMPLE = ToolsUtils.dotJoin(ToolsConstants.QUARKUS, NAME, "example"); + public static final String EXTRA_CODESTARTS = ToolsUtils.dotJoin(ToolsConstants.QUARKUS, NAME, "extra-codestarts"); private static final Pattern JAVA_VERSION_PATTERN = Pattern.compile("(?:1\\.)?(\\d+)(?:\\..*)?"); @@ -89,6 +90,11 @@ public CreateProject sourceType(SourceType sourceType) { return this; } + public CreateProject extraCodestarts(Set extraCodestarts) { + setValue(EXTRA_CODESTARTS, extraCodestarts); + return this; + } + public CreateProject javaTarget(String javaTarget) { this.javaTarget = javaTarget; return this; 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 960cdc3939157..acf3fe531c8d4 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,6 +1,7 @@ package io.quarkus.devtools.commands.handlers; import static io.quarkus.devtools.commands.CreateProject.EXAMPLE; +import static io.quarkus.devtools.commands.CreateProject.EXTRA_CODESTARTS; import static io.quarkus.devtools.commands.CreateProject.NO_BUILDTOOL_WRAPPER; import static io.quarkus.devtools.commands.CreateProject.NO_CODE; import static io.quarkus.devtools.commands.CreateProject.NO_DOCKERFILES; @@ -93,6 +94,7 @@ public QuarkusCommandOutcome execute(QuarkusCommandInvocation invocation) throws .buildTool(invocation.getQuarkusProject().getBuildTool()) .example(invocation.getValue(EXAMPLE)) .noCode(invocation.getValue(NO_CODE, false)) + .addCodestarts(invocation.getValue(EXTRA_CODESTARTS, Collections.emptySet())) .noBuildToolWrapper(invocation.getValue(NO_BUILDTOOL_WRAPPER, false)) .noDockerfiles(invocation.getValue(NO_DOCKERFILES, false)) .addData(platformData) diff --git a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/catalog/processor/ExtensionProcessor.java b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/catalog/processor/ExtensionProcessor.java index a729a2b6d6fa7..6a8e8ef446695 100644 --- a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/catalog/processor/ExtensionProcessor.java +++ b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/platform/catalog/processor/ExtensionProcessor.java @@ -59,6 +59,9 @@ public static String getCodestartArtifact(Extension extension) { } public static CodestartKind getCodestartKind(Extension extension) { + if (getCodestartName(extension) == null) { + return null; + } return getMetadataValue(extension, MD_NESTED_CODESTART_KIND).toEnum(CodestartKind.class, CodestartKind.EXTENSION_CODESTART); }