Skip to content

Commit 7c126a0

Browse files
authored
Merge pull request #48719 from gsmet/3.24.2-backports-1
[3.24] 3.24.2 backports 1
2 parents 4337dc5 + a5e040e commit 7c126a0

File tree

68 files changed

+877
-217
lines changed

Some content is hidden

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

68 files changed

+877
-217
lines changed

.github/workflows/ci-actions-incremental.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ env:
9393
# This may be a lot better with maven 4, but with maven 3, excluding a project does not exclude its children, and it's not possible to include a project and explicitly exclude some children; compensate by doing excludes the low-tech way, at the shell level
9494
JVM_TEST_INTEGRATION_TESTS_SELECTOR: "-f integration-tests -pl !gradle -pl !maven -pl !devmode -pl !devtools"
9595
JVM_TEST_NORMAL_TESTS_SELECTOR: "-pl !docs -Dno-test-modules"
96-
PTS_MAVEN_ARGS: "-Ddevelocity.pts.enabled=${{ github.event_name == 'pull_request' && github.base_ref == 'main' && 'true' || 'false' }}"
96+
#PTS_MAVEN_ARGS: "-Ddevelocity.pts.enabled=${{ github.event_name == 'pull_request' && github.base_ref == 'main' && 'true' || 'false' }}"
97+
PTS_MAVEN_ARGS: ""
9798
DB_USER: hibernate_orm_test
9899
DB_PASSWORD: hibernate_orm_test
99100
DB_NAME: hibernate_orm_test

bom/application/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
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 -->
122122
<postgresql-jdbc.version>42.7.7</postgresql-jdbc.version>
123-
<mariadb-jdbc.version>3.5.3</mariadb-jdbc.version>
123+
<mariadb-jdbc.version>3.5.4</mariadb-jdbc.version>
124124
<mysql-jdbc.version>8.3.0</mysql-jdbc.version>
125125
<mssql-jdbc.version>12.10.0.jre11</mssql-jdbc.version>
126126
<adal4j.version>1.6.7</adal4j.version>
@@ -129,15 +129,15 @@
129129
<db2-jdbc.version>12.1.0.0</db2-jdbc.version>
130130
<shrinkwrap.version>1.2.6</shrinkwrap.version>
131131
<hamcrest.version>2.2</hamcrest.version><!-- The version needs to be compatible with both REST Assured and Awaitility -->
132-
<junit.jupiter.version>5.13.1</junit.jupiter.version>
133-
<infinispan.version>15.0.15.Final</infinispan.version>
132+
<junit.jupiter.version>5.13.2</junit.jupiter.version>
133+
<infinispan.version>15.0.16.Final</infinispan.version>
134134
<infinispan.protostream.version>5.0.13.Final</infinispan.protostream.version>
135135
<caffeine.version>3.2.0</caffeine.version>
136136
<netty.version>4.1.121.Final</netty.version>
137137
<brotli4j.version>1.16.0</brotli4j.version>
138138
<reactive-streams.version>1.0.4</reactive-streams.version>
139139
<jboss-logging.version>3.6.1.Final</jboss-logging.version>
140-
<mutiny.version>2.9.0</mutiny.version>
140+
<mutiny.version>2.9.2</mutiny.version>
141141
<jctools-core.version>4.0.5</jctools-core.version>
142142
<kafka3.version>4.0.0</kafka3.version>
143143
<lz4.version>1.8.0</lz4.version> <!-- dependency of the kafka-clients that could be overridden by other imported BOMs in the platform -->
@@ -196,7 +196,7 @@
196196
<avro.version>1.12.0</avro.version>
197197
<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 -->
199-
<testcontainers.version>1.21.2</testcontainers.version> <!-- Make sure to also update docker-java.version to match its needs -->
199+
<testcontainers.version>1.21.3</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 -->
201201
<!-- Check the compatibility matrix (https://github.com/opensearch-project/opensearch-testcontainers) before upgrading: -->
202202
<opensearch-testcontainers.version>2.0.2</opensearch-testcontainers.version>

core/deployment/src/main/java/io/quarkus/deployment/dev/RuntimeUpdatesProcessor.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -673,14 +673,13 @@ public Set<String> syncState(Map<String, String> fileHashes) {
673673
//we have some filters, for files that we don't want to delete
674674
continue;
675675
}
676-
log.info("Scheduled for removal " + file);
677676
if (removedFiles.isEmpty()) {
678677
removedFiles = new ArrayList<>();
679678
}
680679
removedFiles.add(applicationRoot.resolve(file));
681680
}
682681
if (!removedFiles.isEmpty()) {
683-
DevModeMediator.removedFiles.addLast(removedFiles);
682+
DevModeMediator.scheduleDelete(removedFiles);
684683
}
685684
return ret;
686685
} catch (IOException e) {
@@ -727,12 +726,11 @@ ClassScanResult checkForChangedClasses(QuarkusCompiler compiler,
727726
final List<Path> moduleChangedSourceFilePaths = new ArrayList<>();
728727

729728
for (Path sourcePath : cuf.apply(module).getSourcePaths()) {
730-
final Set<File> changedSourceFiles;
731-
Path start = sourcePath;
732-
if (!Files.exists(start)) {
729+
if (!Files.exists(sourcePath)) {
733730
continue;
734731
}
735-
try (final Stream<Path> sourcesStream = Files.walk(start)) {
732+
final Set<File> changedSourceFiles;
733+
try (final Stream<Path> sourcesStream = Files.walk(sourcePath)) {
736734
changedSourceFiles = sourcesStream
737735
.parallel()
738736
.filter(p -> matchingHandledExtension(p).isPresent()

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

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,10 @@ private void copyDependency(Set<ArtifactKey> parentFirstArtifacts, OutputTargetB
920920
return;
921921
}
922922
for (Path resolvedDep : appDep.getResolvedPaths()) {
923-
final String fileName = appDep.getGroupId() + "." + resolvedDep.getFileName();
923+
final boolean isDirectory = Files.isDirectory(resolvedDep);
924+
// we don't use getFileName() for directories, since directories would often be "classes" ending up merging content from multiple dependencies in the same package
925+
final String fileName = isDirectory ? getFileNameForDirectory(appDep)
926+
: appDep.getGroupId() + "." + resolvedDep.getFileName();
924927
final Path targetPath;
925928

926929
if (allowParentFirst && parentFirstArtifacts.contains(appDep.getKey())) {
@@ -932,7 +935,7 @@ private void copyDependency(Set<ArtifactKey> parentFirstArtifacts, OutputTargetB
932935
}
933936
runtimeArtifacts.computeIfAbsent(appDep.getKey(), (s) -> new ArrayList<>(1)).add(targetPath);
934937

935-
if (Files.isDirectory(resolvedDep)) {
938+
if (isDirectory) {
936939
// This case can happen when we are building a jar from inside the Quarkus repository
937940
// and Quarkus Bootstrap's localProjectDiscovery has been set to true. In such a case
938941
// the non-jar dependencies are the Quarkus dependencies picked up on the file system
@@ -972,6 +975,21 @@ private void copyDependency(Set<ArtifactKey> parentFirstArtifacts, OutputTargetB
972975
}
973976
}
974977

978+
/**
979+
* Returns a JAR file name to be used for a content of a dependency that is in a directory.
980+
*
981+
* @param dep dependency
982+
* @return JAR file name
983+
*/
984+
private static String getFileNameForDirectory(ResolvedDependency dep) {
985+
final StringBuilder sb = new StringBuilder();
986+
sb.append(dep.getGroupId()).append(".").append(dep.getArtifactId()).append("-");
987+
if (!dep.getClassifier().isEmpty()) {
988+
sb.append(dep.getClassifier()).append("-");
989+
}
990+
return sb.append(dep.getVersion()).append(".").append(dep.getType()).toString();
991+
}
992+
975993
private void packageClasses(Path resolvedDep, final Path targetPath, PackageConfig packageConfig) throws IOException {
976994
try (FileSystem runnerZipFs = createNewZip(targetPath, packageConfig)) {
977995
Files.walkFileTree(resolvedDep, EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE,

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

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import java.util.HashSet;
1010
import java.util.Map;
1111
import java.util.Optional;
12-
import java.util.Properties;
1312
import java.util.Set;
1413
import java.util.stream.Collectors;
1514

@@ -462,7 +461,7 @@ public boolean isSatisfiedBy(Task t) {
462461
});
463462

464463
tasks.withType(Test.class).configureEach(t -> {
465-
t.setSystemProperties(extractQuarkusTestSystemProperties());
464+
t.setSystemProperties(extractQuarkusTestSystemProperties(project));
466465

467466
t.getInputs().files(quarkusGenerateTestAppModelTask);
468467
// Quarkus test configuration action which should be executed before any Quarkus test
@@ -661,11 +660,12 @@ private void setupQuarkusBuildTaskDeps(Project project, Project dep, Set<String>
661660
.ifPresent(quarkusTask -> quarkusTask.configure(t -> t.dependsOn(jarTask)));
662661
}
663662
});
664-
665663
getLazyTask(project, QUARKUS_DEV_TASK_NAME).ifPresent(quarkusDev -> {
666664
getLazyTask(project, JavaPlugin.PROCESS_RESOURCES_TASK_NAME)
667665
.ifPresent(t -> quarkusDev.configure(qd -> qd.dependsOn(t)));
668-
addDependencyOnJandexIfConfigured(dep, quarkusDev);
666+
if (project.getRootProject().equals(dep.getRootProject())) {
667+
addDependencyOnJandexIfConfigured(dep, quarkusDev);
668+
}
669669
});
670670

671671
visitProjectDependencies(project, dep, visited);
@@ -731,16 +731,9 @@ private Optional<TaskProvider<Task>> getLazyTask(Project project, String name) {
731731
}
732732
}
733733

734-
private static Map<String, Object> extractQuarkusTestSystemProperties() {
735-
Properties systemProperties = System.getProperties();
736-
Map<String, Object> quarkusSystemProperties = new HashMap<>();
737-
for (String propertyName : systemProperties.stringPropertyNames()) {
738-
if (!propertyName.startsWith("quarkus.test.")) {
739-
continue;
740-
}
741-
742-
quarkusSystemProperties.put(propertyName, systemProperties.get(propertyName));
743-
}
744-
return quarkusSystemProperties;
734+
private static Map<String, Object> extractQuarkusTestSystemProperties(Project project) {
735+
return new HashMap<>(project.getProviders()
736+
.systemPropertiesPrefixedBy("quarkus.test.")
737+
.get());
745738
}
746739
}

devtools/gradle/gradle-model/src/main/java/io/quarkus/gradle/dependency/ConditionalDependenciesEnabler.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,15 @@ private Configuration createConditionalDependenciesConfiguration(Project project
178178
// on conditional dependencies (https://github.com/gradle/gradle/issues/6881)
179179
// However, if we use a named configuration we run into issues preventing IDEs to import projects
180180
// (https://github.com/quarkusio/quarkus/issues/41825) and ./gradlew refreshVersions seems to break as well.
181-
Configuration conditionalDepConfiguration = project.getConfigurations()
182-
.detachedConfiguration()
183-
.extendsFrom(enforcedPlatforms);
181+
Configuration conditionalDepConfiguration = project.getConfigurations().detachedConfiguration();
182+
enforcedPlatforms.getExcludeRules().forEach(rule -> {
183+
conditionalDepConfiguration.exclude(Map.of(
184+
"group", rule.getGroup(),
185+
"module", rule.getModule()));
186+
});
187+
enforcedPlatforms.getAllDependencies().forEach(dependency -> {
188+
conditionalDepConfiguration.getDependencies().add(dependency);
189+
});
184190
conditionalDepConfiguration.getDependencies().add(conditionalDep);
185191
return conditionalDepConfiguration;
186192
}

devtools/gradle/gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugin-publish = "1.3.1"
55
kotlin = "2.0.21"
66
smallrye-config = "3.13.2"
77

8-
junit5 = "5.13.1"
8+
junit5 = "5.13.2"
99
assertj = "3.27.3"
1010

1111
[plugins]

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -825,9 +825,9 @@ private String handleAutoCompile(List<String> reloadPoms) throws MojoExecutionEx
825825
* @param reloadPoms POM files to be reloaded from disk instead of taken from the reactor
826826
* @return map of parameters for the Quarkus plugin goals
827827
*/
828-
private static Map<String, String> getQuarkusGoalParams(String bootstrapId, List<String> reloadPoms) {
828+
private Map<String, String> getQuarkusGoalParams(String bootstrapId, List<String> reloadPoms) {
829829
final Map<String, String> result = new HashMap<>(4);
830-
result.put(QuarkusBootstrapMojo.MODE_PARAM, LaunchMode.DEVELOPMENT.name());
830+
result.put(QuarkusBootstrapMojo.MODE_PARAM, getLaunchModeClasspath().name());
831831
result.put(QuarkusBootstrapMojo.CLOSE_BOOTSTRAPPED_APP_PARAM, "false");
832832
result.put(QuarkusBootstrapMojo.BOOTSTRAP_ID_PARAM, bootstrapId);
833833
if (reloadPoms != null && !reloadPoms.isEmpty()) {
@@ -1524,7 +1524,7 @@ private DevModeCommandLine newLauncher(String actualDebugPort, String bootstrapI
15241524
// the Maven resolver will be checking for newer snapshots in the remote repository and might end up resolving the artifact from there.
15251525
final BootstrapMavenContext mvnCtx = workspaceProvider.createMavenContext(mvnConfig);
15261526
appModel = new BootstrapAppModelResolver(new MavenArtifactResolver(mvnCtx))
1527-
.setDevMode(true)
1527+
.setDevMode(getLaunchModeClasspath().isDevOrTest())
15281528
.setTest(LaunchMode.TEST.equals(getLaunchModeClasspath()))
15291529
.setCollectReloadableDependencies(!noDeps)
15301530
.setLegacyModelResolver(BootstrapAppModelResolver.isLegacyModelResolver(project.getProperties()))

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
import org.apache.maven.plugins.annotations.Mojo;
55
import org.apache.maven.plugins.annotations.ResolutionScope;
66

7+
import io.quarkus.bootstrap.BootstrapConstants;
78
import io.quarkus.deployment.dev.DevModeCommandLineBuilder;
9+
import io.quarkus.runtime.LaunchMode;
810

911
/**
1012
* The dev mojo, that connects to a remote host.
@@ -15,4 +17,12 @@ public class RemoteDevMojo extends DevMojo {
1517
protected void modifyDevModeContext(DevModeCommandLineBuilder builder) {
1618
builder.remoteDev(true);
1719
}
20+
21+
@Override
22+
protected LaunchMode getLaunchModeClasspath() {
23+
// For remote-dev we should match the dependency model on the service side, which is a production mutable-jar,
24+
// so we return LaunchMode.NORMAL, but we need to enable workspace discovery to be able to watch for source code changes
25+
project.getProperties().putIfAbsent(BootstrapConstants.QUARKUS_BOOTSTRAP_WORKSPACE_DISCOVERY, "true");
26+
return LaunchMode.NORMAL;
27+
}
1828
}

devtools/project-core-extension-codestarts/src/main/resources/codestarts/quarkus/examples/amazon-lambda-example/codestart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tags: example
55
metadata:
66
title: Amazon Lambda Integration example
77
description: This example contains a Quarkus Greeting Lambda ready for Amazon.
8-
related-guide-section: https://quarkus.io/guides/amazon-lambda
8+
related-guide-section: https://quarkus.io/guides/aws-lambda
99
language:
1010
base:
1111
dependencies:

0 commit comments

Comments
 (0)