Skip to content

Replace QDox with JavaParser - #225

Open
wilx wants to merge 1 commit into
codehaus-plexus:masterfrom
wilx:agent/replace-qdox-with-javaparser
Open

Replace QDox with JavaParser#225
wilx wants to merge 1 commit into
codehaus-plexus:masterfrom
wilx:agent/replace-qdox-with-javaparser

Conversation

@wilx

@wilx wilx commented Jul 28, 2026

Copy link
Copy Markdown

Summary

  • replace QDox with JavaParser Core for source module descriptor parsing
  • parse only the supplied module-info.java instead of registering the complete source directory
  • preserve the existing JPMS descriptor model and cover annotated types and multiple service providers

Motivation

SourceModuleInfoParser registered the descriptor's parent directory with QDox. Resolving uses and provides directives could then parse referenced service sources and reject valid annotated types before the Java compiler was invoked. Reading the directive names directly from the module-info.java AST avoids that unrelated source traversal.

QDox is end-of-life; see the Status section in its README.

Testing

  • JAVA_HOME=/opt/jdks/latest-21 /opt/maven/latest/bin/mvn verify — 79 unit tests and 4 integration tests passed
  • JAVA_HOME=/opt/jdks/latest-8 /opt/maven/latest/bin/mvn -pl plexus-java test — passed with 4 JDK-specific skips
  • compiled the annotated-type regression fixture with javac --release 9

Parse module-info.java directly instead of registering its source directory with QDox. This avoids parsing referenced service implementations while collecting JPMS directives and supports current Java syntax.

Fixes apache/maven-compiler-plugin#314
@wilx
wilx marked this pull request as ready for review July 28, 2026 13:48
@wilx

wilx commented Jul 28, 2026

Copy link
Copy Markdown
Author

@slachiewicz Please review.

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