Zach Hoffman created DIRSTUDIO-1351:
---------------------------------------
Summary: Build fails on JDK 21 and newer because
antlr-maven-plugin installs a Security Manager.
Key: DIRSTUDIO-1351
URL: https://issues.apache.org/jira/browse/DIRSTUDIO-1351
Project: Directory Studio
Issue Type: Bug
Reporter: Zach Hoffman
The OpenLDAP ACL editor module (plugins/openldap.acl.editor) generates its
lexer and parser from src/main/antlr/Acl.g with
org.codehaus.mojo:antlr-maven-plugin:2.2. The plugin installs a Java Security
Manager to catch System.exit() calls from the ANTLR tool. Newer JDKs do not
allow this:
* JDK 18 to 23 reject it by default: The Security Manager is deprecated and
will be removed in a future release
* JDK 24 and newer no longer support it: Setting a Security Manager is not
supported
The build stops in the mvn -f pom-first.xml clean install step:
{code:java}
[ERROR] Failed to execute goal
org.codehaus.mojo:antlr-maven-plugin:2.2:generate (default) on project
org.apache.directory.studio.openldap.config.acl.editor: Execution default of
goal org.codehaus.mojo:antlr-maven-plugin:2.2:generate failed: The Security
Manager is deprecated and will be removed in a future release{code}
This breaks these GitHub Actions workflows for every pull request:
* "Build with OpenJDK 21"
* "CodeQL", which also fails in its scheduled runs on master. It runs on
ubuntu-latest (Ubuntu 26.04), which uses Java 25 by default.
h2. Steps to reproduce
# Check out master.
# Run mvn -f pom-first.xml clean install with JDK 21 or newer.
h2. Expected result
The build passes, as it does on JDK 17.
h2. Actual result
The build fails in the OpenLDAP ACL Configuration Editor module with the error
above.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]