Skip to content

Commit

Permalink
Be more consistent in guides when creating projects/adding extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Oct 12, 2023
1 parent b2179b8 commit baf0b76
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 33 deletions.
24 changes: 8 additions & 16 deletions docs/src/main/asciidoc/liquibase-mongodb.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,40 +33,32 @@ To start using the Liquibase MongoDB Extension with your project, you just need
* activate the `migrate-at-start` option to migrate the schema automatically or inject the `Liquibase` object and run

Check warning on line 33 in docs/src/main/asciidoc/liquibase-mongodb.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'.", "location": {"path": "docs/src/main/asciidoc/liquibase-mongodb.adoc", "range": {"start": {"line": 33, "column": 99}}}, "severity": "INFO"}
your migration as you normally do.

In your `pom.xml`, add the following dependencies:
You can add the `liquibase-mongodb` extension
to your project by running the following command in your project base directory:

* the Liquibase MongoDB extension
* the MongoDB client extension
:add-extension-extensions: liquibase-mongodb
include::{includes}/devtools/extension-add.adoc[]

This will add the following to your build file:

[source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"]
.pom.xml
----
<!-- Liquibase MongoDB -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-liquibase-mongodb</artifactId>
</dependency>
<!-- MongoDB client dependency -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-mongodb-client</artifactId>
</dependency>
----

[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]
.build.gradle

Check warning on line 54 in docs/src/main/asciidoc/liquibase-mongodb.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.CaseSensitiveTerms] Use 'Gradle' rather than 'gradle'. Raw Output: {"message": "[Quarkus.CaseSensitiveTerms] Use 'Gradle' rather than 'gradle'.", "location": {"path": "docs/src/main/asciidoc/liquibase-mongodb.adoc", "range": {"start": {"line": 54, "column": 8}}}, "severity": "INFO"}
----
// Liquibase MongoDB
implementation("io.quarkus:quarkus-liquibase-mongodb")
// MongoDB client dependency
implementation("io.quarkus:quarkus-mongodb-client")
----

Liquibase MongoDB extension support relies on the Quarkus MongoDB client config.
The Liquibase MongoDB extension support relies on the Quarkus MongoDB client config.
For the time being, it does not support multiple clients.

Check warning on line 60 in docs/src/main/asciidoc/liquibase-mongodb.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Fluff] Depending on the context, consider using 'Rewrite the sentence, or use 'must', instead of' rather than 'need to'. Raw Output: {"message": "[Quarkus.Fluff] Depending on the context, consider using 'Rewrite the sentence, or use 'must', instead of' rather than 'need to'.", "location": {"path": "docs/src/main/asciidoc/liquibase-mongodb.adoc", "range": {"start": {"line": 60, "column": 52}}}, "severity": "INFO"}
First, you need to add the MongoDB config to the `{config-file}` file
You need to add the MongoDB config to the `{config-file}` file

Check warning on line 61 in docs/src/main/asciidoc/liquibase-mongodb.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsWarnings] Consider using 'to' rather than 'in order to' unless updating existing content that uses the term. Raw Output: {"message": "[Quarkus.TermsWarnings] Consider using 'to' rather than 'in order to' unless updating existing content that uses the term.", "location": {"path": "docs/src/main/asciidoc/liquibase-mongodb.adoc", "range": {"start": {"line": 61, "column": 53}}}, "severity": "WARNING"}
in order to allow Liquibase to manage the schema.

The following is an example for the `{config-file}` file:
Expand Down
44 changes: 35 additions & 9 deletions docs/src/main/asciidoc/mailer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,45 @@ Clone the Git repository: `git clone {quickstarts-clone-url}`, or download an {q

The solution is located in the `mailer-quickstart` link:{quickstarts-tree-url}/mailer-quickstart[directory].

== Creating the Maven Project
== Create the Maven Project

Check warning on line 43 in docs/src/main/asciidoc/mailer.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Headings] Use sentence-style capitalization in 'Create the Maven Project'. Raw Output: {"message": "[Quarkus.Headings] Use sentence-style capitalization in 'Create the Maven Project'.", "location": {"path": "docs/src/main/asciidoc/mailer.adoc", "range": {"start": {"line": 43, "column": 4}}}, "severity": "INFO"}

First, we need a project.
Open your browser to https://code.quarkus.io and select the following extensions:
First, we need a new project. Create a new project with the following command:

1. RESTEasy Reactive - we use it to expose our HTTP endpoint
2. Mailer - which offer the possibility to send emails
3. Qute - the Quarkus template engine
:create-app-artifact-id: mailer-quickstart
:create-app-extensions: resteasy-reactive,mailer,qute
include::{includes}/devtools/create-app.adoc[]

This command generates a Maven structure including the following extensions:

* RESTEasy Reactive used to expose REST endpoints
* Mailer so that we can send emails
* Qute, our template engine

If you already have your Quarkus project configured, you can add the `mailer` extension
to your project by running the following command in your project base directory:

:add-extension-extensions: mailer
include::{includes}/devtools/extension-add.adoc[]

This will add the following to your `pom.xml`:

[source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"]
.pom.xml
----
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-mailer</artifactId>
</dependency>
----

[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]
.build.gradle

Check warning on line 75 in docs/src/main/asciidoc/mailer.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.CaseSensitiveTerms] Use 'Gradle' rather than 'gradle'. Raw Output: {"message": "[Quarkus.CaseSensitiveTerms] Use 'Gradle' rather than 'gradle'.", "location": {"path": "docs/src/main/asciidoc/mailer.adoc", "range": {"start": {"line": 75, "column": 8}}}, "severity": "INFO"}
----
implementation("io.quarkus:quarkus-mailer")
----

Alternatively, this https://code.quarkus.io/?a=quarkus-mailer-getting-started&nc=true&e=resteasy-reactive&e=qute&e=mailer&extension-search=mail[link] pre-configures the application.
Click on "Generate your application", download the zip file and unzip it on your file system.
Open the generated project in your IDE.
In a terminal, navigate to the project and start dev mode:
In a terminal, navigate to the project and start your application in dev mode:

Check warning on line 81 in docs/src/main/asciidoc/mailer.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using '"click", "select", "browse", or "go to"' rather than 'navigate'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using '\"click\", \"select\", \"browse\", or \"go to\"' rather than 'navigate'.", "location": {"path": "docs/src/main/asciidoc/mailer.adoc", "range": {"start": {"line": 81, "column": 5}}}, "severity": "INFO"}

include::{includes}/devtools/dev.adoc[]

Expand Down
13 changes: 10 additions & 3 deletions docs/src/main/asciidoc/picocli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,31 @@ Quarkus provides support for using Picocli. This guide contains examples of `pic

IMPORTANT: If you are not familiar with the Quarkus Command Mode, consider reading the xref:command-mode-reference.adoc[Command Mode reference guide] first.

== Configuration
== Extension

Once you have your Quarkus project configured you can add the `picocli` extension
to your project by running the following command in your project base directory.

:add-extension-extensions: picocli
include::{includes}/devtools/extension-add.adoc[]

This will add the following to your `pom.xml`:
This will add the following to your build file:

[source,xml]
[source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"]
.pom.xml
----
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-picocli</artifactId>
</dependency>
----

[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]
.build.gradle
----
implementation("io.quarkus:quarkus-picocli")
----

== Simple command line application

Simple PicocliApplication with only one `Command` can be created as follows:

Check warning on line 46 in docs/src/main/asciidoc/picocli.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'.", "location": {"path": "docs/src/main/asciidoc/picocli.adoc", "range": {"start": {"line": 46, "column": 55}}}, "severity": "INFO"}
Expand Down
28 changes: 27 additions & 1 deletion docs/src/main/asciidoc/rabbitmq.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,33 @@ include::{includes}/devtools/create-app.adoc[]
This command creates the project structure and select the two Quarkus extensions we will be using:

Check warning on line 61 in docs/src/main/asciidoc/rabbitmq.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'by using' or 'that uses' rather than 'using'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'by using' or 'that uses' rather than 'using'.", "location": {"path": "docs/src/main/asciidoc/rabbitmq.adoc", "range": {"start": {"line": 61, "column": 92}}}, "severity": "INFO"}

1. The Reactive Messaging RabbitMQ connector
2. RESTEasy Reactive and it's Jackson support to handle JSON payloads
2. RESTEasy Reactive and its Jackson support to handle JSON payloads

[TIP]
====
If you already have your Quarkus project configured, you can add the `smallrye-reactive-messaging-rabbitmq` extension
to your project by running the following command in your project base directory:
:add-extension-extensions: smallrye-reactive-messaging-rabbitmq
include::{includes}/devtools/extension-add.adoc[]
This will add the following to your `pom.xml`:
[source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"]
.pom.xml
----
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-reactive-messaging-rabbitmq</artifactId>
</dependency>
----
[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]

Check warning on line 85 in docs/src/main/asciidoc/rabbitmq.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.CaseSensitiveTerms] Use 'Gradle' rather than 'gradle'. Raw Output: {"message": "[Quarkus.CaseSensitiveTerms] Use 'Gradle' rather than 'gradle'.", "location": {"path": "docs/src/main/asciidoc/rabbitmq.adoc", "range": {"start": {"line": 85, "column": 63}}}, "severity": "INFO"}
.build.gradle
----
implementation("io.quarkus:quarkus-smallrye-reactive-messaging-rabbitmq")
----
====

To create the _processor_ project, from the same directory, run:

Expand Down
27 changes: 24 additions & 3 deletions docs/src/main/asciidoc/rest-client-multipart.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,36 @@ The solution is located in the `rest-client-multipart-quickstart` link:{quicksta

First, we need a new project. Create a new project with the following command:



:create-app-artifact-id: rest-client-multipart-quickstart
:create-app-extensions: rest-client,resteasy,resteasy-multipart
include::{includes}/devtools/create-app.adoc[]

This command generates the Maven project with a REST endpoint and imports the `rest-client` and `resteasy` extensions.
This command generates a Maven project with a REST endpoint and imports the `rest-client` and `resteasy` extensions.
It also adds the `resteasy-multipart` extension to support `multipart/form-data` requests.

If you already have your Quarkus project configured, you can add the `resteasy-multipart` extension
to your project by running the following command in your project base directory:

:add-extension-extensions: resteasy-multipart
include::{includes}/devtools/extension-add.adoc[]

This will add the following to your build file:

[source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"]
.pom.xml
----
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-multipart</artifactId>
</dependency>
----

[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]
.build.gradle
----
implementation("io.quarkus:quarkus-resteasy-multipart")
----

== Setting up the model

In this guide we will be demonstrating how to invoke a REST service accepting `multipart/form-data` input.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/validation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ to your project by running the following command in your project base directory:
:add-extension-extensions: hibernate-validator
include::{includes}/devtools/extension-add.adoc[]

The result of this command is dependent on your build tool:
This will add the following to your build file:

[source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"]
.pom.xml
Expand Down

0 comments on commit baf0b76

Please sign in to comment.