Repository navigation
Conversation
PMDConfiguration now stores the given raw auxClasspath as string. For backwards compatibility, a classloader can still be set externally when using the programmatic API. But usually (e.g. via CLI), the auxClasspath is set now via the JvmLanguagePropertyBundle only, which creates the actual classloader only when requested. This means, the classloader is not created anymore eagerly by PMDConfiguration. The given auxClasspath is checked early for validity. All files/directories must exist.
At least maven-pmd-plugin might provide a directory, which doesn't exist, e.g. "target/test-classes". As we don't check the auxclasspath for completeness (which we can't anyway at this point), there is no difference between a non-existing directory or an empty directory or an incomplete directory. The result is the same: the provided auxclasspath is incomplete. The reason for the empty/non-existing directory might be, that the project being analyzed was not compiled yet - but we don't know. Later on, when trying to resolve classes from the auxclasspath and we don't find classes, we can report this problem, as we know for sure, that the auxclasspath is incomplete (see pmd#5064). For now, we only log a warning for each suspicious auxClasspath entry.
adangel
commented
Jul 9, 2026
Contributor
|
Compared to main: (comment created at 2026-07-10 12:45:45+00:00 for 719f55c) |
This comment was marked as resolved.
This comment was marked as resolved.
adangel
marked this pull request as draft
July 9, 2026 12:07
4 of 8 tasks
adangel
marked this pull request as ready for review
July 13, 2026 17:42
UncleOwen
approved these changes
Jul 15, 2026
adangel
deleted the
core/issue-4953-deprecate-pmdconfiguration-classloader
branch
July 16, 2026 14:42
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.
Describe the PR
This is my new attempt on fixing #4953.
We keep it simple: PMDConfiguration just manages now a String, which is the auxClasspath. No Classloader anymore, no fancy API (like Classpath...).
This also fixes the problem, that Kotlin is currently facing. Setting the
--aux-classpathCLI parameter never ended up in JvmLanguagePropertyBundle#AUX_CLASSPATH . The only way was setting the property programmatically. Now the classloader is created not by PMDConfiguration, but by JvmLanguagePropertyBundle (the code was already there but mostly unused). This means, that this commit 4c043ae is not needed anymore.This PR replaces the old PRs #6312 and #6398
Related issues
Ready?
./mvnw clean verifypasses (checked automatically by github actions)