Repository navigation
Conversation
Fixes <https://issues.apache.org/jira/browse/DIRSTUDIO-1351>. Builds on JDK 21 and newer fail in the OpenLDAP ACL editor module: antlr-maven-plugin 2.2 installs a Java Security Manager to trap System.exit() calls from the ANTLR tool. JDK 18+ rejects this by default ("The Security Manager is deprecated and will be removed"), and JDK 24+ no longer supports it ("Setting a Security Manager is not supported"). This breaks the "Build with OpenJDK 21" workflow and the CodeQL workflow, including the scheduled CodeQL runs on master. Replace antlr-maven-plugin in both pom-first.xml and pom.xml of plugins/openldap.acl.editor with maven-antrun-plugin, which runs antlr.Tool (ANTLR 2.7.7) in a forked JVM during generate-sources and writes the lexer and parser to the same directory as before, target/generated-sources/antlr. In pom-first.xml, add build-helper-maven-plugin to register that directory as a source root, which antlr-maven-plugin did before. pom.xml does not need it because build.properties already lists the directory for Tycho. Verified that the generated lexer, parser and token types match the antlr-maven-plugin output, that the full build (pom-first.xml and pom.xml) passes on JDK 17 and 21, and that the pom-first.xml build passes on JDK 25. The pom.xml build on JDK 25 fails for a separate reason: the JDK XML parser limits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes DIRSTUDIO-1351.
Builds on JDK 21 and newer fail in the OpenLDAP ACL editor module: antlr-maven-plugin 2.2 installs a Java Security Manager to trap System.exit() calls from the ANTLR tool. JDK 18+ rejects this by default ("The Security Manager is deprecated and will be removed"), and JDK 24+ no longer supports it ("Setting a Security Manager is not supported"). This breaks the "Build with OpenJDK 21" workflow and the CodeQL workflow, including the scheduled CodeQL runs on master.
Replace antlr-maven-plugin in both pom-first.xml and pom.xml of plugins/openldap.acl.editor with maven-antrun-plugin, which runs antlr.Tool (ANTLR 2.7.7) in a forked JVM during generate-sources and writes the lexer and parser to the same directory as before, target/generated-sources/antlr. In pom-first.xml, add build-helper-maven-plugin to register that directory as a source root, which antlr-maven-plugin did before. pom.xml does not need it because build.properties already lists the directory for Tycho.
Verified that the generated lexer, parser and token types match the antlr-maven-plugin output, that the full build (pom-first.xml and pom.xml) passes on JDK 17 and 21, and that the pom-first.xml build passes on JDK 25. The pom.xml build on JDK 25 fails for a separate reason: the JDK XML parser limits (#124, DIRSTUDIO-1352).