-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37434 from gsmet/3.6.1-backports-1
3.6.1 backports 1
- Loading branch information
Showing
79 changed files
with
767 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...oyment/src/main/java/io/quarkus/deployment/builditem/SetClassPathSystemPropBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io.quarkus.deployment.builditem; | ||
|
||
import io.quarkus.builder.item.MultiBuildItem; | ||
|
||
/** | ||
* A marker build item to make Quarkus set the {@code java.class.path} system property. | ||
* This system property is used in rare by libraries (Truffle for example) to create their own ClassLoaders. | ||
* The value of the system property is simply best effort, as there is no way to faithfully represent | ||
* the Quarkus ClassLoader hierarchies in a system property value. | ||
*/ | ||
public final class SetClassPathSystemPropBuildItem extends MultiBuildItem { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
core/deployment/src/main/java/io/quarkus/deployment/steps/ClassPathSystemPropBuildStep.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package io.quarkus.deployment.steps; | ||
|
||
import java.nio.file.Path; | ||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
import java.util.stream.Stream; | ||
|
||
import io.quarkus.deployment.annotations.BuildProducer; | ||
import io.quarkus.deployment.annotations.BuildStep; | ||
import io.quarkus.deployment.annotations.ExecutionTime; | ||
import io.quarkus.deployment.annotations.Record; | ||
import io.quarkus.deployment.builditem.SetClassPathSystemPropBuildItem; | ||
import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem; | ||
import io.quarkus.maven.dependency.ResolvedDependency; | ||
import io.quarkus.runtime.ClassPathSystemPropertyRecorder; | ||
|
||
public class ClassPathSystemPropBuildStep { | ||
|
||
@BuildStep | ||
public void produce(BuildProducer<SetClassPathSystemPropBuildItem> producer, CurateOutcomeBuildItem curateOutcome) { | ||
boolean truffleUsed = curateOutcome.getApplicationModel().getDependencies().stream() | ||
.anyMatch(d -> d.getGroupId().equals("org.graalvm.polyglot")); | ||
if (truffleUsed) { | ||
producer.produce(new SetClassPathSystemPropBuildItem()); | ||
} | ||
} | ||
|
||
@BuildStep | ||
@Record(ExecutionTime.STATIC_INIT) | ||
public void set(List<SetClassPathSystemPropBuildItem> setCPItems, | ||
CurateOutcomeBuildItem curateOutcome, | ||
ClassPathSystemPropertyRecorder recorder) { | ||
if (setCPItems.isEmpty()) { | ||
return; | ||
} | ||
Collection<ResolvedDependency> runtimeDependencies = curateOutcome.getApplicationModel().getRuntimeDependencies(); | ||
List<Path> parentFirst = new ArrayList<>(); | ||
List<Path> regular = new ArrayList<>(); | ||
for (ResolvedDependency dependency : runtimeDependencies) { | ||
if (dependency.isClassLoaderParentFirst()) { | ||
parentFirst.addAll(dependency.getContentTree().getRoots()); | ||
} else { | ||
regular.addAll(dependency.getContentTree().getRoots()); | ||
|
||
} | ||
} | ||
String classPathValue = Stream.concat(parentFirst.stream(), regular.stream()).map(p -> p.toAbsolutePath().toString()) | ||
.collect(Collectors.joining(":")); | ||
recorder.set(classPathValue); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
core/runtime/src/main/java/io/quarkus/runtime/ClassPathSystemPropertyRecorder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.quarkus.runtime; | ||
|
||
import io.quarkus.runtime.annotations.Recorder; | ||
|
||
@Recorder | ||
public class ClassPathSystemPropertyRecorder { | ||
|
||
public void set(String value) { | ||
System.setProperty("java.class.path", value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
# https://gradle.org/release-checksums/ | ||
distributionSha256Sum=f2b9ed0faf8472cbe469255ae6c86eddb77076c75191741b4a462f33128dd419 | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip | ||
distributionSha256Sum=c16d517b50dd28b3f5838f0e844b7520b8f1eb610f2f29de7e4e04a1b7c9c79b | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
2 changes: 1 addition & 1 deletion
2
...odestarts/grpc-codestart/base/src/main/resources/META-INF/resources/index.entry.qute.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{#include index-entry} | ||
{#body}<br />› It can be tested in the <a href="/q/dev-v1/io.quarkus.quarkus-grpc/services">Dev UI</a> (available in dev mode only). | ||
{#body}<br />› It can be tested in the <a href="/q/dev-ui/io.quarkus.quarkus-grpc/services">Dev UI</a> (available in dev mode only). | ||
{/include} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.