Skip to content

Commit

Permalink
Pivot to extension codestarts instead of examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ia3andy committed Apr 21, 2021
1 parent e4f1d6b commit 4780e55
Show file tree
Hide file tree
Showing 264 changed files with 1,015 additions and 2,155 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
Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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
Expand All @@ -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);
Expand Down
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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ ref: azure-functions-http
type: code
tags:
- example
- singleton-example
- maven-only
metadata:
title: Azure Functions HTTP Integration example
Expand Down

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.
Expand Down
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.
Expand Down

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.
Expand Down
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.
Expand Down
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.
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 4780e55

Please sign in to comment.