Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to Quarkus 3.14.3 #591

Merged
merged 5 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions quarkus-workshop-super-heroes/docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The default build will take around 50m.
<!-- Note! Any versions listed here should have a dummy dependency clause so dependabot manages the versions -->
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
<quarkus.platform.version>3.6.0</quarkus.platform.version>
<quarkus.platform.version>3.14.3</quarkus.platform.version>
<quarkus.pact.version>1.3.0</quarkus.pact.version>
<semantic-kernel.version>0.2.11-alpha</semantic-kernel.version>
<compiler-plugin.version>3.11.0</compiler-plugin.version>
Expand Down Expand Up @@ -153,7 +153,7 @@ The default build will take around 50m.
<jdk-version>${maven.compiler.source}</jdk-version>
<!-- NOTE! Any version listed here should have an entry in the dependencies, so that dependabot keeps docs in sync with implementation -->
<graalvm-version>22.3</graalvm-version>
<maven-version>3.8.x</maven-version>
<maven-version>3.9.x</maven-version>
<quarkus-version>${quarkus.platform.version}</quarkus-version>
<compiler-plugin-version>${compiler-plugin.version}</compiler-plugin-version>
<surefire-plugin-version>${surefire-plugin.version}</surefire-plugin-version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,6 @@ endif::use-mac[]

Once installed, define the `GRAALVM_HOME` environment variable to point to the directory where GraalVM is installed (eg. on Mac OS X it could be `~/.sdkman/candidates/java/{graalvm-version}.r{jdk-version}-grl`).

The `native-image` tool must be installed.
It can be done by running the following command under `$GRAALVM_HOME/bin`

[source,shell]
----
./gu install native-image
----

from your GraalVM `bin` directory.

ifdef::use-mac[]
[NOTE]
Expand Down Expand Up @@ -141,6 +132,8 @@ You should get something like:

[source,shell]
----
GraalVM 22.3.1 Java 17 CE (Java Version 17.0.6+10-jvmci-22.3-b13)
native-image 22.0.2 2024-07-16
OpenJDK Runtime Environment Mandrel-24.0.2.0-Final (build 22.0.2+9)
OpenJDK 64-Bit Server VM Mandrel-24.0.2.0-Final (build 22.0.2+9, mixed mode)
----

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Open a terminal and run the following command:
-DprojectArtifactId=rest-fights \
-DclassName="io.quarkus.workshop.superheroes.fight.FightResource" \
-Dpath="api/fights" \
-Dextensions="jdbc-postgresql,hibernate-orm-panache,hibernate-validator,quarkus-resteasy-reactive-jackson,smallrye-openapi,kafka"
-Dextensions="jdbc-postgresql,hibernate-orm-panache,hibernate-validator,rest-jackson,smallrye-openapi,kafka"
----

If you open the `pom.xml` file, you will see that the following extensions have been imported:
Expand All @@ -36,7 +36,7 @@ If you open the `pom.xml` file, you will see that the following extensions have
* `io.quarkus:quarkus-hibernate-validator`
* `io.quarkus:quarkus-smallrye-openapi`
* `io.quarkus:quarkus-messaging-kafka`
* `io.quarkus:quarkus-resteasy-reactive-jackson`
* `io.quarkus:quarkus-rest-jackson`
* `io.quarkus:quarkus-jdbc-postgresql`
--

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ include::{plantDir}/3-reactive-physical-architecture.puml[]
In the following sections, you will learn:

* How to create a new reactive Quarkus application
* How to implement REST API using JAX-RS and the RESTEasy Reactive extension using a reactive development model
* How to implement REST API using JAX-RS and the Quarkus REST extension using a reactive development model
* How to access your database using Hibernate Reactive with Panache
* How to use transactions the reactive way

Expand Down Expand Up @@ -54,13 +54,13 @@ Open a terminal and run the following command under the `quarkus-workshop-super-
-DprojectArtifactId=rest-heroes \
-DclassName="io.quarkus.workshop.superheroes.hero.HeroResource" \
-Dpath="api/heroes" \
-Dextensions="resteasy-reactive-jackson,quarkus-hibernate-validator,quarkus-smallrye-openapi,quarkus-hibernate-reactive-panache,quarkus-reactive-pg-client"
-Dextensions="rest-jackson,quarkus-hibernate-validator,quarkus-smallrye-openapi,quarkus-hibernate-reactive-panache,quarkus-reactive-pg-client"
----
--

As you can see, we can select multiple extensions during the project creation:

* `resteasy-reactive-jackson` provides RESTEasy Reactive and the ability to map JSON objects,
* `rest-jackson` provides Quarkus REST and the ability to map JSON objects,
* `quarkus-hibernate-validator` provides the Hibernate Validator support,
* `quarkus-smallrye-openapi` provides the OpenAPI descriptor support and the Swagger UI in the dev console,
* `quarkus-hibernate-reactive-panache` provides Panache entity supports using Hibernate Reactive, an ORM using reactive database drivers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ Open a terminal and run the following command under the `quarkus-workshop-super-
-DprojectArtifactId=rest-villains \
-DclassName="io.quarkus.workshop.superheroes.villain.VillainResource" \
-Dpath="api/villains" \
-Dextensions="resteasy-reactive-jackson"
-Dextensions="rest-jackson"
----

[NOTE]
====
Notice that we scaffold the project with a reactive implementation of RestEasy (`resteasy-reactive-jackson`).
Notice that we scaffold the project with Quarkus REST (`rest-jackson`).
This is the recommended way to develop REST applications with Quarkus even if we use the imperative programming model in the Villain microservice.
====

Remember that `mvnw` is the maven wrapper. It behaves like `mvn`,
but allows a project's build dependencies to be encapsulated.

The last line selects the extension we want to use.
As a start, we only select `resteasy-reactive-jackson`, which will also import `resteasy-reactive`.
As a start, we only select `rest-jackson`, which will also import `rest`.

If you want your IDE to manage this new Maven project, you can declare it in the parent POM (`quarkus-super-heroes/pom.xml`) by adding this new module in the `<modules>` section:

Expand All @@ -45,7 +45,7 @@ If you want your IDE to manage this new Maven project, you can declare it in the
[TIP]
.Prefer a Web UI?
====
Instead of the Maven command, you can use https://code.quarkus.io and select the `resteasy-reactive-jackson` extension.
Instead of the Maven command, you can use https://code.quarkus.io and select the `rest-jackson` extension.
====

== Directory Structure
Expand Down Expand Up @@ -165,7 +165,7 @@ In addition, you can see the `quarkus-maven-plugin` responsible for the packagin
</project>
----

If we focus on the dependencies section, you can see the extensions allowing the development of REST applications (resteasy-reactive and resteasy-reactive-jackson)
If we focus on the dependencies section, you can see the extensions allowing the development of REST applications (`rest` and `rest-jackson`)

[source,xml,indent=0]
----
Expand All @@ -176,11 +176,11 @@ If we focus on the dependencies section, you can see the extensions allowing the
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
<artifactId>quarkus-rest</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-jackson</artifactId>
<artifactId>quarkus-rest-jackson</artifactId>
</dependency>
<!-- ... -->
</dependencies>
Expand All @@ -189,9 +189,9 @@ If we focus on the dependencies section, you can see the extensions allowing the
* `quarkus-arc` is the dependency injection framework integrated into Quarkus.
It's designed to perform build-time injections.
We will see later why this is essential for Quarkus.
* `resteasy-reactive` is the framework we will use to implement our REST API.
* `quarkus-rest` is the framework we will use to implement our REST API.
It uses JAX-RS annotations such as `@Path`, `@GET`...
* `reasteasy-reactive-jackson` adds JSON object mapping capabilities to RESTEasy reactive.
* `quarkus-rest-jackson` adds JSON object mapping capabilities to Quarkus REST.

== The Villain Resource

Expand All @@ -212,7 +212,7 @@ public class VillainResource {
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
return "Hello from RESTEasy Reactive";
return "Hello from Quarkus REST";
}
}
----
Expand Down Expand Up @@ -263,7 +263,7 @@ __ ____ __ _____ ___ __ ____ ______
2022-11-15 14:05:29,414 INFO [io.quarkus] (Quarkus Main Thread) rest-villains 1.0.0-SNAPSHOT on JVM (powered by Quarkus {quarkus-version}) started in 1.093s. Listening on: http://localhost:8080

2022-11-15 14:05:29,423 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated.
2022-11-15 14:05:29,423 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, vertx]
2022-11-15 14:05:29,423 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, rest, rest-jackson, smallrye-context-propagation, vertx]

Tests paused
Press [r] to resume testing, [o] Toggle test output, [:] for the terminal, [h] for more options>
Expand All @@ -280,7 +280,7 @@ You should see the following

[source,shell]
----
Hello from RESTEasy Reactive
Hello from Quarkus REST
----

Alternatively, you can open http://localhost:8080/api/villains in your browser.
Expand Down Expand Up @@ -377,7 +377,7 @@ public class VillainResourceTest {
.when().get("/api/villains")
.then()
.statusCode(200)
.body(is("Hello from RESTEasy Reactive"));
.body(is("Hello from Quarkus REST"));
}

}
Expand Down Expand Up @@ -416,7 +416,7 @@ Unfortunately, this first run didn't end well:
2022-11-15 14:13:17,925 ERROR [io.qua.test] (Test runner thread) Test VillainResourceTest#testHelloEndpoint() failed
: java.lang.AssertionError: 1 expectation failed.
Response body doesn't match expectation.
Expected: is "Hello from RESTEasy Reactive"
Expected: is "Hello from Quarkus REST"
Actual: Hello Villain Resource

at io.restassured.internal.ValidatableResponseImpl.body(ValidatableResponseImpl.groovy)
Expand All @@ -426,7 +426,7 @@ Expected: is "Hello from RESTEasy Reactive"
2022-11-15 14:13:17,927 ERROR [io.qua.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> Summary: <<<<<<<<<<<<<<<<<<<<
io.quarkus.workshop.superheroes.villain.VillainResourceTest#testHelloEndpoint(VillainResourceTest.java:18) VillainResourceTest#testHelloEndpoint() 1 expectation failed.
Response body doesn't match expectation.
Expected: is "Hello from RESTEasy Reactive"
Expected: is "Hello from Quarkus REST"
Actual: Hello Villain Resource

2022-11-15 14:13:17,929 ERROR [io.qua.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> 1 TEST FAILED <<<<<<<<<<<<<<<<<<<<
Expand All @@ -435,7 +435,7 @@ Expected: is "Hello from RESTEasy Reactive"
2022-11-15 14:13:18,155 ERROR [io.qua.test] (Test runner thread) Test VillainResourceTest#testHelloEndpoint() failed
: java.lang.AssertionError: 1 expectation failed.
Response body doesn't match expectation.
Expected: is "Hello from RESTEasy Reactive"
Expected: is "Hello from Quarkus REST"
Actual: Hello Villain Resource

at io.restassured.internal.ValidatableResponseImpl.body(ValidatableResponseImpl.groovy)
Expand All @@ -445,7 +445,7 @@ Expected: is "Hello from RESTEasy Reactive"
2022-11-15 14:13:18,156 ERROR [io.qua.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> Summary: <<<<<<<<<<<<<<<<<<<<
io.quarkus.workshop.superheroes.villain.VillainResourceTest#testHelloEndpoint(VillainResourceTest.java:18) VillainResourceTest#testHelloEndpoint() 1 expectation failed.
Response body doesn't match expectation.
Expected: is "Hello from RESTEasy Reactive"
Expected: is "Hello from Quarkus REST"
Actual: Hello Villain Resource

2022-11-15 14:13:18,157 ERROR [io.qua.test] (Test runner thread) >>>>>>>>>>>>>>>>>>>> 1 TEST FAILED <<<<<<<<<<<<<<<<<<<<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ To add the required dependencies, just run the following command under the `supe
----
--

TIP: No need to add an extension for JSON, we already included `resteasy-reactive-jackson`.
TIP: No need to add an extension for JSON, we already included `rest-jackson`.

This will add the following dependencies in the `pom.xml` file:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ include::{plantDir}/1-rest-physical-architecture.puml[]
In the following sections, you learn:

* How to create a new Quarkus application
* How to implement REST API using JAX-RS and the RESTEasy Reactive extensionfootnote:[RESTEasy Reactive support the reactive and imperative development models.]
* How to implement REST API using JAX-RS and the Quarkus REST extension footnote:[Quarkus REST supports the reactive and imperative development models.]
* How to compose your application using beans
* How to access your database using Hibernate ORM with Panache
* How to use transactions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ Open a terminal and run the following command under the `quarkus-workshop-super-
-DprojectArtifactId=rest-narration \
-DclassName="io.quarkus.workshop.superheroes.narration.NarrationResource" \
-Dpath="api/narration" \
-Dextensions="resteasy-reactive-jackson,quarkus-smallrye-openapi,quarkus-smallrye-fault-tolerance"
-Dextensions="rest-jackson,quarkus-smallrye-openapi,quarkus-smallrye-fault-tolerance"
----
--

This microservice needs less dependencies than the previous ones:

* `resteasy-reactive-jackson` provides RESTEasy Reactive and the ability to map JSON objects,
* `rest-jackson` provides Quarkus REST and the ability to map JSON objects,
* `quarkus-smallrye-openapi` provides the OpenAPI descriptor support and the Swagger UI in the dev console,
* `quarkus-smallrye-fault-tolerance` provides the MicroProfile Fault Tolerance dependency so we can fallback in case OpenAI/Azure OpenAI does not respond.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Open a terminal and run the following command:
-DprojectArtifactId=event-statistics \
-DclassName="io.quarkus.workshop.superheroes.statistics.StatisticResource" \
-Dpath="api/stats" \
-Dextensions="kafka, resteasy-reactive-jackson, websockets"
-Dextensions="kafka, rest-jackson, websockets"
----
--

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ And the version will be displayed:
----
10:16:58 INFO [io.qu.wo.su.ve.ru.VersionRecorder] (Quarkus Main Thread) Version: 1.0.0-SNAPSHOT
...
10:17:00 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [agroal, cdi, extension-version, hibernate-orm, hibernate-orm-panache, hibernate-validator, jdbc-postgresql, narayana-jta, resteasy-reactive, resteasy-reactive-jackson, smallrye-context-propagation, smallrye-health, smallrye-openapi, swagger-ui, vertx]
10:17:00 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [agroal, cdi, extension-version, hibernate-orm, hibernate-orm-panache, hibernate-validator, jdbc-postgresql, narayana-jta, rest, rest-jackson, smallrye-context-propagation, smallrye-health, smallrye-openapi, swagger-ui, vertx]
----

== Conclusion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
= Quarkus Super-Heroes Workshop: {docdate} Quarkus {quarkus-version}
Emmanuel Bernard; Clement Escoffier; Antonio Goncalves; Aurea Munoz Hernandez; Georgios Andrianakis; Holly Cummins
Emmanuel Bernard; Clement Escoffier; Antonio Goncalves; Aurea Munoz Hernandez; Georgios Andrianakis; Holly Cummins; George Gastaldi
:doctype: book
:source-highlighter: coderay
:source-language: java
Expand Down
Loading