This is an automated email from the ASF dual-hosted git repository. jamesfredley pushed a commit to branch fix/ehcache-jakarta-pom-classifier in repository https://gitbox.apache.org/repos/asf/grails-spring-security.git
commit a6e8acfde30fb1792eb212fde7ff9113254f4696 Author: James Fredley <[email protected]> AuthorDate: Fri Feb 20 18:20:10 2026 -0500 Fix ehcache jakarta classifier missing from published POM The capability-based dependency declaration (requireCapability) correctly resolves the jakarta variant for Gradle consumers via module metadata, but the published POM lacks the classifier element. This causes Maven consumers and Gradle builds that fall back to POM resolution to pull the javax variant, resulting in NoClassDefFoundError for javax.xml.bind. Add pom.withXml customization to inject <classifier>jakarta</classifier> on the ehcache dependency in generated POMs. Fixes #1208 Assisted-by: Claude Code <[email protected]> --- gradle/publish-config.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gradle/publish-config.gradle b/gradle/publish-config.gradle index af00aecb8..9d7195152 100644 --- a/gradle/publish-config.gradle +++ b/gradle/publish-config.gradle @@ -52,6 +52,18 @@ afterEvaluate { } } if (project.plugins.hasPlugin("maven-publish")) { + publishing.publications.withType(MavenPublication).configureEach { MavenPublication publication -> + publication.pom.withXml { + asNode().dependencies?.dependency?.findAll { + it.groupId.text() == 'org.ehcache' && it.artifactId.text() == 'ehcache' + }?.each { + if (!it.classifier) { + it.appendNode('classifier', 'jakarta') + } + } + } + } + def checksumTask = tasks.register("publishedChecksums", Checksum) checksumTask.configure { Checksum check -> check.checksumAlgorithm = Checksum.Algorithm.SHA512
