Skip to content

Commit ff6ef86

Browse files
committed
chore: polish build when logback is included automatically
1 parent 7a23a48 commit ff6ef86

File tree

6 files changed

+32
-26
lines changed

6 files changed

+32
-26
lines changed

ci/tests/puppeteer/scenarios/logging-with-logback/include.gradle

Lines changed: 0 additions & 10 deletions
This file was deleted.

ci/tests/puppeteer/scenarios/logging-with-logback/script.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ const assert = require("assert");
66
const browser = await cas.newBrowser(cas.browserOptions());
77
const page = await cas.newPage(browser);
88
await cas.gotoLogin(page);
9-
109
await cas.loginWith(page);
11-
1210
await cas.assertCookie(page);
1311
await cas.assertPageTitle(page, "CAS - Central Authentication Service Log In Successful");
1412
await cas.assertInnerText(page, "#content div h2", "Log In Successful");

ci/tests/puppeteer/scenarios/logging-with-logback/script.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
"--cas.monitor.endpoints.endpoint.defaults.access=ANONYMOUS",
1111

1212
"--logging.config=file:${PWD}/ci/tests/puppeteer/scenarios/${SCENARIO}/logback.xml"
13-
],
14-
"buildScript": "${PWD}/ci/tests/puppeteer/scenarios/${SCENARIO}/include.gradle"
13+
]
1514
}

gradle/webapp-dependencies.gradle

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
configurations {
2+
configureEach {
3+
withDependencies { deps ->
4+
def hasLogback = deps.any { it.group == 'org.apereo.cas' && it.name == 'cas-server-support-logback' }
5+
if (hasLogback) {
6+
it.exclude(group: "org.apache.logging.log4j", module: "log4j-api")
7+
it.exclude(group: "org.apache.logging.log4j", module: "log4j-jakarta-web")
8+
it.exclude(group: "org.apache.logging.log4j", module: "log4j-web")
9+
it.exclude(group: "org.apache.logging.log4j", module: "log4j-jcl")
10+
it.exclude(group: "org.apache.logging.log4j", module: "log4j-slf4j-impl")
11+
it.exclude(group: "org.apache.logging.log4j", module: "log4j-slf4j2-impl")
12+
it.exclude(group: "org.apereo.cas", module: "cas-server-core-logging")
13+
}
14+
}
15+
}
16+
}
17+
18+
119
dependencies {
220
implementation project(":core:cas-server-core")
321
implementation project(":core:cas-server-core-audit")

support/cas-server-support-syncope-authentication/src/main/java/org/apereo/cas/syncope/pm/SyncopePasswordManagementService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public boolean isAnswerValidForSecurityQuestion(final PasswordManagementQuery qu
200200
.resolve(casProperties.getAuthn().getPm().getSyncope().getUrl()),
201201
"/rest/users/verifySecurityAnswer");
202202

203-
LOGGER.debug("Check security answer validity for user [{}]", query.getUsername());
203+
LOGGER.debug("Checking security answer validity for user [{}]", query.getUsername());
204204
val exec = HttpExecutionRequest.builder().method(HttpMethod.POST).url(userSecurityAnswerUrl)
205205
.basicAuthUsername(casProperties.getAuthn().getPm().getSyncope().getBasicAuthUsername())
206206
.basicAuthPassword(casProperties.getAuthn().getPm().getSyncope().getBasicAuthPassword())

webapp/cas-server-webapp-native/build.gradle

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,18 @@ ext {
2323

2424
configurations {
2525
configureEach {
26-
/*
27-
Log4j does not support Graal VM and leads to com.oracle.svm.core.jdk.UnsupportedFeatureError:
28-
Defining hidden classes at runtime is not supported. We use logback instead.
29-
*/
30-
// exclude(group: "org.apache.logging.log4j", module: "log4j-api")
31-
// exclude(group: "org.apache.logging.log4j", module: "log4j-jakarta-web")
32-
// exclude(group: "org.apache.logging.log4j", module: "log4j-web")
33-
// exclude(group: "org.apache.logging.log4j", module: "log4j-jcl")
34-
// exclude(group: "org.apache.logging.log4j", module: "log4j-slf4j-impl")
35-
// exclude(group: "org.apache.logging.log4j", module: "log4j-slf4j2-impl")
36-
// exclude(group: "org.apereo.cas", module: "cas-server-core-logging")
26+
withDependencies { deps ->
27+
def hasLogback = deps.any { it.group == 'org.apereo.cas' && it.name == 'cas-server-support-logback' }
28+
if (hasLogback) {
29+
it.exclude(group: "org.apache.logging.log4j", module: "log4j-api")
30+
it.exclude(group: "org.apache.logging.log4j", module: "log4j-jakarta-web")
31+
it.exclude(group: "org.apache.logging.log4j", module: "log4j-web")
32+
it.exclude(group: "org.apache.logging.log4j", module: "log4j-jcl")
33+
it.exclude(group: "org.apache.logging.log4j", module: "log4j-slf4j-impl")
34+
it.exclude(group: "org.apache.logging.log4j", module: "log4j-slf4j2-impl")
35+
it.exclude(group: "org.apereo.cas", module: "cas-server-core-logging")
36+
}
37+
}
3738
/*
3839
* Micrometer support for Java 21's virtual threads is disabled,
3940
* because: java.lang.IllegalArgumentException:

0 commit comments

Comments
 (0)