GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [core] chore: Bump minimum Java version required for building to 17 by adangel · Pull Request #6061 · pmd/pmd

Conversation

@adangel

@adangel adangel commented Sep 15, 2025

Copy link
Copy Markdown
Member

Describe the PR

Bumps the minimum Java version required for building PMD to Java 17.
This is only a build requirement. Java 17 is not required at runtime.

This should allow us to upgrade to checkstyle 11.

Related issues

  • Enables chore(deps): bump com.puppycrawl.tools:checkstyle from 10.26.1 to 11.0.1 #6034

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adangel adangel added this to the 7.18.0 milestone Sep 15, 2025
@adangel adangel added the in:pmd-internals Affects PMD's internals label Sep 15, 2025
@pmd-actions-helper

pmd-actions-helper Bot commented Sep 15, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.

Regression Tester Report

(comment created at 2025-09-26 10:21:36+00:00 for 5e78f88)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zbynek

zbynek commented Sep 19, 2025

Copy link
Copy Markdown
Contributor

For the differences in Checkstyle analysis: #6079

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adangel
[core] chore: Bump minimum required Java version to 17
e6b8b9b
This is only a build requirement. Java 17 is not required at runtime.
@adangel
adangel force-pushed the build-with-java17 branch from 07cbe9d to e6b8b9b Compare September 26, 2025 07:40
@adangel

adangel commented Sep 26, 2025

Copy link
Copy Markdown
Member Author

For the differences in Checkstyle analysis: #6079

It took me a while to understand... thanks for fixing the false-negative with Identical Catch branches. You are probably right, that these difference stem from the change from java 11 to java 17.

But this shows the following underlying issues:

  • pmd regression tester uses the java version, that is on the path. Which is now java 17. But: We don't configure PMD correctly yet, to also include a specific java version on the auxclasspath. This problem would be detected by (PoC) [java] Verify JDK API Version #5299 - but is not implemented yet. This means: whenever you change the runtime version of Java to run PMD, you also change the typeresolution. This means, we are still not in the place, that PMD's analysis is independent of the java version it is executed with.
  • pmd regression tester will build PMD on its own (which it doesn't do on the github actions, as it reused the previously built PMD binary) and uses the java version that is on the path. This PR raises it to Java 17, so this would work. But if I would have put "11" as the default, then pmd-regression-tester wouldn't be able to build PMD.

I think, we simply need to include the java classpath when generating the auxclasspath here:

pmd/.ci/files/project-list.xml

Line 31 in 31cdcfa

<auxclasspath-command>echo -n "$(pwd)/target/classes:$(pwd)/target/test-classes:"; cat classpath.txt</auxclasspath-command>

I'll give it a try...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adangel
Add java11 to auxclasspath
5e78f88
@adangel
adangel merged commit 6757c3b into pmd:main Oct 7, 2025
adangel added a commit that referenced this pull request Oct 7, 2025
@adangel
[doc] Update release notes (#6061)
ae16770
[skip ci]
@adangel
adangel deleted the build-with-java17 branch October 7, 2025 17:45
@adangel adangel mentioned this pull request Oct 21, 2025
[doc] Reproducible Build Documentation is outdated - PMD is now built using Java 17 #6149
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

in:pmd-internals Affects PMD's internals

Projects

None yet

Milestone

7.18.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@adangel @zbynek
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.