Skip to content

Commit

Permalink
Merge pull request #22087 from gsmet/2.5.2-backports-2
Browse files Browse the repository at this point in the history
2.5.2 backports 2
  • Loading branch information
gsmet authored Dec 10, 2021
2 parents 2a48003 + 41ef349 commit 286b3ba
Show file tree
Hide file tree
Showing 7 changed files with 2,087 additions and 139 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ ArtifactResultBuildItem nativeSourcesResult(NativeConfig nativeConfig,
PackageConfig packageConfig,
List<NativeImageSystemPropertyBuildItem> nativeImageProperties,
List<ExcludeConfigBuildItem> excludeConfigs,
NativeImageAllowIncompleteClasspathAggregateBuildItem incompleteClassPathAllowed) {
NativeImageAllowIncompleteClasspathAggregateBuildItem incompleteClassPathAllowed,
List<NativeImageSecurityProviderBuildItem> nativeImageSecurityProviders) {

Path outputDir;
try {
Expand All @@ -105,12 +106,14 @@ ArtifactResultBuildItem nativeSourcesResult(NativeConfig nativeConfig,
.setNativeConfig(nativeConfig)
.setOutputTargetBuildItem(outputTargetBuildItem)
.setNativeImageProperties(nativeImageProperties)
.setBrokenClasspath(incompleteClassPathAllowed.isAllow())
.setExcludeConfigs(excludeConfigs)
.setBrokenClasspath(incompleteClassPathAllowed.isAllow())
.setNativeImageSecurityProviders(nativeImageSecurityProviders)
.setOutputDir(outputDir)
.setRunnerJarName(runnerJar.getFileName().toString())
// the path to native-image is not known now, it is only known at the time the native-sources will be consumed
.setNativeImageName(nativeImageName)
.setGraalVMVersion(GraalVM.Version.CURRENT)
.build();
List<String> command = nativeImageArgs.getArgs();
try (FileOutputStream commandFOS = new FileOutputStream(outputDir.resolve("native-image.args").toFile())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.SslNativeConfigBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBundleBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.jdbc.derby.runtime.DerbyAgroalConnectionConfigurer;

Expand Down Expand Up @@ -47,11 +48,14 @@ void configureAgroalConnection(BuildProducer<AdditionalBeanBuildItem> additional
}

@BuildStep
void registerDriverForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass) {
void registerDriverForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
BuildProducer<NativeImageResourceBundleBuildItem> nativeImageResourceBundles) {
//Not strictly necessary when using Agroal, as it also registers
//any JDBC driver being configured explicitly through its configuration.
//We register it for the sake of people not using Agroal.
reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, org.apache.derby.jdbc.ClientDriver.class.getName()));

nativeImageResourceBundles.produce(new NativeImageResourceBundleBuildItem("org/apache/derby/loc/clientmessages"));
}

@BuildStep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ protected void configure() {
Path filePath = Paths.get(realmPath.get());
if (Files.exists(filePath)) {
realmFileExists = true;
withFileSystemBind(realmPath.get(), KEYCLOAK_DOCKER_REALM_PATH, BindMode.READ_ONLY);
realmNameToUse = configuredRealmName.isPresent() ? null
: getRealmNameFromRealmFile(filePath.toUri(), realmPath.get());
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
quarkus.oidc.auth-server-url=${keycloak.url}/realms/quarkus/
quarkus.oidc.client-id=quarkus-app
quarkus.oidc.client-id=backend-service
quarkus.oidc.credentials.secret=secret

quarkus.keycloak.devservices.realm-path=${project.build.directory}/classes/quarkus-realm.json

quarkus.oidc-client.auth-server-url=${quarkus.oidc.auth-server-url}
quarkus.oidc-client.client-id=${quarkus.oidc.client-id}
quarkus.oidc-client.credentials.secret=${quarkus.oidc.credentials.secret}
Expand Down
Loading

0 comments on commit 286b3ba

Please sign in to comment.