Skip to content

Commit

Permalink
Merge pull request #36465 from gsmet/add-extensions
Browse files Browse the repository at this point in the history
Be more consistent in guides when creating projects/adding extensions
  • Loading branch information
Sanne authored Oct 13, 2023
2 parents 89c47f4 + baf0b76 commit b3a623a
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
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
----
// 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.
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
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

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
----
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:

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:
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:

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"]
.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 b3a623a

Please sign in to comment.