Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sonar-pmd up to date with PMD 6.55, support up to java20-preview, and allow java21 #422

Closed
jborgers opened this issue Feb 2, 2024 · 8 comments
Assignees

Comments

@jborgers
Copy link
Owner

jborgers commented Feb 2, 2024

PMD 6.55 is the latest and probably the last PMD 6 release.
PMD 7 is backwards incompatible with PMD 6, so custom rules from pmd 6 will not work in pmd 7.
We would like to support LTS Java 21, however this is not supported by pmd 6.
Last one supported is java20-preview. It seems to cover all or at least most of the java 21 features.
We'd like to not break Sonar on Java 21, rather warn about it and log warn when it encounters a parse exception.

@jborgers jborgers self-assigned this Feb 2, 2024
@jborgers jborgers changed the title Make sonar-pmd up to date with last PMD 6.55, support up to java20-preview Make sonar-pmd up to date with PMD 6.55, support up to java20-preview Feb 2, 2024
@jborgers jborgers changed the title Make sonar-pmd up to date with PMD 6.55, support up to java20-preview Make sonar-pmd up to date with PMD 6.55, support up to java20-preview, and allow java21 Feb 2, 2024
jborgers added a commit that referenced this issue Mar 14, 2024
…or sonar 9.8.

* Dealt with various api changes.
* Removed support for Java versions <6, added support for 19, 19-preview, 20, 20-preview.
* use central maven as artifactory instead of jfrog which lost anonymous login.
* Part of: Make sonar-pmd up to date with PMD 6.55, support up to java20-preview, and allow java21 #422
jborgers added a commit that referenced this issue Mar 28, 2024
* Fixed: XML parsers should not be vulnerable to XXE attacks
* Part of: Make sonar-pmd up to date with PMD 6.55, support up to java20-preview, and allow java21 #422
jborgers added a commit that referenced this issue Mar 29, 2024
* Part of: Make sonar-pmd up to date with PMD 6.55, support up to java20-preview, and allow java21 #422
jborgers added a commit that referenced this issue Mar 29, 2024
* upgrade java frontend and plugin api dependencies
* Part of: Make sonar-pmd up to date with PMD 6.55, support up to java20-preview, and allow java21 #422
jborgers added a commit that referenced this issue Mar 29, 2024
* Part of: Make sonar-pmd up to date with PMD 6.55, support up to java20-preview, and allow java21 #422
@jborgers
Copy link
Owner Author

Release 3.5.0 is available here

@alixwar
Copy link

alixwar commented Apr 29, 2024

Release 3.5.0 is available here

Can you please also publish this release so that it becomes available in the SonarQube Marketplace?

https://community.sonarsource.com/t/deploying-to-the-marketplace/35236

@jborgers
Copy link
Owner Author

Yes, just set things in motion at SonarQube, see:
https://community.sonarsource.com/t/new-release-sonar-pmd-plugin-3-5-0/114447
SonarSource/sonar-update-center-properties#542
Waiting for approval by the SonarQube team...

@alixwar
Copy link

alixwar commented May 6, 2024

Hi, it seems that the new release is not compatible with Java 11. Could it be that this release is not in sync with the latest LTS version of SonarQube?

image (1) (1)

I reported it now as a separate issue: #464
This is blocking us from upgrading to the new version

@jborgers
Copy link
Owner Author

jborgers commented May 6, 2024 via email

@jborgers
Copy link
Owner Author

jborgers commented May 6, 2024

3.5.0 is available in the marketplace, so closing this issue

@jborgers jborgers closed this as completed May 6, 2024
@alixwar
Copy link

alixwar commented May 24, 2024

Hi, maybe this is expected but I get the following notice when analyzing using JDK 21 (I'm not sure if this is an error, warning or other):

"Requested Java version 21 ('sonar.java.source') is not supported by PMD. Using maximum supported version: 20-preview."

@jborgers
Copy link
Owner Author

Yes, it is expected. As far as I've tested, 20-preview is equal to 21. The scan does not break anymore, just warns and continues.
With the next major release we plan to support 21 and 22 (by using pmd-7).

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

No branches or pull requests

2 participants