Skip to content

Commit 46aa975

Browse files
authored
Merge pull request #48391 from gsmet/3.24.0-backports-1
[3.24] 3.24.0 backports 1
2 parents a0659db + 2ae4efd commit 46aa975

File tree

91 files changed

+780
-216
lines changed

Some content is hidden

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

91 files changed

+780
-216
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,13 @@ updates:
8282
- dependency-name: org.awaitility:awaitility
8383
- dependency-name: com.thoughtworks.xstream:xstream
8484
- dependency-name: org.jacoco:*
85-
# Maven plugins
85+
# Maven plugins and extensions
8686
- dependency-name: org.apache.maven.plugins:*
8787
- dependency-name: org.codehaus.mojo:*
8888
- dependency-name: io.fabric8:docker-maven-plugin
8989
- dependency-name: net.revelc.code.formatter:formatter-maven-plugin
9090
- dependency-name: net.revelc.code:impsort-maven-plugin
91+
- dependency-name: eu.maveniverse.maven.njord:*
9192
# Narayana
9293
- dependency-name: org.jboss.narayana.jta:*
9394
- dependency-name: org.jboss.narayana.jts:*

.mvn/extensions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@
2727
<extension>
2828
<groupId>eu.maveniverse.maven.njord</groupId>
2929
<artifactId>extension</artifactId>
30-
<version>0.7.4</version>
30+
<version>0.7.5</version>
3131
</extension>
3232
</extensions>

bom/application/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<microprofile-lra.version>2.0.1</microprofile-lra.version>
4848
<microprofile-openapi.version>4.0.2</microprofile-openapi.version>
4949
<smallrye-common.version>2.12.0</smallrye-common.version>
50-
<smallrye-config.version>3.13.1</smallrye-config.version>
50+
<smallrye-config.version>3.13.2</smallrye-config.version>
5151
<smallrye-health.version>4.2.0</smallrye-health.version>
5252
<smallrye-metrics.version>4.0.0</smallrye-metrics.version>
5353
<smallrye-open-api.version>4.0.11</smallrye-open-api.version>
@@ -119,7 +119,7 @@
119119
<quartz.version>2.5.0</quartz.version>
120120
<h2.version>2.3.230</h2.version> <!-- When updating, needs to be matched in io.quarkus.hibernate.orm.runtime.config.DialectVersions
121121
and the dependency jts-core needs to be updated in extensions/jdbc/jdbc-h2/runtime/pom.xml -->
122-
<postgresql-jdbc.version>42.7.6</postgresql-jdbc.version>
122+
<postgresql-jdbc.version>42.7.7</postgresql-jdbc.version>
123123
<mariadb-jdbc.version>3.5.3</mariadb-jdbc.version>
124124
<mysql-jdbc.version>8.3.0</mysql-jdbc.version>
125125
<mssql-jdbc.version>12.10.0.jre11</mssql-jdbc.version>
@@ -194,7 +194,7 @@
194194
<log4j2-api.version>2.24.3</log4j2-api.version>
195195
<log4j-jboss-logmanager.version>1.3.1.Final</log4j-jboss-logmanager.version>
196196
<avro.version>1.12.0</avro.version>
197-
<apicurio-registry.version>2.6.11.Final</apicurio-registry.version>
197+
<apicurio-registry.version>2.6.12.Final</apicurio-registry.version>
198198
<apicurio-common-rest-client.version>0.1.18.Final</apicurio-common-rest-client.version> <!-- must be the version Apicurio Registry uses -->
199199
<testcontainers.version>1.21.1</testcontainers.version> <!-- Make sure to also update docker-java.version to match its needs -->
200200
<docker-java.version>3.4.2</docker-java.version> <!-- must be the version Testcontainers use: https://central.sonatype.com/artifact/org.testcontainers/testcontainers -->

devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ private void registerTasks(Project project, QuarkusPluginExtension quarkusExt) {
249249
QuarkusBuildDependencies.class,
250250
task -> {
251251
configureQuarkusBuildTask(project, task, quarkusBuildAppModelTask, serviceProvider);
252-
253252
task.getOutputs().doNotCacheIf("Dependencies are never cached", t -> true);
254253
});
254+
project.afterEvaluate(evaluated -> addDependencyOnJandexIfConfigured(evaluated, quarkusBuildDependencies));
255255

256256
Property<Boolean> cacheLargeArtifacts = quarkusExt.getCacheLargeArtifacts();
257257

@@ -646,7 +646,7 @@ private void visitProjectDep(Project project, Project dep, Set<String> visited)
646646
}
647647

648648
private void setupQuarkusBuildTaskDeps(Project project, Project dep, Set<String> visited) {
649-
if (!visited.add(dep.getGroup() + ":" + dep.getName())) {
649+
if (!visited.add(dep.getPath())) {
650650
return;
651651
}
652652

@@ -663,18 +663,24 @@ private void setupQuarkusBuildTaskDeps(Project project, Project dep, Set<String>
663663
});
664664

665665
getLazyTask(project, QUARKUS_DEV_TASK_NAME).ifPresent(quarkusDev -> {
666-
for (String taskName : new String[] { JavaPlugin.PROCESS_RESOURCES_TASK_NAME,
667-
// This is the task of the 'org.kordamp.gradle.jandex' Gradle plugin
668-
"jandex",
669-
// This is the task of the 'com.github.vlsi.jandex' Gradle plugin
670-
"processJandexIndex" }) {
671-
getLazyTask(dep, taskName).ifPresent(t -> quarkusDev.configure(qd -> qd.dependsOn(t)));
672-
}
666+
getLazyTask(project, JavaPlugin.PROCESS_RESOURCES_TASK_NAME)
667+
.ifPresent(t -> quarkusDev.configure(qd -> qd.dependsOn(t)));
668+
addDependencyOnJandexIfConfigured(dep, quarkusDev);
673669
});
674670

675671
visitProjectDependencies(project, dep, visited);
676672
}
677673

674+
private void addDependencyOnJandexIfConfigured(Project project, TaskProvider<? extends Task> quarkusTask) {
675+
for (String taskName : new String[] {
676+
// This is the task of the 'org.kordamp.gradle.jandex' Gradle plugin
677+
"jandex",
678+
// This is the task of the 'com.github.vlsi.jandex' Gradle plugin
679+
"processJandexIndex" }) {
680+
getLazyTask(project, taskName).ifPresent(t -> quarkusTask.configure(qd -> qd.mustRunAfter(t)));
681+
}
682+
}
683+
678684
protected void visitProjectDependencies(Project project, Project dep, Set<String> visited) {
679685
final Configuration compileConfig = dep.getConfigurations().findByName(JavaPlugin.COMPILE_CLASSPATH_CONFIGURATION_NAME);
680686
if (compileConfig != null) {
@@ -689,10 +695,10 @@ protected void visitProjectDependencies(Project project, Project dep, Set<String
689695
.forEach(d -> {
690696
Project depProject = null;
691697

692-
if (d instanceof ProjectDependency) {
693-
depProject = dep.project(((ProjectDependency) d).getPath());
694-
} else if (d instanceof ExternalModuleDependency) {
695-
depProject = ToolingUtils.findIncludedProject(project, (ExternalModuleDependency) d);
698+
if (d instanceof ProjectDependency projectDep) {
699+
depProject = dep.project(projectDep.getPath());
700+
} else if (d instanceof ExternalModuleDependency externalModuleDep) {
701+
depProject = ToolingUtils.findIncludedProject(project, externalModuleDep);
696702
}
697703

698704
if (depProject == null) {
@@ -711,13 +717,9 @@ protected void visitProjectDependencies(Project project, Project dep, Set<String
711717
private void visitLocalProject(Project project, Project localProject, Set<String> visited) {
712718
// local dependency, so we collect also its dependencies
713719
visitProjectDep(project, localProject, visited);
714-
715-
ExtensionDependency<?> extensionDependency = DependencyUtils
716-
.getExtensionInfoOrNull(project, localProject);
717-
718-
if (extensionDependency instanceof ProjectExtensionDependency) {
719-
visitProjectDep(project,
720-
((ProjectExtensionDependency) extensionDependency).getDeploymentModule(), visited);
720+
ExtensionDependency<?> extensionDependency = DependencyUtils.getExtensionInfoOrNull(project, localProject);
721+
if (extensionDependency instanceof ProjectExtensionDependency projectExtDep) {
722+
visitProjectDep(project, projectExtDep.getDeploymentModule(), visited);
721723
}
722724
}
723725

devtools/gradle/gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ plugin-publish = "1.3.1"
33

44
# updating Kotlin here makes QuarkusPluginTest > shouldNotFailOnProjectDependenciesWithoutMain(Path) fail
55
kotlin = "2.0.21"
6-
smallrye-config = "3.13.1"
6+
smallrye-config = "3.13.2"
77

88
junit5 = "5.13.1"
99
assertj = "3.27.3"

docs/src/main/asciidoc/config-mappings.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ requires a spy:
537537
[source,java]
538538
----
539539
@ConfigMapping(prefix = "app")
540+
@Unremovable
540541
public interface AppConfig {
541542
@WithDefault("app")
542543
String name();

docs/src/main/asciidoc/qute-reference.adoc

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,19 +1006,39 @@ The following operators are supported in `is`/`case` block conditions:
10061006
[[let_section]]
10071007
==== Let Section
10081008

1009-
This section allows you to define named local variables:
1009+
This section allows you to define named local variables.
10101010

1011+
.Let
10111012
[source,html]
10121013
----
10131014
{#let myParent=order.item.parent isActive=false age=10 price=(order.price + 10)} <1><2>
10141015
<h1>{myParent.name}</h1>
10151016
Is active: {isActive}
10161017
Age: {age}
1018+
Price: {price}
10171019
{/let} <3>
10181020
----
10191021
<1> The local variable is initialized with an expression that can also represent a <<literals,literal>>, i.e. `isActive=false` and `age=10`.
10201022
<2> The infix notation is only supported if parentheses are used for grouping, e.g. `price=(order.price + 10)` is equivalent to `price=order.price.plus(10)`.
1021-
<3> Keep in mind that the variable is not available outside the `let` section that defines it.
1023+
<3> Variables are not available outside the `let` section.
1024+
1025+
The variables are not available outside the defining `let` section.
1026+
However, the end tag is optional, if missing then the section ends where the parent section ends.
1027+
1028+
.Let with optional end tag
1029+
[source,html]
1030+
----
1031+
<ul>
1032+
{#for item in items}
1033+
{#let price=item.price} <1>
1034+
<li>{price}</li>
1035+
{! a synthetic {/let} is added here automatically !}
1036+
{/for}
1037+
</ul>
1038+
{price} --> BOOM! <2>
1039+
----
1040+
<1> The local variable `price` is initialized with expression `item.price`.
1041+
<2> Variable `price` is not available outside the `let` section.
10221042

10231043
If a key of a section parameter, such as the name of the local variable, ends with a `?`, then the local variable is only set if the key without the `?` suffix resolves to `null` or _"not found"_:
10241044

docs/src/main/asciidoc/vertx-reference.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ The `EventBus` object provides methods to:
704704
[source, java]
705705
----
706706
// Case 1
707-
bus.sendAndForget("greeting", name)
707+
bus.send("greeting", name)
708708
// Case 2
709709
bus.publish("greeting", name)
710710
// Case 3
@@ -730,7 +730,7 @@ Read xref:./virtual-threads.adoc[the virtual thread guide] for more details.
730730

731731
=== Use codecs
732732

733-
The https://vertx.io/docs/vertx-core/java/#event_bus[Vert.x Event Bus] uses https://vertx.io/docs/vertx-core/java/#_message_codecs[codecs] to _serialize_ and _deserialize_ message objects.
733+
The link:++https://vertx.io/docs/vertx-core/java/#event_bus++[Vert.x Event Bus] uses link:++https://vertx.io/docs/vertx-core/java/#_message_codecs++[codecs] to _serialize_ and _deserialize_ message objects.
734734
Quarkus provides a default codec for local delivery.
735735
This codec is automatically used for return types and message body parameters of local consumers, i.e. methods annotated with `@ConsumeEvent` where `ConsumeEvent#local() == true` (which is the default).
736736

extensions/amazon-lambda/common-deployment/src/main/java/io/quarkus/amazon/lambda/deployment/LambdaUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static void writeFile(OutputTargetBuildItem target, String name, String o
4747
output = output.replace("${artifactId}", target.getBaseName())
4848
.replace("${buildDir}", target.getOutputDirectory().toString())
4949
.replace("${targetUri}", targetUri);
50-
Files.write(artifact, output.getBytes(StandardCharsets.UTF_8));
50+
Files.writeString(artifact, output);
5151
}
5252

5353
public static void writeExecutableFile(OutputTargetBuildItem target, String name, String output) throws IOException {

extensions/container-image/container-image-jib/deployment/src/main/java/io/quarkus/container/image/jib/deployment/JibProcessor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import java.io.IOException;
1212
import java.io.UncheckedIOException;
13-
import java.nio.charset.StandardCharsets;
1413
import java.nio.file.DirectoryStream;
1514
import java.nio.file.Files;
1615
import java.nio.file.Path;
@@ -341,7 +340,7 @@ private void doWriteOutputFile(OutputTargetBuildItem outputTarget, Path configPa
341340
configPath = outputTarget.getOutputDirectory().resolve(configPath);
342341
}
343342
try {
344-
Files.write(configPath, output.getBytes(StandardCharsets.UTF_8));
343+
Files.writeString(configPath, output);
345344
} catch (IOException e) {
346345
log.errorf(e, "Unable to write file '%s'.", configPath.toAbsolutePath().toString());
347346
}

0 commit comments

Comments
 (0)