Skip to content

Commit 74f5533

Browse files
authored
Merge pull request #50655 from gsmet/3.29.0-backports-1
[3.29] 3.29.0 backports 1
2 parents 23e870d + e82db92 commit 74f5533

File tree

50 files changed

+999
-212
lines changed

Some content is hidden

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

50 files changed

+999
-212
lines changed

bom/application/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
<postgresql-jdbc.version>42.7.8</postgresql-jdbc.version>
124124
<mariadb-jdbc.version>3.5.6</mariadb-jdbc.version>
125125
<mysql-jdbc.version>8.3.0</mysql-jdbc.version>
126-
<mssql-jdbc.version>13.2.0.jre11</mssql-jdbc.version>
126+
<mssql-jdbc.version>13.2.1.jre11</mssql-jdbc.version>
127127
<adal4j.version>1.6.7</adal4j.version>
128128
<oracle-jdbc.version>23.6.0.24.10</oracle-jdbc.version>
129129
<derby-jdbc.version>10.16.1.1</derby-jdbc.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.14.0</flyway.version>
163+
<flyway.version>11.14.1</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/dev/testing/TestHandler.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import io.quarkus.banner.BannerConfig;
99
import io.quarkus.builder.BuildResult;
10+
import io.quarkus.deployment.dev.testing.TestConfig.Mode;
1011
import io.quarkus.deployment.steps.BannerProcessor;
1112
import io.quarkus.dev.console.QuarkusConsole;
1213
import io.quarkus.runtime.BannerRecorder;
@@ -33,6 +34,9 @@ public boolean enabled() {
3334
return config.getOptionalValue("quarkus.banner.enabled", Boolean.class).orElse(true);
3435
}
3536
})), banner).getBannerSupplier());
36-
Logger.getLogger("io.quarkus.test").info("Quarkus continuous testing mode started");
37+
if (!config.getOptionalValue("quarkus.test.continuous-testing", Mode.class).orElse(Mode.PAUSED)
38+
.equals(Mode.DISABLED)) {
39+
Logger.getLogger("io.quarkus.test").info("Quarkus continuous testing mode started");
40+
}
3741
}
3842
}

core/deployment/src/main/java/io/quarkus/deployment/dev/testing/TestTracingProcessor.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ TestListenerBuildItem sharedStateListener() {
7474
@Produce(ServiceStartBuildItem.class)
7575
void startTesting(TestConfig config, LiveReloadBuildItem liveReloadBuildItem,
7676
LaunchModeBuildItem launchModeBuildItem, List<TestListenerBuildItem> testListenerBuildItems) {
77-
if (TestSupport.instance().isEmpty() || config.continuousTesting() == TestConfig.Mode.DISABLED
78-
|| config.flatClassPath()) {
77+
if (TestSupport.instance().isEmpty()) {
78+
return;
79+
}
80+
TestSupport testSupport = TestSupport.instance().get();
81+
testSupport.setConfig(config);
82+
if ((config.continuousTesting() == TestConfig.Mode.DISABLED) || config.flatClassPath()) {
7983
return;
8084
}
8185
DevModeType devModeType = launchModeBuildItem.getDevModeType().orElse(null);
@@ -86,11 +90,9 @@ void startTesting(TestConfig config, LiveReloadBuildItem liveReloadBuildItem,
8690
return;
8791
}
8892
testingSetup = true;
89-
TestSupport testSupport = TestSupport.instance().get();
9093
for (TestListenerBuildItem i : testListenerBuildItems) {
9194
testSupport.addListener(i.listener);
9295
}
93-
testSupport.setConfig(config);
9496
testSupport.setTags(config.includeTags().orElse(Collections.emptyList()),
9597
config.excludeTags().orElse(Collections.emptyList()));
9698
testSupport.setPatterns(config.includePattern().orElse(null),

core/deployment/src/main/java/io/quarkus/deployment/pkg/jar/AbstractJarBuilder.java

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import java.util.Map.Entry;
1414
import java.util.Optional;
1515
import java.util.Set;
16+
import java.util.TreeMap;
1617
import java.util.function.Predicate;
1718
import java.util.jar.Attributes;
1819
import java.util.jar.Manifest;
@@ -105,6 +106,7 @@ protected static void copyFiles(ApplicationArchive archive, ArchiveCreator archi
105106
Map<String, List<byte[]>> services,
106107
Predicate<String> ignoredEntriesPredicate) throws IOException {
107108
try {
109+
Map<String, Path> pathsToCopy = new TreeMap<>();
108110
archive.accept(tree -> {
109111
tree.walk(new PathVisitor() {
110112
@Override
@@ -114,32 +116,35 @@ public void visitPath(PathVisit visit) {
114116
if (relativePath.isEmpty() || ignoredEntriesPredicate.test(relativePath)) {
115117
return;
116118
}
117-
try {
118-
if (Files.isDirectory(visit.getPath())) {
119-
archiveCreator.addDirectory(relativePath);
120-
} else {
121-
if (relativePath.startsWith("META-INF/services/") && relativePath.length() > 18
122-
&& services != null) {
123-
final byte[] content;
124-
try {
125-
content = Files.readAllBytes(visit.getPath());
126-
} catch (IOException e) {
127-
throw new UncheckedIOException(e);
128-
}
129-
services.computeIfAbsent(relativePath, (u) -> new ArrayList<>()).add(content);
130-
} else if (!relativePath.equals("META-INF/INDEX.LIST")) {
131-
//TODO: auto generate INDEX.LIST
132-
//this may have implications for Camel though, as they change the layout
133-
//also this is only really relevant for the thin jar layout
134-
archiveCreator.addFileIfNotExists(visit.getPath(), relativePath);
119+
if (Files.isDirectory(visit.getPath())) {
120+
pathsToCopy.put(relativePath, visit.getPath());
121+
} else {
122+
if (relativePath.startsWith("META-INF/services/") && relativePath.length() > 18
123+
&& services != null) {
124+
final byte[] content;
125+
try {
126+
content = Files.readAllBytes(visit.getPath());
127+
} catch (IOException e) {
128+
throw new UncheckedIOException(e);
135129
}
130+
services.computeIfAbsent(relativePath, (u) -> new ArrayList<>()).add(content);
131+
} else if (!relativePath.equals("META-INF/INDEX.LIST")) {
132+
//TODO: auto generate INDEX.LIST
133+
//this may have implications for Camel though, as they change the layout
134+
//also this is only really relevant for the thin jar layout
135+
pathsToCopy.put(relativePath, visit.getPath());
136136
}
137-
} catch (IOException e) {
138-
throw new UncheckedIOException(e);
139137
}
140138
}
141139
});
142140
});
141+
for (Entry<String, Path> pathEntry : pathsToCopy.entrySet()) {
142+
if (Files.isDirectory(pathEntry.getValue())) {
143+
archiveCreator.addDirectory(pathEntry.getKey());
144+
} else {
145+
archiveCreator.addFileIfNotExists(pathEntry.getValue(), pathEntry.getKey());
146+
}
147+
}
143148
} catch (RuntimeException re) {
144149
final Throwable cause = re.getCause();
145150
if (cause instanceof IOException) {

devtools/cli-common/src/main/java/io/quarkus/cli/common/VersionHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static String clientVersion() {
3434
props.load(is);
3535
}
3636
}
37-
version = props.getProperty("quarkus.version", "999-SNAPSHOT");
37+
version = props.getProperty("quarkus-core-version", "999-SNAPSHOT");
3838
} catch (Exception e) {
3939
version = "999-SNAPSHOT"; // fallback version
4040
}

devtools/cli/src/test/java/io/quarkus/cli/CliVersionTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public void testCommandVersion() throws Exception {
1818
"Version output for command aliases should be the same.");
1919

2020
CliDriver.Result result2 = CliDriver.execute(workspaceRoot, "--version");
21+
result2.echoSystemOut();
2122
Assertions.assertEquals(result.stdout, result2.stdout, "Version output for command aliases should be the same.");
2223
}
2324
}

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

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import java.util.Collections;
1515
import java.util.Enumeration;
1616
import java.util.HashMap;
17+
import java.util.HashSet;
1718
import java.util.List;
1819
import java.util.Map;
1920
import java.util.Set;
@@ -45,6 +46,7 @@
4546
public final class EffectiveConfig {
4647
private final SmallRyeConfig config;
4748
private final Map<String, String> values;
49+
private final Map<String, String> quarkusValues;
4850

4951
private EffectiveConfig(Builder builder) {
5052
// Effective "ordinals" for the config sources:
@@ -90,6 +92,7 @@ private EffectiveConfig(Builder builder) {
9092
.withInterceptors(ConfigCompatibility.FrontEnd.instance(), ConfigCompatibility.BackEnd.instance())
9193
.build();
9294
this.values = generateFullConfigMap(config);
95+
this.quarkusValues = generateQuarkusConfigMap(config);
9396
}
9497

9598
public SmallRyeConfig getConfig() {
@@ -100,23 +103,8 @@ public Map<String, String> getValues() {
100103
return values;
101104
}
102105

103-
public Map<String, String> getOnlyQuarkusValues() {
104-
return Expressions.withoutExpansion(new Supplier<Map<String, String>>() {
105-
@Override
106-
public Map<String, String> get() {
107-
Map<String, String> properties = new HashMap<>();
108-
for (String propertyName : config.getPropertyNames()) {
109-
if (propertyName.startsWith("quarkus.") || propertyName.startsWith("platform.quarkus.")) {
110-
ConfigValue configValue = config.getConfigValue(propertyName);
111-
if (configValue.getValue() != null
112-
&& !DefaultValuesConfigSource.NAME.equals(configValue.getConfigSourceName())) {
113-
properties.put(propertyName, configValue.getValue());
114-
}
115-
}
116-
}
117-
return unmodifiableMap(properties);
118-
}
119-
});
106+
public Map<String, String> getQuarkusValues() {
107+
return quarkusValues;
120108
}
121109

122110
private Map<String, String> asStringMap(Map<String, ?> map) {
@@ -131,18 +119,48 @@ private Map<String, String> asStringMap(Map<String, ?> map) {
131119

132120
@VisibleForTesting
133121
static Map<String, String> generateFullConfigMap(SmallRyeConfig config) {
122+
Set<String> defaultNames = new HashSet<>();
123+
defaultNames.addAll(configClass(PackageConfig.class).getProperties().keySet());
124+
defaultNames.addAll(configClass(NativeConfig.class).getProperties().keySet());
134125
return Expressions.withoutExpansion(new Supplier<Map<String, String>>() {
135126
@Override
136127
public Map<String, String> get() {
137128
Map<String, String> properties = new HashMap<>();
138129
for (String propertyName : config.getPropertyNames()) {
139130
ConfigValue configValue = config.getConfigValue(propertyName);
140-
if (configValue.getValue() != null) {
131+
// Remove defaults coming from PackageConfig and NativeConfig, as this Map as passed as
132+
// system properties to Gradle workers and, we loose the ability to determine if it was set by
133+
// the user to evaluate deprecated configuration
134+
if (configValue.getValue() != null && (!defaultNames.contains(configValue.getName())
135+
|| !DefaultValuesConfigSource.NAME.equals(configValue.getConfigSourceName()))) {
141136
properties.put(propertyName, configValue.getValue());
142137
}
143138
}
144-
configClass(PackageConfig.class).getProperties().keySet().forEach(properties::remove);
145-
configClass(NativeConfig.class).getProperties().keySet().forEach(properties::remove);
139+
return unmodifiableMap(properties);
140+
}
141+
});
142+
}
143+
144+
static Map<String, String> generateQuarkusConfigMap(SmallRyeConfig config) {
145+
Set<String> defaultNames = new HashSet<>();
146+
defaultNames.addAll(configClass(PackageConfig.class).getProperties().keySet());
147+
defaultNames.addAll(configClass(NativeConfig.class).getProperties().keySet());
148+
return Expressions.withoutExpansion(new Supplier<Map<String, String>>() {
149+
@Override
150+
public Map<String, String> get() {
151+
Map<String, String> properties = new HashMap<>();
152+
for (String propertyName : config.getPropertyNames()) {
153+
if (propertyName.startsWith("quarkus.") || propertyName.startsWith("platform.quarkus.")) {
154+
ConfigValue configValue = config.getConfigValue(propertyName);
155+
// Remove defaults coming from PackageConfig and NativeConfig, as this Map as passed as
156+
// system properties to Gradle workers and, we loose the ability to determine if it was set by
157+
// the user to evaluate deprecated configuration
158+
if (configValue.getValue() != null && (!defaultNames.contains(configValue.getName())
159+
|| !DefaultValuesConfigSource.NAME.equals(configValue.getConfigSourceName()))) {
160+
properties.put(propertyName, configValue.getValue());
161+
}
162+
}
163+
}
146164
return unmodifiableMap(properties);
147165
}
148166
});

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ void generateBuild() {
272272
ApplicationModel appModel = resolveAppModelForBuild();
273273
Map<String, String> quarkusProperties = effectiveProvider()
274274
.buildEffectiveConfiguration(appModel, getAdditionalForcedProperties().get().getProperties())
275-
.getOnlyQuarkusValues();
275+
.getQuarkusValues();
276276

277277
if (nativeEnabled()) {
278278
if (nativeSourcesOnly()) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void setJvmArgs(List<String> jvmArgs) {
103103
public void runQuarkus() {
104104
ApplicationModel appModel = resolveAppModelForBuild();
105105
Properties sysProps = new Properties();
106-
sysProps.putAll(extension().buildEffectiveConfiguration(appModel).getOnlyQuarkusValues());
106+
sysProps.putAll(extension().buildEffectiveConfiguration(appModel).getQuarkusValues());
107107
try (CuratedApplication curatedApplication = QuarkusBootstrap.builder()
108108
.setBaseClassLoader(getClass().getClassLoader())
109109
.setExistingModel(appModel)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,7 @@ private DevModeCommandLine newLauncher(String actualDebugPort, String bootstrapI
14211421
builder.jvmArgs("-Dquarkus-internal.test.specific-selection=maven:" + test);
14221422
}
14231423

1424-
if (openJavaLang) {
1424+
if (openJavaLang || Runtime.version().feature() >= 24) {
14251425
builder.addOpens("java.base/java.lang=ALL-UNNAMED");
14261426
}
14271427

0 commit comments

Comments
 (0)