Skip to content

Commit

Permalink
Merge pull request #39466 from gsmet/3.8.3-backports-1
Browse files Browse the repository at this point in the history
3.8.3 backports 1
  • Loading branch information
gsmet committed Mar 15, 2024
2 parents 4d11d80 + c73bb1e commit d52f3bc
Show file tree
Hide file tree
Showing 141 changed files with 2,405 additions and 395 deletions.
34 changes: 29 additions & 5 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
<jboss-metadata-web.version>16.0.0.Final</jboss-metadata-web.version>
<maven-toolchain.version>3.0-alpha-2</maven-toolchain.version>
<plexus-component-annotations.version>2.1.0</plexus-component-annotations.version>
<graal-sdk.version>23.0.1</graal-sdk.version>
<!-- GraalVM sdk 23.1.2 has a minimum JDK requirement of 17+ at runtime -->
<graal-sdk.version>23.1.2</graal-sdk.version>
<gizmo.version>1.7.0</gizmo.version>
<jackson-bom.version>2.16.1</jackson-bom.version>
<commons-logging-jboss-logging.version>1.0.0.Final</commons-logging-jboss-logging.version>
Expand Down Expand Up @@ -145,10 +146,10 @@
<infinispan.protostream.version>4.6.5.Final</infinispan.protostream.version>
<caffeine.version>3.1.5</caffeine.version>
<netty.version>4.1.107.Final</netty.version>
<brotli4j.version>1.14.0</brotli4j.version>
<brotli4j.version>1.16.0</brotli4j.version>
<reactive-streams.version>1.0.4</reactive-streams.version>
<jboss-logging.version>3.5.3.Final</jboss-logging.version>
<mutiny.version>2.5.7</mutiny.version>
<mutiny.version>2.5.8</mutiny.version>
<kafka3.version>3.6.1</kafka3.version>
<lz4.version>1.8.0</lz4.version> <!-- dependency of the kafka-clients that could be overridden by other imported BOMs in the platform -->
<snappy.version>1.1.10.5</snappy.version>
Expand Down Expand Up @@ -198,7 +199,7 @@
<scram-client.version>2.1</scram-client.version>
<picocli.version>4.7.5</picocli.version>
<google-cloud-functions.version>1.1.0</google-cloud-functions.version>
<commons-compress.version>1.26.0</commons-compress.version>
<commons-compress.version>1.26.1</commons-compress.version> <!-- Please check with Java Operator SDK / Fabric8 team before updating -->
<commons-text.version>1.11.0</commons-text.version>
<gson.version>2.10.1</gson.version>
<log4j2-jboss-logmanager.version>1.1.2.Final</log4j2-jboss-logmanager.version>
Expand Down Expand Up @@ -4402,13 +4403,36 @@
<artifactId>jakarta.ws.rs-api</artifactId>
<version>${jakarta.ws.rs-api.version}</version>
</dependency>
<!-- graal-sdk should be avoided, keeping it temporarily for compatibility reasons -->
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<version>${graal-sdk.version}</version>
<!--
This is used as a workaround to avoid having polyglot in the classpath when graal-sdk is added.
Polyglot wasn't around until now with the old graal-sdk so it should be relatively safe
until we drop graal-sdk entirely from the BOM.
-->
<exclusions>
<exclusion>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>polyglot</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>nativeimage</artifactId>
<version>${graal-sdk.version}</version>
</dependency>
<dependency>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>js-community</artifactId>
<version>${graal-sdk.version}</version>
</dependency>
<!-- Same but for GraalVM Enterprise -->
<dependency>
<groupId>org.graalvm.js</groupId>
<groupId>org.graalvm.polyglot</groupId>
<artifactId>js</artifactId>
<version>${graal-sdk.version}</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion core/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
</dependency>
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<artifactId>nativeimage</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,14 @@ private NativeImageSourceJarBuildItem buildNativeImageThinJar(CurateOutcomeBuild
removedArtifacts.add("org.graalvm.sdk:word");
removedArtifacts.add("org.graalvm.sdk:collections");

// complain if graal-sdk is present as a dependency as nativeimage should be preferred
if (curateOutcomeBuildItem.getApplicationModel().getDependencies().stream()
.anyMatch(d -> d.getGroupId().equals("org.graalvm.sdk") && d.getArtifactId().equals("graal-sdk"))) {
log.warn("org.graalvm.sdk:graal-sdk is present in the classpath. "
+ "From Quarkus 3.8 and onwards, org.graalvm.sdk:nativeimage should be preferred. "
+ "Make sure you report the issue to the maintainers of the extensions that bring it.");
}

doLegacyThinJarGeneration(curateOutcomeBuildItem, outputTargetBuildItem, transformedClasses,
applicationArchivesBuildItem, applicationInfo, packageConfig, generatedResources, libDir, allClasses,
runnerZipFs, mainClassBuildItem, classLoadingConfig);
Expand Down
37 changes: 29 additions & 8 deletions core/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
</dependency>
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<artifactId>nativeimage</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -156,12 +156,22 @@
<parentFirstArtifact>io.smallrye.common:smallrye-common-net</parentFirstArtifact>
<parentFirstArtifact>io.smallrye.common:smallrye-common-os</parentFirstArtifact>
<parentFirstArtifact>io.smallrye.common:smallrye-common-ref</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.sdk:graal-sdk</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.js:js</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.sdk:nativeimage</parentFirstArtifact>
<!-- support for GraalVM js -->
<parentFirstArtifact>org.graalvm.polyglot:js-community</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.js:js-language</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.polyglot:js</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.polyglot:polyglot</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.regex:regex</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.truffle:truffle-api</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.nativeimage:svm</parentFirstArtifact>
<parentFirstArtifact>com.ibm.icu:icu4j</parentFirstArtifact> <!-- dependency of org.graalvm.js:js -->
<parentFirstArtifact>org.graalvm.truffle:truffle-runtime</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.truffle:truffle-compiler</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.truffle:truffle-enterprise</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.shadowed:icu4j</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.sdk:jniutils</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.sdk:word</parentFirstArtifact>
<parentFirstArtifact>org.graalvm.sdk:native-bridge</parentFirstArtifact>
<!-- /support for GraalVM js -->
<parentFirstArtifact>io.quarkus:quarkus-bootstrap-core</parentFirstArtifact>
<parentFirstArtifact>io.quarkus:quarkus-development-mode-spi</parentFirstArtifact>
<parentFirstArtifact>io.quarkus:quarkus-bootstrap-app-model</parentFirstArtifact>
Expand Down Expand Up @@ -206,11 +216,22 @@
<parentFirstArtifact>org.jboss.byteman:byteman</parentFirstArtifact>
</parentFirstArtifacts>
<runnerParentFirstArtifacts>
<runnerParentFirstArtifact>org.graalvm.sdk:graal-sdk</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.js:js</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.sdk:nativeimage</runnerParentFirstArtifact>
<!-- support for GraalVM js -->
<runnerParentFirstArtifact>org.graalvm.polyglot:js-community</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.js:js-language</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.polyglot:js</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.polyglot:polyglot</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.regex:regex</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.truffle:truffle-api</runnerParentFirstArtifact>
<runnerParentFirstArtifact>com.ibm.icu:icu4j</runnerParentFirstArtifact> <!-- dependency of org.graalvm.js:js -->
<runnerParentFirstArtifact>org.graalvm.truffle:truffle-runtime</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.truffle:truffle-compiler</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.truffle:truffle-enterprise</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.shadowed:icu4j</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.sdk:jniutils</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.sdk:word</runnerParentFirstArtifact>
<runnerParentFirstArtifact>org.graalvm.sdk:native-bridge</runnerParentFirstArtifact>
<!-- /support for GraalVM js -->
<runnerParentFirstArtifact>io.quarkus:quarkus-bootstrap-runner</runnerParentFirstArtifact>
<runnerParentFirstArtifact>io.quarkus:quarkus-development-mode-spi</runnerParentFirstArtifact>
<!-- logging dependencies always need to be loaded by the JDK ClassLoader -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ void generateBuild() {
SmallRyeConfig config = extension().buildEffectiveConfiguration(appModel.getAppArtifact()).getConfig();
Map<String, String> quarkusProperties = Expressions.withoutExpansion(() -> {
Map<String, String> values = new HashMap<>();
config.getValues("quarkus", String.class, String.class)
.forEach((key, value) -> values.put("quarkus." + key, value));
for (String key : config.getMapKeys("quarkus").values()) {
values.put(key, config.getConfigValue(key).getValue());
}
return values;
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -51,10 +53,15 @@ public void dumpEffectiveConfiguration() {
List<String> sourceNames = new ArrayList<>();
config.getConfigSources().forEach(configSource -> sourceNames.add(configSource.getName()));

String quarkusConfig = config.getValues("quarkus", String.class, String.class)
Map<String, String> values = new HashMap<>();
for (String key : config.getMapKeys("quarkus").values()) {
values.put(key, config.getConfigValue(key).getValue());
}

String quarkusConfig = values
.entrySet()
.stream()
.map(e -> format("quarkus.%s=%s", e.getKey(), e.getValue())).sorted()
.map(e -> format("%s=%s", e.getKey(), e.getValue())).sorted()
.collect(Collectors.joining("\n ", "\n ", "\n"));
getLogger().lifecycle("Effective Quarkus configuration options: {}", quarkusConfig);

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/building-my-first-extension.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ Edsger W. Dijkstra
==== Debugging your application build

Since your extension deployment is made during the application build, this process is triggered by your build tool.
That means if you want to debug this phase you need to launch your build tool with the remote debug mode switched one.
That means if you want to debug this phase you need to launch your build tool with the remote debug mode switched on.

===== Maven

Expand Down
33 changes: 33 additions & 0 deletions docs/src/main/asciidoc/config-mappings.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,39 @@ server.form.landing-page=index.html
The configuration property needs to specify an additional name to act as the key. In this case the `form()` `Map` will
contain three elements with the keys `login-page`, `error-page` and `landing-page`.

It also works for groups:
[source,java]
----
@ConfigMapping(prefix = "server")
public interface Servers {
@WithParentName
Map<String, Server> allServers();
}
public interface Server {
String host();
int port();
String login();
String error();
String landing();
}
----
.application.properties
[source,properties]
----
server."my-server".host=localhost
server."my-server".port=8080
server."my-server".login=login.html
server."my-server".error=error.html
server."my-server".landing=index.html
----
In this case the `allServers()` `Map` will
contain one `Server` element with the key `my-server`.

=== Defaults

The `@WithDefault` annotation allows to set a default property into a mapping (and prevent and error if the
Expand Down
44 changes: 22 additions & 22 deletions docs/src/main/asciidoc/datasource.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Applications use datasources to access relational databases.
Quarkus provides a unified configuration model to define datasources for Java Database Connectivity (JDBC) and Reactive database drivers.

Quarkus uses link:https://agroal.github.io/[Agroal] and link:https://vertx.io/[Vert.x] to provide high-performance, scalable data source connection pooling for JDBC and reactive drivers.
The `jdbc-\*` and `reactive-*` extensions provide build time optimizations and integrate configured data sources with Quarkus features like security, health checks, and metrics.
The `quarkus-jdbc-\*` and `quarkus-reactive-*-client` extensions provide build time optimizations and integrate configured data sources with Quarkus features like security, health checks, and metrics.

For more information about consuming and using a reactive datasource, see the Quarkus xref:reactive-sql-clients.adoc[Reactive SQL clients] guide.

Expand Down Expand Up @@ -62,14 +62,14 @@ For more details and optional configurations, see xref:databases-dev-services.ad

. Add the correct JDBC extension for the database of your choice.

* `jdbc-db2`
* `jdbc-derby`
* `jdbc-h2`
* `jdbc-mariadb`
* `jdbc-mssql`
* `jdbc-mysql`
* `jdbc-oracle`
* `jdbc-postgresql`
* `quarkus-jdbc-db2`
* `quarkus-jdbc-derby`
* `quarkus-jdbc-h2`
* `quarkus-jdbc-mariadb`
* `quarkus-jdbc-mssql`
* `quarkus-jdbc-mysql`
* `quarkus-jdbc-oracle`
* `quarkus-jdbc-postgresql`

. Configure your JDBC datasource:
+
Expand Down Expand Up @@ -101,11 +101,11 @@ For more information about pool size adjustment properties, see the <<jdbc-confi

. Add the correct reactive extension for the database of your choice.

* `reactive-db2-client`
* `reactive-mssql-client`
* `reactive-mysql-client`
* `reactive-oracle-client`
* `reactive-pg-client`
* `quarkus-reactive-db2-client`
* `quarkus-reactive-mssql-client`
* `quarkus-reactive-mysql-client`
* `quarkus-reactive-oracle-client`
* `quarkus-reactive-pg-client`

. Configure your reactive datasource:
+
Expand Down Expand Up @@ -185,21 +185,21 @@ JDBC is the most common database connection pattern, typically needed when used

.. For use with a built-in JDBC driver, choose and add the Quarkus extension for your relational database driver from the list below:
+
* Derby - `jdbc-derby`
* H2 - `jdbc-h2`
* Derby - `quarkus-jdbc-derby`
* H2 - `quarkus-jdbc-h2`
+
[NOTE]
====
H2 and Derby databases can be configured to run in "embedded mode"; however, the Derby extension does not support compiling the embedded database engine into native executables.
Read <<in-memory-databases,Testing with in-memory databases>> for suggestions regarding integration testing.
====
* DB2 - `jdbc-db2`
* MariaDB - `jdbc-mariadb`
* Microsoft SQL Server - `jdbc-mssql`
* MySQL - `jdbc-mysql`
* Oracle - `jdbc-oracle`
* PostgreSQL - `jdbc-postgresql`
* DB2 - `quarkus-jdbc-db2`
* MariaDB - `quarkus-jdbc-mariadb`
* Microsoft SQL Server - `quarkus-jdbc-mssql`
* MySQL - `quarkus-jdbc-mysql`
* Oracle - `quarkus-jdbc-oracle`
* PostgreSQL - `quarkus-jdbc-postgresql`
* Other JDBC extensions, such as link:https://github.com/quarkiverse/quarkus-jdbc-sqlite[SQLite] and its link:https://quarkiverse.github.io/quarkiverse-docs/quarkus-jdbc-sqlite/dev/index.html[documentation], can be found in the https://github.com/quarkiverse[Quarkiverse].
+
For example, to add the PostgreSQL driver dependency:
Expand Down
Loading

0 comments on commit d52f3bc

Please sign in to comment.