Skip to content

Modernize for Java 25 and publish under Amarula Solutions - #1

Merged
panicking merged 12 commits into
masterfrom
java25-modernization
Nov 21, 2026
Merged

panicking merged 12 commits into
masterfrom
java25-modernization

Conversation

@panicking

Copy link
Copy Markdown

Summary

This PR is the Java 25 modernization of OpenID4Java and the setup of the
Amarula Solutions fork.

  • Builds on JDK 25 and targets Java 17 bytecode; CI covers JDK 17, 21 and 25.
  • Removes the legacy InfoCard/local XRI modules, the Ant build, bundled JARs
    and obsolete samples.
  • Replaces EOL dependencies: log4j 1.x, xmlsec, HttpClient 4.5, Ehcache 2,
    and NekoHTML/Xerces in the main artifact.
  • Migrates the samples to Jakarta EE 10 / Jetty 12.
  • Switches Maven coordinates to com.amarulasolutions:openid4java:2.0.0;
    Java packages remain org.openid4java.
  • Adds GitHub Packages publishing on v* tags, an Enforcer rule, a CI
    matrix and Dependabot.
  • Removes the dead reporting/release plugins and fixes the project metadata.

Verification

  • mvn clean verify on JDK 25: 114 tests pass.
  • mvn clean test on JDK 17 and 21: 114 tests pass.
  • Both sample WARs build.

Notes

  • OpenID 2.0 is a deprecated protocol; this fork maintains the existing
    implementation, not OpenID Connect.
  • Pushing a v2.0.0 tag will run .github/workflows/publish.yml and deploy
    to GitHub Packages.

🤖 Generated with Claude Code

panicking and others added 12 commits November 21, 2026 10:27
javac 25 rejects the configured source and target level 1.7 with
"Source option 7 is no longer supported". Compile with release 17
instead; the build itself still runs on JDK 25 and the resulting
bytecode runs on 17, 21 and 25.

Update the Maven plugins that no longer work with modern JDKs:
compiler, surefire, antrun, resources, jar, source and javadoc.
Surefire 3 ignores the old <systemProperties> element shape, so use
<systemPropertyVariables>; without it every Yadis test fails to read
SERVLET_PORT. Antrun 3 expects <target> instead of <tasks>.

Repair the build against the dependency versions already selected:
Ehcache 2 exposes timeToLive and timeToIdle on CacheConfiguration,
not Cache; Spring 6 removed SimpleJdbcTemplate and the five-argument
SingleConnectionDataSource constructor; HSQLDB 2.x moved to the
org.hsqldb groupId. Add SLF4J and commons-io for the tests, and make
the commons-codec dependency explicit instead of relying on a
transitive one.

Narrow the compiler exclusion from the whole xri package to
LocalXriResolver.java. Discovery imports XriResolver, so excluding
the package made the Maven build uncompilable. LocalXriResolver
depends on OpenXRI, which is not on Maven Central.

Keep NekoHTML 1.9.22 because HtmlUnit 2.18 uses the same
org.cyberneko classes; pinning 1.9.10 fixes the Yadis head tests but
breaks the sample test. Restore the strict Yadis head handling by
disabling tag balancing for that parser and counting heads outside
<body>.

Add Automatic-Module-Name to the JAR manifest, and exclude the
unbuildable XRI implementation from the Javadoc and source JARs.

Verified with "mvn clean verify" on JDK 25 and "mvn clean test" on
JDK 17 and 21. All 114 tests pass.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
log4j 1.x is end of life and has known remote code execution and
JMSAppender vulnerabilities. The library never used it directly;
only the sample servlet test helper did, for NDC context. Replace
that with commons-logging, which the library already uses, and
delete the log4j test configuration.

xmlsec 1.3.0 was only listed in dependencyManagement and is not
used by the Maven build.

Move the test-only JDOM dependency to JDOM 2.0.6.1 and update the
RealmVerifierTest imports. JDOM 1.0 is unmaintained and predates
Java 6.

Add a .gitignore for the target, Ant build output and Maven
versionsBackup files.

Verified with "mvn clean verify" on JDK 25. All 114 tests pass.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
The InfoCard integration depends on Higgins STS and Axiom 1.2.2,
which are no longer buildable and were excluded from the Maven
build. The local XRI resolver depends on OpenXRI, which is not
published to Maven Central. Remove both. The HTTP-based
XriDotNetProxyResolver remains available.

Remove the Ant build, project.properties and the bundled lib/ JARs.
Maven is now the only supported build. Shipping the old JARs also
kept a number of unmaintained dependencies in the tree.

Remove the obsolete App Engine, InfoCard OP and Ant-only sample
projects. samples/ now contains simple-openid and consumer-servlet.

Move the SampleConsumer and SampleServer demo classes out of the
main artifact into the test sources, so the library JAR no longer
depends on the servlet API. Update the README, INSTALL, CHANGELOG
and samples documentation accordingly.

Bump the version to 2.0.0-SNAPSHOT; this is a breaking release.

Verified with "mvn clean verify" on JDK 25. All 114 tests pass.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Apache HttpClient 4.5 is end of life and no longer receives
security fixes. Replace it with HttpClient 5.6.

The public HTTP types follow the new dependency: HttpFetcherFactory
and HttpCache take a javax.net.ssl.HostnameVerifier instead of the
removed X509HostnameVerifier, HttpClientFactory returns a
CloseableHttpClient, HttpResponse exposes
org.apache.hc.core5.http.Header, and ProxyProperties returns
org.apache.hc.client5.http.auth.Credentials.

The connection factory now uses the HttpClient 5 registry and
connection managers, RequestConfig for redirects and timeouts, and
BasicCredentialsProvider for proxy authentication. Requests are
executed in try-with-resources blocks so the response, and not just
the entity, is closed.

Verified with "mvn clean verify" on JDK 25 and "mvn clean test" on
JDK 17 and 21. All 114 tests pass.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
The samples still used javax.servlet, JSTL 1.1 and Jetty 6. Move
them to Jakarta Servlet 6.0, JSP 3.1 and JSTL 3.0 with Jetty 12
EE10.

ConsumerServlet now uses jakarta.servlet and Commons Lang 3. The
JSP taglib URIs use the Jakarta JSTL namespace. Remove the log4j
configuration, since the library no longer depends on log4j.

simple-openid only uses JSPs; update its servlet imports, web.xml
and Jetty plugin, and drop the unused JSTL and Commons HttpClient
dependencies.

Add shared compiler, Surefire and WAR plugin versions to the
samples parent POM.

Verified by building both WARs and running them under Jetty 12
EE10; the consumer index and the provider XRDS page return HTTP
200.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Ehcache 2.10 is end of life. Replace it with Ehcache 3.10, which
uses javax.cache types and programmatic configuration.

EhcacheNonceVerifier now stores an org.ehcache.Cache<String, String>
and checks the cache's ExpiryPolicy for the TTL and TTI values.
The test creates its cache through CacheManagerBuilder and closes
the manager after each test.

Exclude Ehcache's optional jaxb-runtime dependency, which is only
needed for XML configuration and otherwise breaks the Maven build
by pulling old JAXB POMs that reference retired java.net
repositories.

Note that Ehcache 3.10 still calls sun.misc.Unsafe and triggers the
JDK 25 terminal deprecation warning; this is harmless.

Verified with "mvn clean verify" on JDK 25 and "mvn clean test" on
JDK 17 and 21. All 114 tests pass.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
NekoHTML 1.9.x is unmaintained and drags in Xerces for HTML
parsing. Replace it with jsoup, which is maintained and does not
require an XML parser.

Add JsoupHtmlParser and JsoupYadisHtmlParser, update the parser
properties and rename the parser tests. The Yadis parser keeps the
"exactly one HEAD" check by counting top-level HEAD tags in the
original markup, since jsoup normalizes malformed documents.

The regular HTML discovery parser stays lenient, as the old
NekoHTML configuration was: it extracts links from the parsed
head even when the source omitted one.

NekoHTML and Xerces remain test-only dependencies for jWebUnit and
HtmlUnit. The main artifact now depends on jsoup instead.

Verified with "mvn clean verify" on JDK 25 and "mvn clean test" on
JDK 17 and 21. All 114 tests pass.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Replace Class.newInstance() with getDeclaredConstructor().newInstance()
and the boxed Character, Long and Integer constructors with valueOf().
Compiling the main and test sources with --release 17 now produces no
deprecation or removal warnings.

Update the HttpClient 5 setup to the non-deprecated APIs:
PoolingHttpClientConnectionManagerBuilder with a
ClientTlsStrategyBuilder TLS strategy, ConnectionConfig for the
connect timeout, and response handlers instead of the deprecated
execute(ClassicHttpRequest) methods. NTCredentials remains for NTLM
proxy support and is locally suppressed.

Also ignore a missing openid4java-default.properties resource instead
of dereferencing null, annotate the already-documented deprecated
ConsumerManager methods with @deprecated, and upgrade the test-only
servlet API from the 3.0 alpha artifact to javax.servlet-api 4.0.1.

Verified with "mvn clean verify" on JDK 25 and "mvn clean test" on
JDK 17 and 21. All 114 tests pass.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Remove the dead reporting and release stack: Cobertura, FindBugs,
PMD, JXR, Checkstyle, taglist, RAT, the site and Eclipse plugins,
and the old Sonatype OSSRH distribution management. These no
longer work with modern Maven and JDKs.

Update the remaining plugin versions, drop the Maven 2
prerequisites, and add an Enforcer rule requiring JDK 17+ and
Maven 3.9+.

Point the project URL, SCM and issue tracker at the GitHub fork,
and update the README, CHANGELOG and sample links accordingly.
Remove references to the missing VERSION and apidoc files.

Add a GitHub Actions workflow that runs "mvn verify" on JDK 17,
21 and 25.

Verified with "mvn clean verify" on JDK 25, "mvn clean test" on
JDK 17 and 21, and a full rebuild of both samples. All 114 tests
pass.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Add a short note that this is the maintained fork and that OpenID
Authentication 2.0 is deprecated in favor of OpenID Connect.

Update the MAINTAINERS and TODO project links to the GitHub fork
and add a Dependabot configuration for the library and samples.

Verified with "mvn clean verify" on JDK 25. All 114 tests pass.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Switch the Maven coordinates to com.amarulasolutions:openid4java
and bump the version to 2.0.0 for the Amarula Solutions fork.
The Java packages and the automatic module name remain
org.openid4java for compatibility.

Add Amarula Solutions as the project organization and maintainer,
point the SCM and issue tracker at the Amarula fork, and configure
GitHub Packages as the deployment repository.

Add a tag-triggered workflow that deploys releases to GitHub
Packages with GITHUB_TOKEN.

Verified with "mvn clean verify" on JDK 25, "mvn clean test" on
JDK 17 and 21, and a full rebuild of both samples. All 114 tests
pass.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
Update the README and INSTALL for the new coordinates and the
GitHub Packages repository, including the authentication setup.

Add the Amarula fork attribution and the OpenID Foundation
disclaimer to the README and NOTICE, record the fork maintainer in
MAINTAINERS, and update the CHANGELOG and TODO links.

Verified with "mvn clean verify" on JDK 25. All 114 tests pass.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
@panicking
panicking merged commit d95855e into master Nov 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant