Skip to content

Commit 605ed52

Browse files
authored
Merge pull request #49737 from gsmet/3.26.1-backports-1
[3.26] 3.26.1 backports 1
2 parents df6edd6 + 53f42fa commit 605ed52

File tree

81 files changed

+1310
-228
lines changed

Some content is hidden

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

81 files changed

+1310
-228
lines changed

bom/application/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
<jakarta.interceptor-api.version>2.2.0</jakarta.interceptor-api.version>
7171
<jakarta.json-api.version>2.1.3</jakarta.json-api.version>
7272
<jakarta.json.bind-api.version>3.0.1</jakarta.json.bind-api.version>
73-
<jakarta.mail-api.version>2.1.3</jakarta.mail-api.version>
73+
<jakarta.mail-api.version>2.1.4</jakarta.mail-api.version>
7474
<!--jakarta.persistence-api.version is located in the root pom -->
7575
<jakarta.data-api.version>1.0.1</jakarta.data-api.version>
7676
<jakarta.resource-api.version>2.1.0</jakarta.resource-api.version>
@@ -112,7 +112,7 @@
112112
<wildfly-elytron.version>2.6.4.Final</wildfly-elytron.version>
113113
<jboss-marshalling.version>2.2.3.Final</jboss-marshalling.version>
114114
<jboss-threads.version>3.9.1</jboss-threads.version>
115-
<vertx.version>4.5.18</vertx.version>
115+
<vertx.version>4.5.20</vertx.version>
116116
<httpclient.version>4.5.14</httpclient.version>
117117
<httpcore.version>4.4.16</httpcore.version>
118118
<httpasync.version>4.1.5</httpasync.version>
@@ -160,7 +160,7 @@
160160
<maven-invoker.version>3.2.0</maven-invoker.version>
161161
<awaitility.version>4.3.0</awaitility.version>
162162
<jboss-logmanager.version>3.1.2.Final</jboss-logmanager.version>
163-
<flyway.version>11.11.1</flyway.version>
163+
<flyway.version>11.11.2</flyway.version>
164164
<yasson.version>3.0.4</yasson.version>
165165
<!-- liquibase-mongodb is not released everytime with liquibase anymore, but the two versions need to be compatible -->
166166
<liquibase.version>4.33.0</liquibase.version>

core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,6 +1512,7 @@ private static class IsEntryIgnoredForUberJarPredicate implements Predicate<Stri
15121512
"META-INF/jandex.idx",
15131513
"META-INF/panache-archive.marker", // deprecated and unused, but still present in some archives
15141514
"META-INF/build.metadata", // present in the Red Hat Build of Quarkus
1515+
"META-INF/quarkus-config-doc/quarkus-config-javadoc.json",
15151516
"LICENSE");
15161517

15171518
@Override

core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigUtils.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,26 @@ public static SmallRyeConfigBuilder emptyConfigBuilder() {
3434
.addDefaultSources();
3535
}
3636

37+
/**
38+
* Returns a {@code List} of the active profiles in Quarkus.
39+
* <p>
40+
* Profiles are sorted in reverse order according to how they were set in
41+
* {@code quarkus.profile}, as the last profile overrides the previous one until there are
42+
* no profiles left in the list.
43+
*
44+
* @return a {@code List} of the active profiles
45+
* @see io.smallrye.config.SmallRyeConfig#getProfiles()
46+
*/
3747
public static List<String> getProfiles() {
3848
return ConfigProvider.getConfig().unwrap(SmallRyeConfig.class).getProfiles();
3949
}
4050

51+
/**
52+
* Check if a configuration profile is active in Quarkus.
53+
*
54+
* @param profile the configuration profile to check
55+
* @return true if the profile is active or false otherwise.
56+
*/
4157
public static boolean isProfileActive(final String profile) {
4258
return getProfiles().contains(profile);
4359
}

devtools/maven/src/main/java/io/quarkus/maven/QuarkusProjectMojoBase.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import io.quarkus.devtools.messagewriter.MessageWriter;
2727
import io.quarkus.devtools.project.BuildTool;
2828
import io.quarkus.devtools.project.CodestartResourceLoadersBuilder;
29-
import io.quarkus.devtools.project.JavaVersion;
3029
import io.quarkus.devtools.project.QuarkusProject;
3130
import io.quarkus.devtools.project.QuarkusProjectHelper;
3231
import io.quarkus.devtools.project.buildfile.MavenProjectBuildFile;
@@ -59,13 +58,13 @@ public abstract class QuarkusProjectMojoBase extends AbstractMojo {
5958
protected List<RemoteRepository> repos;
6059

6160
@Parameter(property = "bomGroupId", required = false)
62-
private String bomGroupId;
61+
String bomGroupId;
6362

6463
@Parameter(property = "bomArtifactId", required = false)
65-
private String bomArtifactId;
64+
String bomArtifactId;
6665

6766
@Parameter(property = "bomVersion", required = false)
68-
private String bomVersion;
67+
String bomVersion;
6968

7069
@Component
7170
QuarkusWorkspaceProvider workspaceProvider;
@@ -91,7 +90,7 @@ public void execute() throws MojoExecutionException {
9190
}
9291

9392
final QuarkusProject quarkusProject;
94-
if (BuildTool.MAVEN.equals(buildTool) && project.getFile() != null) {
93+
if (BuildTool.MAVEN.equals(buildTool) && project.getFile() != null && bomVersion == null) {
9594
try {
9695
quarkusProject = MavenProjectBuildFile.getProject(projectArtifact(), project.getOriginalModel(), baseDir(),
9796
project.getModel().getProperties(), artifactResolver(), getExtensionCatalogResolver(),
@@ -108,7 +107,8 @@ public void execute() throws MojoExecutionException {
108107
.catalog(extensionCatalog)
109108
.build();
110109
quarkusProject = QuarkusProject.of(baseDir(), extensionCatalog,
111-
codestartsResourceLoader, log, buildTool, JavaVersion.NA);
110+
codestartsResourceLoader, log, buildTool,
111+
MavenProjectBuildFile.resolveJavaVersion(project.getModel().getProperties()));
112112
}
113113

114114
doExecute(quarkusProject, getMessageWriter());

devtools/maven/src/main/java/io/quarkus/maven/UpdateMojo.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22

33
import java.util.List;
44

5-
import org.apache.maven.execution.MavenSession;
6-
import org.apache.maven.plugin.BuildPluginManager;
75
import org.apache.maven.plugin.MojoExecutionException;
8-
import org.apache.maven.plugins.annotations.Component;
96
import org.apache.maven.plugins.annotations.Mojo;
107
import org.apache.maven.plugins.annotations.Parameter;
118

@@ -16,6 +13,7 @@
1613
import io.quarkus.devtools.project.QuarkusProjectHelper;
1714
import io.quarkus.devtools.project.update.rewrite.QuarkusUpdateExitErrorException;
1815
import io.quarkus.maven.dependency.ArtifactCoords;
16+
import io.quarkus.platform.tools.ToolsConstants;
1917
import io.quarkus.registry.RegistryResolutionException;
2018
import io.quarkus.registry.catalog.ExtensionCatalog;
2119
import io.quarkus.registry.catalog.PlatformStreamCoords;
@@ -87,12 +85,6 @@ public class UpdateMojo extends QuarkusProjectStateMojoBase {
8785
@Parameter(property = "stream", required = false)
8886
private String stream;
8987

90-
@Parameter(defaultValue = "${session}", readonly = true)
91-
private MavenSession mavenSession;
92-
93-
@Component
94-
private BuildPluginManager pluginManager;
95-
9688
@Override
9789
protected void validateParameters() throws MojoExecutionException {
9890
getLog().warn("quarkus:update goal is experimental, its options and output might change in future versions");
@@ -114,7 +106,14 @@ protected void processProjectState(QuarkusProject quarkusProject) throws MojoExe
114106
targetCatalog = getExtensionCatalogResolver().resolveExtensionCatalog(platformStream);
115107
platformVersion = getPrimaryBom(targetCatalog).getVersion();
116108
} else {
117-
targetCatalog = getExtensionCatalogResolver().resolveExtensionCatalog();
109+
if (bomVersion != null) {
110+
targetCatalog = getExtensionCatalogResolver().resolveExtensionCatalog(List.of(ArtifactCoords.pom(
111+
this.bomGroupId == null ? ToolsConstants.DEFAULT_PLATFORM_BOM_GROUP_ID : this.bomGroupId,
112+
this.bomArtifactId == null ? ToolsConstants.DEFAULT_PLATFORM_BOM_ARTIFACT_ID : this.bomArtifactId,
113+
bomVersion)));
114+
} else {
115+
targetCatalog = getExtensionCatalogResolver().resolveExtensionCatalog();
116+
}
118117
platformVersion = getPrimaryBom(targetCatalog).getVersion();
119118
}
120119
} catch (RegistryResolutionException e) {

docs/src/main/asciidoc/compose-dev-services.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,8 @@ Compose Dev Services won't try to discover any services and will be disabled.
645645
=== Compose Dev Services used for tests
646646

647647
For Quarkus tests, a generated project name in the format `quarkus-devservices-<application-name>-<random-suffix>` is used by default to ensure isolation between test runs and running dev mode services.
648+
If the top-level name attribute is specified in the Compose file, the project name in the format `<compose-name>-<random-suffix>` is used.
649+
648650
This way, Quarkus tests start a separate copy of the services defined in the compose files.
649651
For example, when running continuous testing in development mode, tests will have their own isolated set of services.
650652

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ Setting `quarkus.profile` to `staging` will activate the `staging` profile.
367367

368368
[NOTE]
369369
====
370-
The `io.smallrye.config.SmallRyeConfig#getProfiles` API provides a way to retrieve the active profiles programmatically.
370+
The `io.quarkus.runtime.configuration.ConfigUtils.getProfiles` API provides a way to retrieve the active profiles programmatically.
371371
====
372372

373373
=== Profile-aware files

docs/src/main/asciidoc/datasource.adoc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,15 @@ You can override this by setting the `transactions` configuration property:
678678
* `quarkus.datasource.jdbc.transactions` for default unnamed datasource
679679
* `quarkus.datasource._<datasource-name>_.jdbc.transactions` for named datasource
680680

681-
When a datasource is enabled for XA (by setting `quarkus.datasource[.optional name].jdbc.transactions` to `xa`) and the transaction recovery system is enabled (by setting the property `quarkus.transaction-manager.enable-recovery` to `true`), then the datasource is automatically registered for recovery.
682-
This is a safe default, but you can override this behaviour on a per-datasource basis by setting `quarkus.datasource.jdbc.enable-recovery` or `quarkus.datasource."datasource-name".jdbc.enable-recovery` to `false`.
683-
Use only for advanced use cases and if you know recovery will not be necessary; otherwise it can result in data loss, data unavailability, or both, because resources can become locked indefinitely.
681+
When a datasource is configured for XA transactions by setting `quarkus.datasource[.optional name].jdbc.transactions=xa` and the transaction recovery system is enabled by using `quarkus.transaction-manager.enable-recovery=true`, the datasource is automatically registered for recovery.
682+
This is the preferred and safe default.
683+
You can override this behavior for individual datasources by setting `quarkus.datasource.jdbc.enable-recovery=false` or `quarkus.datasource."datasource-name".jdbc.enable-recovery=false`.
684+
685+
[IMPORTANT]
686+
====
687+
Change this setting only in advanced use cases and only if you are certain recovery is not required.
688+
Incorrect configuration can lead to data loss, data unavailability, or both, due to resources remaining locked indefinitely.
689+
====
684690

685691
For more information, see the <<configuration-reference,Configuration reference>> section below.
686692
To facilitate the storage of transaction logs in a database by using JDBC, see the xref:transaction.adoc#jdbcstore[Configuring transaction logs to be stored in a datasource] section of the xref:transaction.adoc[Using transactions in Quarkus] guide.

docs/src/main/asciidoc/dev-ui.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ To add a tab to the Dev UI settings dialog, produce a `SettingPageBuildItem`:
397397
@BuildStep(onlyIf = IsLocalDevelopment.class) // <1>
398398
void createMCPSettingsTab(BuildProducer<SettingPageBuildItem> settingPageProducer) {
399399
400-
SettingPageBuildItem mcpSettingTab = new SettingPageBuildItem("Dev MCP");// <2>
400+
SettingPageBuildItem mcpSettingTab = new SettingPageBuildItem();// <2>
401401
402402
mcpSettingTab.addPage(Page.webComponentPageBuilder() // <3>
403403
.title("Dev MCP")// <4>
@@ -438,7 +438,7 @@ To do this, produce a `UnlistedPageBuildItem`:
438438
@BuildStep(onlyIf = IsLocalDevelopment.class) // <1>
439439
void createMCPUnlistedPages(BuildProducer<UnlistedPageBuildItem> unlistedPageProducer) {
440440
441-
UnlistedPageBuildItem mcpOtherPages = new UnlistedPageBuildItem("Dev MCP"); // <2>
441+
UnlistedPageBuildItem mcpOtherPages = new UnlistedPageBuildItem(); // <2>
442442
443443
mcpOtherPages.addPage(Page.webComponentPageBuilder() // <3>
444444
.title("Tools") // <4>

docs/src/main/asciidoc/hibernate-orm.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,13 @@ EntityManager entityManager;
486486
----
487487
<1> Here again, we use the same `@io.quarkus.hibernate.orm.PersistenceUnit` annotation.
488488

489+
[NOTE]
490+
====
491+
The injected `EntityManager` or `Session` instance is a proxy that requires an active transaction for interaction.
492+
493+
By default it is also possible to use it for read-only operations without a transaction when in a request scope, but this can be disabled by setting `quarkus.hibernate-orm.request-scoped.enabled` to `false`.
494+
====
495+
489496
You can inject the `EntityManagerFactory` of a named persistence unit using the exact same mechanism:
490497

491498
[source,java]

0 commit comments

Comments
 (0)