Skip to content

Commit

Permalink
Merge pull request #16692 from ia3andy/extension-codestarts
Browse files Browse the repository at this point in the history
ia3andy authored Apr 23, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 1997498 + c635100 commit e3fc195
Showing 276 changed files with 1,532 additions and 2,222 deletions.
12 changes: 6 additions & 6 deletions devtools/cli/src/main/java/io/quarkus/cli/Create.java
Original file line number Diff line number Diff line change
@@ -27,12 +27,12 @@ public class Create extends BaseSubCommand implements Callable<Integer> {
String version = "1.0.0-SNAPSHOT";

@CommandLine.Option(names = { "-0",
"--no-examples" }, order = 4, description = "Generate without example code.")
boolean noExamples = false;
"--no-code" }, order = 4, description = "Generate an empty Quarkus project.")
boolean noCode = false;

@CommandLine.Option(names = { "-x",
"--examples" }, order = 4, description = "Choose which example(s) you want in the generated Quarkus application.")
Set<String> examples;
"--example" }, order = 4, description = "Choose a specific example for the generated Quarkus application.")
String example;

@CommandLine.ArgGroup()
TargetBuildTool targetBuildTool = new TargetBuildTool();
@@ -116,9 +116,9 @@ public Integer call() throws Exception {
.artifactId(artifactId)
.version(version)
.sourceType(sourceType)
.overrideExamples(examples)
.example(example)
.extensions(extensions)
.noExamples(noExamples)
.noCode(noCode)
.execute().isSuccess();

if (status) {
Original file line number Diff line number Diff line change
@@ -75,16 +75,13 @@ public class CreateProjectMojo extends AbstractMojo {
private String projectVersion;

/**
* When true, do not include any example code in the generated Quarkus project.
* When true, do not include any code in the generated Quarkus project.
*/
@Parameter(property = "noExamples", defaultValue = "false")
private boolean noExamples;
@Parameter(property = "noCode", defaultValue = "false")
private boolean noCode;

/**
* Choose which example(s) you want in the generated Quarkus application.
*/
@Parameter(property = "examples")
private Set<String> examples;
@Parameter(property = "example")
private String example;

/**
* Group ID of the target platform BOM
@@ -286,8 +283,8 @@ public void execute() throws MojoExecutionException {
.className(className)
.packageName(packageName)
.extensions(extensions)
.overrideExamples(examples)
.noExamples(noExamples);
.example(example)
.noCode(noCode);
if (path != null) {
createProject.setValue("path", path);
}
@@ -420,7 +417,7 @@ private void askTheUserForMissingValues() throws MojoExecutionException {
DEFAULT_VERSION);
}

if (examples.isEmpty()) {
if (!noCode && StringUtils.isBlank(example)) {
if (extensions.isEmpty()) {
extensions = Arrays
.stream(prompter
@@ -430,8 +427,8 @@ private void askTheUserForMissingValues() throws MojoExecutionException {
.map(String::trim).filter(StringUtils::isNotEmpty).collect(Collectors.toSet());
}
String answer = prompter.promptWithDefaultValue(
"Do you want example code to get started (yes), or just an empty project (no)", "yes");
noExamples = answer.startsWith("n");
"Would you like some code to start (yes), or just an empty Quarkus project (no)", "yes");
noCode = answer.startsWith("n");
}
} catch (IOException e) {
throw new MojoExecutionException("Unable to get user input", e);
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: amazon-lambda-example
ref: amazon-lambda
type: code
tags:
- example
- singleton-example
tags: example
metadata:
title: Amazon Lambda Integration example
description: This example contains a Quarkus Greeting Lambda ready for Amazon.
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@ ref: azure-functions-http
type: code
tags:
- example
- singleton-example
- maven-only
metadata:
title: Azure Functions HTTP Integration example

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: funqy-amazon-lambda-example
ref: funqy-amazon-lambda
type: code
tags:
- example
- singleton-example
tags: example
metadata:
title: Funqy Amazon Lambda Binding example
description: This example contains a Quarkus Funqy Greeting Function ready for Amazon Lambda.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: funqy-google-cloud-functions-example
ref: funqy-google-cloud-functions
type: code
tags:
- example
- singleton-example
tags: example
metadata:
title: Funqy Google Cloud Functions Integration examples
description: Examples of Background Functions with Funqy for Quarkus.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: funqy-knative-events-example
ref: funqy-knative-events
type: code
tags:
- example
- singleton-example
tags: example
metadata:
title: Funqy Knative Events Binding example
description: This example contains a Quarkus Knative Funqy Function ready for Kubernetes or Openshift.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: google-cloud-functions-example
ref: google-cloud-functions
type: code
tags:
- example
- singleton-example
tags: example
metadata:
title: Google Cloud Functions Integration examples
description: Examples of Google Cloud HTTP and Background Functions for Quarkus.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: google-cloud-functions-http-example
ref: google-cloud-functions-http
type: code
tags:
- example
- singleton-example
tags: example
metadata:
title: Google Cloud Functions HTTP Integration examples
description: Examples of Google Cloud HTTP functions for Quarkus written with RESTEasy (JAX-RS), Undertow (Servlet), Vert.x Web, or Funqy HTTP.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit e3fc195

Please sign in to comment.