Skip to content

Commit cc0c521

Browse files
committed
Initial copy of wiki content
1 parent 8647038 commit cc0c521

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+5107
-0
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
## Hibernate Search + Elasticsearch (Preview)
2+
3+
`quarkus.hibernate-search.elasticsearch.automatic-indexing.synchronization.strategy` has been renamed to `quarkus.hibernate-search.automatic-indexing.synchronization.strategy`.
4+
5+
If you are using our Hibernate Search + Elasticsearch extension, there's a good chance you will need to adjust your configuration.
6+
7+
## Neo4j (Preview)
8+
9+
The Neo4j driver was updated to the Final 4.0 version and they have renamed a few classes, most notably `org.neo4j.driver.reactive.RxResult.RxStatementResult` has been renamed to `org.neo4j.driver.reactive.RxResult`.
10+
11+
## Gradle plugin
12+
13+
We now recommend using Gradle 6.0.1+. Starting from this version the Gradle plugin is no longer deployed in Maven Central, therefore some minor changes in your Gradle project might be needed.
14+
15+
### Changes in the `settings.gradle` file
16+
17+
Let's start by changing the `settings.gradle` file. It should be changed from (`rootProject.name` value may vary depending on your project name):
18+
19+
```gradle
20+
pluginManagement {
21+
repositories {
22+
mavenLocal()
23+
mavenCentral()
24+
gradlePluginPortal()
25+
}
26+
resolutionStrategy {
27+
eachPlugin {
28+
if (requested.id.id == 'io.quarkus') {
29+
useModule("io.quarkus:quarkus-gradle-plugin:1.0.1.Final")
30+
}
31+
}
32+
}
33+
}
34+
35+
rootProject.name='my-project'
36+
```
37+
to:
38+
```gradle
39+
pluginManagement {
40+
repositories {
41+
mavenLocal()
42+
mavenCentral()
43+
gradlePluginPortal()
44+
}
45+
plugins {
46+
id 'io.quarkus' version "${quarkusPluginVersion}"
47+
}
48+
}
49+
rootProject.name='my-project'
50+
```
51+
52+
NOTE: the `plugins{}` method is not supported in Gradle 5.x. In this case make sure to explicitly declare the plugin version in the `build.gradle` file.
53+
54+
### Changes in the `build.gradle` file
55+
56+
Change your `build.gradle` file to use the plugin DSL format, from:
57+
58+
```gradle
59+
// this block is necessary to make enforcedPlatform work for Quarkus plugin available
60+
// only locally (snapshot) that is also importing the Quarkus BOM
61+
buildscript {
62+
repositories {
63+
mavenLocal()
64+
}
65+
dependencies {
66+
classpath "io.quarkus:quarkus-gradle-plugin:${quarkusPluginVersion}"
67+
}
68+
}
69+
70+
plugins {
71+
id 'java'
72+
}
73+
74+
apply plugin: 'io.quarkus'
75+
```
76+
to:
77+
```gradle
78+
plugins {
79+
id 'java'
80+
id 'io.quarkus'
81+
}
82+
83+
```
84+
85+
## Extension framework
86+
87+
### Updated configuration framework
88+
89+
Our configuration framework got a big update to fix a number of issues all around.
90+
91+
The main consequence of this change is that you will need to mark optional collections and maps as `Optional` in your config classes (that means `Optional<List<String>>` for instance).
92+
93+
### GizmoAdaptor
94+
95+
The `GizmoAdaptor` class has been renamed to `GeneratedClassGizmoAdaptor`, due to the introduction of `GeneratedBeanGizmoAdaptor`.

_migrations/Migration-Guide-1.10.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Hibernate ORM
2+
3+
* `quarkus.hibernate-orm.log.bind-param` is deprecated and has been renamed `quarkus.hibernate-orm.log.bind-parameters`. The former will be removed at a later stage.
4+
5+
## Hibernate Search ORM + Elasticsearch (Preview)
6+
7+
* You should update your Maven/Gradle dependencies: replace any occurrence of the artifact ID `hibernate-search-elasticsearch` with `hibernate-search-orm-elasticsearch`
8+
* You should update your configuration: replace any occurrence of the prefix `quarkus.hibernate-search.` with `quarkus.hibernate-search-orm.
9+
* Many deprecated methods and classes were removed. For more information: https://in.relation.to/2020/11/04/hibernate-search-6-0-0-CR1/#breaking_changes
10+
* Async/reactive methods now return `CompletionStage` instead of `CompletableFuture`. To convert a `CompletionStage` to a `Future`, call `.toCompletableFuture()`.`
11+
12+
## MongoDB
13+
14+
* The name of the default client is now `<default>` instead of the previous `__default__` to be more consistent with the rest of the code base. It shouldn't have too many consequences but typically the health checks now expose the new name.

_migrations/Migration-Guide-1.11.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
## Log min-level
2+
3+
If you are using TRACE (or DEBUG too if using 1.11.0.Final or 1.11.1.Final - changed in 1.11.2.Final) log level, we made an important change in our logging layer: a new build-time `min-level` configuration property was introduced that sets the minimum log level you will be able to use at runtime.
4+
5+
So if you are logging at TRACE level for some loggers, setting `min-level` to TRACE is required.
6+
7+
## Non-application endpoints moved to their own namespace
8+
9+
[Path resolution for configurable endpoints](https://quarkus.io/blog/path-resolution-in-quarkus/) changed in this release. This transition was a little rough. There are some differences in behavior between 1.11.0.Final, when this was introduced, and 1.11.5.Final, when issues were resolved.
10+
11+
By default, non-application endpoints, like health and metrics, are now grouped under `/q`.
12+
13+
Convenience redirects from previous URLs to new namespaced URLs can be enabled and disabled by setting:
14+
`quarkus.http.redirect-to-non-application-root-path=false`
15+
16+
Disable the Quarkus non-application endpoints by setting the non-application endpoint root to be the same as the http root:
17+
`quarkus.http.non-application-root-path=${quarkus.http.root-path}`
18+
19+
You can customize the root used for non-application endpoints by setting `quarkus.http.non-application-root-path` to an alternative path.
20+
21+
As of 1.11.5.Final, leading slashes in configured paths are significant. Please see [Path resolution in Quarkus](https://quarkus.io/blog/path-resolution-in-quarkus/) for more details and examples.
22+
23+
## Jackson
24+
25+
The default `ObjectMapper` obtained via CDI and consumed by the Quarkus extensions now ignores unknown properties (by disabling the `DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES` feature).
26+
27+
See https://quarkus.io/guides/rest-json#jackson for more details about how to go back to the previous behavior.
28+
29+
## Kubernetes Client
30+
31+
We upgraded the Kubernetes Client to version 5. Please refer to the [Kubernetes Client migration guide](https://github.com/fabric8io/kubernetes-client/blob/master/doc/MIGRATION-v5.md) for more information.
32+
33+
## Hibernate Search ORM + Elasticsearch
34+
35+
* The default required status for Elasticsearch indexes is now `yellow`. If you have specific requirements and need to wait for indexes to be `green` on startup, set `quarkus.hibernate-search.elasticsearch.schema-management.required-status` to `green`.
36+
* [Queries](https://docs.jboss.org/hibernate/search/6.0/reference/en-US/html_single/#troubleshooting-logging-query)
37+
and [requests](https://docs.jboss.org/hibernate/search/6.0/reference/en-US/html_single/#troubleshooting-logging-elasticsearch-request)
38+
are now logged at the `TRACE` level instead of the `DEBUG` level.
39+
40+
## MongoDB Panache
41+
42+
* A recent change was made to MongoDB panache to bring it in to conformity with the Hibernate Panache behavior. Public field accesses on `MongoEntity` and `ReactiveMongoEntity` types are now wrapped with the appropriate `get` or `set` methods. In general, you will like not see any difference in your application. However, if you have written a custom `get` or `set` method you may notice a change in behavior if those custom methods deviate from the standard `get`/`set` paradigm. See [this issue](https://github.com/quarkusio/quarkus-quickstarts/pull/726) for an example of something you might run in to.
43+
44+
## quarkus-smallrye-jwt-build
45+
46+
A new `quarkus-smallrye-jwt-build` extension has been introduced allowing users to generate JWT tokens without having to depend on `quarkus-smallrye-jwt` extension which is used for verifying JWT tokens.
47+
48+
## GraalVM 20.3
49+
50+
We upgraded the base container image to build native executables to GraalVM 20.3.
51+
52+
However, we hit a regression in the ImageIO support so if you are using ImageIO and seeing errors such as `UnsatisfiedLinkError: no awt in java.library.path`. This regression is specific to GraalVM 20.3.0 and will be fixed in GraalVM 20.3.1. Your options are:
53+
54+
* Go back to GraalVM 20.2 until we upgrade to GraalVM 20.3.1: `quarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:20.2.0-java11`
55+
* Use [Mandrel](https://github.com/graalvm/mandrel/releases) in which we backported some additional ImageIO support from GraalVM master: `quarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel:20.3-java11`

_migrations/Migration-Guide-1.12.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
## Fast-jar as default
2+
3+
Fast-jar is a new Quarkus application packaging format that is faster to boot, compared to our legacy jar packaging. It was introduced several versions ago and it brings many improvements that made us make it the new default.
4+
5+
### Starting the application
6+
7+
The biggest change here is that to start your Quarkus application, you should now use:
8+
9+
```bash
10+
java -jar target/quarkus-app/quarkus-run.jar
11+
```
12+
13+
(instead of using the versioned `-runner` jar)
14+
15+
This change will concern all your applications as soon as you have upgraded them to 1.12.
16+
17+
When deploying your application, make sure to deploy the entire `quarkus-app` directory.
18+
19+
For those who want to stick to the legacy jar packaging, they can go back to the previous behavior by adding the following property to the `application.properties`:
20+
21+
```properties
22+
quarkus.package.type=legacy-jar
23+
```
24+
25+
### Dockerfiles
26+
27+
For existing applications, you have two Dockerfiles:
28+
29+
- `Dockerfile.jvm`: this is the one for the `legacy-jar` packaging
30+
- `Dockerfile.fast-jar`: this is the one for `fast-jar` packaging (so the new default)
31+
32+
For newly generated applications, the situation is a bit different:
33+
34+
- `Dockerfile.jvm`: this is the one for the `fast-jar` packaging (so the new default)
35+
- `Dockerfile.legacy-jar`: this is the one for `legacy-jar`
36+
37+
Note that if you want all your applications to be consistent, you can just update the Dockerfiles of your existing applications with the ones of a newly generated project.
38+
39+
You can find an example of the new Fast jar Dockerfile [here](https://github.com/quarkusio/quarkus-quickstarts/blob/master/validation-quickstart/src/main/docker/Dockerfile.jvm).
40+
41+
## Quarkus Maven Plugin
42+
43+
We cleaned up a few things in the Quarkus Maven Plugin. Make sure the `quarkus-maven-plugin` section of the `pom.xml` of your project looks like:
44+
45+
```xml
46+
<plugin>
47+
<groupId>io.quarkus</groupId>
48+
<artifactId>quarkus-maven-plugin</artifactId>
49+
<version>${quarkus-plugin.version}</version>
50+
<extensions>true</extensions>
51+
<executions>
52+
<execution>
53+
<goals>
54+
<goal>build</goal>
55+
<goal>generate-code</goal>
56+
<goal>generate-code-tests</goal>
57+
</goals>
58+
</execution>
59+
</executions>
60+
</plugin>
61+
```
62+
63+
## Mutiny
64+
65+
Mutiny has deprecated a few APIs. The deprecated APIs are still available and would work, but are planned for removal.
66+
67+
Changed APIs are:
68+
69+
* `multi.collectItems()` -> `multi.collect()`
70+
* `multi.groupItems()` -> `multi.group()`
71+
* `multi.transform().byTakingFirstItems(long)/byTestingItemsWith()/byFilteringItemsWith()` -> `multi.select().first(long)`, `multi.select().when(Function<T, Uni<?>>)`, `multi.select().where(Predicate<T>)`
72+
* `multi.transform().toHotStream()` -> `multi.toHotStream()`
73+
* `multi.transform().bySkippingFirstItems(long)` -> `multi.skip().first(long)`
74+
75+
Mutiny removes two methods (deprecated for 11 months):
76+
77+
* `uni.subscribeOn` -> `uni.runSubscriptionOn()`
78+
* `multi.subscribeOn` -> `multi.runSubscriptionOn()`
79+
80+
81+
## Mailer
82+
83+
* The `MailTemplateInstance` now returns a `Uni<Void>` instead of `CompletionStage<Void>`. To convert a `Uni` to a `CompletionStage`, call `.subscribeAsCompletionStage()`.
84+
85+
## Vert.x
86+
87+
* The Axle and RX Java API from Vert.x are no more exposed, use the Mutiny API instead. These features were deprecated since February 2020.
88+
89+
## HTTP
90+
91+
A couple of the default file upload settings have changed.
92+
93+
`quarkus.http.body.delete-uploaded-files-on-end` now defaults to `true` (the reason being that no uploaded files should be left over on the server by default).
94+
`quarkus.http.body.uploads-directory` now defaults to `${java.io.tmpdir}/uploads` (the reason being that some application might not have the permissions to write to the current working directory)
95+
96+
97+
[Path resolution for configurable endpoints](https://quarkus.io/blog/path-resolution-in-quarkus/) changed in this release.
98+
99+
By default, non-application endpoints, like health and metrics, are now grouped under `/q`.
100+
101+
Convenience redirects from previous URLs to new namespaced URLs can be enabled and disabled by setting:
102+
`quarkus.http.redirect-to-non-application-root-path=false`
103+
104+
Disable the Quarkus non-application endpoints by setting the non-application endpoint root to be the same as the http root:
105+
`quarkus.http.non-application-root-path=${quarkus.http.root-path}`
106+
107+
You can customize the root used for non-application endpoints by setting `quarkus.http.non-application-root-path` to an alternative path.
108+
109+
As of 1.12.1.Final, leading slashes in configured paths are significant. Please see [Path resolution in Quarkus](https://quarkus.io/blog/path-resolution-in-quarkus/) for more details and examples.
110+
111+
## Rest Client Exceptions
112+
113+
If you are using `quarkus-rest-client` then please be aware that MP REST Client or JAX-RS Client invocation exceptions will no longer have JAX-RS `Response` available by default to avoid leaking some potentially sensitive downstream endpoint data such as cookies. You can set `resteasy.original.webapplicationexception.behavior=true` in `application.properties` if you need to access the exception `Response`.
114+
Please see https://docs.jboss.org/resteasy/docs/4.5.9.Final/userguide/html/ExceptionHandling.html#ResteasyWebApplicationException for more information.
115+
116+
## Version of distroless image
117+
118+
If you are using the distroless image, please note that it now has an immutable version so you might have to update your Dockerfiles to use: `quay.io/quarkus/quarkus-distroless-image:1.0` instead of `quay.io/quarkus/quarkus-distroless-image:20.3-java11`.
119+
120+
121+
## Kafka Health Check
122+
123+
Readiness health checks for _incoming_ Kafka channel may report _DOWN_ if they are consumed lazily (like using SSE). To avoid this, disable the readiness health check:
124+
125+
```
126+
mp.messaging.incoming.your-topic.health-readiness-enabled=false
127+
```

_migrations/Migration-Guide-1.13.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
## Configuration
2+
3+
All `application.properties` files found in the classpath are loaded in the Quarkus configuration. Files in the current application will have priority and files in dependencies will use the classloader order. This means, that your Quarkus application may pick up additional configuration that was not picked up previously and possible change the behaviour of your application.
4+
5+
## Jackson
6+
7+
`SerializationFeature.WRITE_DATES_AS_TIMESTAMPS` is now **disabled** by default which means your temporal types will be serialized as strings (e.g. `1988-11-17T00:00:00Z`) starting 1.13, instead of numeric values.
8+
9+
You can easily go back to the previous behavior by adding `quarkus.jackson.write-dates-as-timestamps=true` to your `application.properties`.
10+
11+
## Live Reload Instrumentation
12+
13+
`quarkus.dev.instrumentation` has been renamed to `quarkus.live-reload.instrumentation` to be more consistent with other configuration properties related to live reload.
14+
15+
## Removal of the `native-image` Maven goal
16+
17+
The goal `native-image` of `quarkus-maven-plugin` had long been deprecated and the plugin had been logging a warning since `1.11.1.Final`.
18+
19+
It has now finally been removed in 1.13. Please remove the plugin execution from your `pom.xml` and simply add the following property to your native profile:
20+
21+
```xml
22+
<properties>
23+
<quarkus.package.type>native</quarkus.package.type>
24+
</properties>
25+
```
26+
27+
In case you have been setting non-default configuration parameters like `<enableHttpsUrlHandler>true</enableHttpsUrlHandler>`, replace those with the respective [documented properties](https://quarkus.io/guides/building-native-image#configuration-reference), e.g. `<quarkus.native.enable-https-url-handler>true</quarkus.native.enable-https-url-handler>`.
28+
29+
## Removal of the Maven `uberJar` and Gradle `--uber-jar` parameters
30+
31+
Both the Maven `uberJar` and the Gradle `--uber-jar` parameters had been deprecated since `1.11.2.Final`/`1.12.0.CR1` and have now been removed in 1.13.
32+
33+
As a replacement, add `quarkus.package.type=uber-jar` to your `application.properties` (or e.g. `pom.xml`).
34+
35+
## New methods signatures in `AuthenticationRequest`
36+
37+
New methods signatures have been added to the `AuthenticationRequest` interface to allow transportation of additional context information with the request such as context path, HTTP header or query parameter values. If you were implementing this interface before, you can now extend `BaseAuthenticationRequest` in 1.13 without having to implement the new methods.
38+
39+
## Kafka
40+
41+
Kafka `group.id` now defaults to application name (as configured by `quarkus.application.name`).
42+
Only if the application name isn't set, a random string is used.
43+
44+
Automatic generation of a random string is merely a development convenience.
45+
You shouldn't rely on it in production.
46+
47+
If you require application instances to have a unique Kafka `group.id`, you should ensure that explicitly.
48+
For example, you can set the `KAFKA_GROUP_ID` environment variable.

0 commit comments

Comments
 (0)