8000 Stop using jboss-parent by Pepo48 · Pull Request #46241 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 43 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jboss</groupId>
<artifactId>jboss-parent</artifactId>
<version>39</version>
</parent>

<name>Keycloak</name>
<description>
Keycloak SSO
Expand Down Expand Up @@ -52,6 +46,8 @@

<project.build-time>${timestamp}</project.build-time>
<project.build-name>Keycloak</project.build-name>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- Following properties are used for downstream build to alter final distribution archive file name and internal base directory of the archive. -->
<dist.archive.file.prefix>keycloak</dist.archive.file.prefix>
Expand Down Expand Up @@ -190,6 +186,7 @@

<!-- Maven Plugins -->
<maven.plugins.version>3.13.1</maven.plugins.version>
<version.enforcer.plugin>3.6.2</version.enforcer.plugin>
<replacer.plugin.version>1.4.1</replacer.plugin.version>
<jboss.as.plugin.version>7.5.Final</jboss.as.plugin.version>
<jmeter.plugin.version>1.9.0</jmeter.plugin.version>
Expand All @@ -205,6 +202,14 @@
<openapi.generator.plugin.version>6.3.0</openapi.generator.plugin.version>
<build-helper-maven-plugin.version>3.2.0</build-helper-maven-plugin.version>
<spotless-plugin.version>3.0.0</spotless-plugin.version>
<maven-assembly-plugin.version>3.1.1</maven-assembly-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
@michalvavrik michalvavrik May 4, 2026 •
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quarkus is using maven-compiler 3.15.0, while you picked 3.13.0. Is this in order to align with Maven core and other plugins? Because only information in your PR / commits I found was "Should match the versions from jboss-parent to prevent conflicting versions." which does not add up, because JBoss Parent version 39 currently uses 3.8.1.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drichtarik this got postponed a bit and now it's ready to be merged. Should we keep these versions as they are or should we bump some of them? Thanks!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For product all we're trying to establish with the introduction of these lines, is to ensure that these plugin versions are defined. Removing jboss-parent otherwise allows them to float, which causes problems.

3.13 vs 3.15, I don't think it would matter, but we'd need to do more trial builds to confirm

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3.13 vs 3.15, I don't think it would matter, but we'd need to do more trial builds to confirm

FWIW the only reason why I was commenting here was because I tried to use annotationProcessorPathsUseDepMgmt which was introduced in 3.12. I am fine with 3.13, but it seems random and I think explanation on why these exact plugin versions were picked is missing. As long as there is a reason, np.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check with the team

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could perhaps split the two things; since we've tested this PR both for upstream and downstream releases we can keep it as is, then plan to upgrade plugins as a follow-up?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This one has been open for a long time. If you want to merge this PR as is or with 3.15, that's fine. As long as there is a dependency definition in the keycloak POMs, we can override the version at product build time if it breaks something, upstreaming fixes as appropriate.

<maven-clean-plugin.version>3.2.0</maven-clean-plugin.version>
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
<maven-failsafe-plugin.version>2.22.2</maven-failsafe-plugin.version>
<exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>

<!-- Surefire Settings -->
<surefire.memory.Xms>512m</surefire.memory.Xms>
Expand Down Expand Up @@ -1360,6 +1365,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
<configuration>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
Expand Down Expand Up @@ -1391,6 +1397,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -1501,6 +1508,36 @@
<verificationFile>target/verifier/verifications.xml</verificationFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven-failsafe-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-distribution-licenses-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void testPicocliClosuresDisabled(LaunchResult result) {
void testKcHomeDirPathFormat(LaunchResult result) {
String output = result.getOutput();
assertThat(output, containsString("kc.home.dir="));
assertThat(output, matchesPattern("(?s).*kc\\.home\\.dir=\"[A-Z]:/.*/target/kc-tests/keycloak-\\d+\\.\\d+\\.\\d+.*?/bin/\\.\\.\".*"));
assertThat(output, matchesPattern("(?s).*kc\\.home\\.dir=\"[A-Z]:/[^\"]*kc-tests/keycloak-\\d+\\.\\d+\\.\\d+[^\"]*?/bin/\\.\\.\".*"));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.keycloak.it.cli.dist;

import java.nio.file.Path;
import java.util.Optional;
import java.util.function.Consumer;

Expand Down Expand Up @@ -112,7 +113,8 @@ void testUnknownQuarkusBuildTimePropertyApplied(CLIResult cliResult) {
}

@Test
@Launch({ "start", "--http-enabled=true", "--hostname-strict=false", "--config-keystore=../../../../src/test/resources/keystore" })
@BeforeStartDistribution(QuarkusPropertiesDistTest.CopyKeystoreToConf.class)
@Launch({ "start", "--http-enabled=true", "--hostname-strict=false", "--config-keystore=../conf/keystore" })
@Order(9)
void testMissingSmallRyeKeyStorePasswordProperty(CLIResult cliResult) {
assertTrue(
Expand Down Expand Up @@ -151,8 +153,9 @@ void testInvalidSmallRyeKeyStorePathPropertyWin(CLIResult cliResult) {
}

@Test
@BeforeStartDistribution(QuarkusPropertiesDistTest.CopyKeystoreToConf.class)
@Launch({ "start", "--http-enabled=true", "--hostname-strict=false",
"--config-keystore=../../../../src/test/resources/keystore", "--config-keystore-password=secret" })
"--config-keystore=../conf/keystore", "--config-keystore-password=secret" })
@Order(12)
void testSmallRyeKeyStoreConfigSource(CLIResult cliResult) {
// keytool -importpass -alias kc.log-level -keystore keystore -storepass secret -storetype PKCS12 -v (with "org.keycloak.timer:debug" as the stored password)
Expand Down Expand Up @@ -219,4 +222,11 @@ public void accept(KeycloakDistribution distribution) {
}
}

public static class CopyKeystoreToConf implements Consumer<KeycloakDistribution> {
@Override
public void accept(KeycloakDistribution distribution) {
distribution.copyOrReplaceFileFromClasspath("/keystore", Path.of("conf", "keystore"));
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ void testShowConfigCommandHidesCredentialsInProfiles(KeycloakDistribution distri
@RawDistOnly(reason = "Containers are immutable")
void testSmallRyeKeyStoreConfigSource(KeycloakDistribution distribution) {
// keystore is shared with QuarkusPropertiesDistTest#testSmallRyeKeyStoreConfigSource
CLIResult result = distribution.run(String.format("%s=%s", CONFIG_FILE_LONG_NAME, Paths.get("src/test/resources/ShowConfigCommandTest/keycloak-keystore.conf").toAbsolutePath().normalize()), ShowConfig.NAME, "all");
CLIResult result = distribution.run(
String.format("%s=%s", CONFIG_FILE_LONG_NAME, Paths.get("src/test/resources/ShowConfigCommandTest/keycloak-keystore.conf").toAbsolutePath().normalize()),
"--config-keystore=" + Paths.get("src/test/resources/keystore").toAbsolutePath().normalize(),
ShowConfig.NAME, "all");
String output = result.getOutput();
assertThat(output, containsString("kc.config-keystore-password = " + PropertyMappers.VALUE_MASK));
assertThat(output, containsString("kc.log-level = " + PropertyMappers.VALUE_MASK));
Expand Down Expand Up @@ -108,7 +111,10 @@ void testConfigSourceNames(KeycloakDistribution distribution) {
distribution.setEnvVar("KC_LOG", "file");
distribution.copyOrReplaceFile(Paths.get("src/test/resources/ShowConfigCommandTest/quarkus.properties"), Path.of("conf", "quarkus.properties"));

result = distribution.run(String.format("%s=%s", CONFIG_FILE_LONG_NAME, Paths.get("src/test/resources/ShowConfigCommandTest/keycloak-keystore.conf").toAbsolutePath().normalize()), ShowConfig.NAME, "all", "--db=dev-file");
result = distribution.run(
String.format("%s=%s", CONFIG_FILE_LONG_NAME, Paths.get("src/test/resources/ShowConfigCommandTest/keycloak-keystore.conf").toAbsolutePath().normalize()),
"--config-keystore=" + Paths.get("src/test/resources/keystore").toAbsolutePath().normalize(),
ShowConfig.NAME, "all", "--db=dev-file");

result.assertMessage("(CLI)");
result.assertMessage("(ENV)");
Expand Down
Loading
0