Skip to content

Update maven-dependency-analyzer to support Java24 #528

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

talios
Copy link

@talios talios commented May 13, 2025

This commit updates the analyser version which supports reading byte code generated by Java 24.

Fixes #524

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.

  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.

  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.

  • Run mvn verify to make sure basic checks pass.

  • You have run the integration tests successfully (mvn -Prun-its verify). They build under Java 23 with some errors, but fail to build under 24.

    Build Summary:
    [INFO]   Passed: 84, Failed: 1, Errors: 0, Skipped: 0
    [INFO] -------------------------------------------------
    [ERROR] The following builds failed:
    [ERROR] *  mdep-779-analyze-only-verbose-shows-class-names/pom.xml
    

This IT test passes without the analyzer update. I'll take a look later when I have time to see if I see whats failing, tho I'm unfamiliar with both code bases.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

This commit updates the analyser version which supports reading byte
code generated by Java 24.

Fixes apache#524
@elharo elharo self-requested a review May 19, 2025 02:30
@anuragagarwal561994
Copy link

Screenshot 2025-06-18 at 6 45 38 PM

I think there is no issue as such but this dependency is not used and declared, I compiled on my local as well and it works.

@elharo
Copy link
Contributor

elharo commented Jun 18, 2025

Tests failed:

Running post-build script: /home/runner/work/maven-dependency-plugin/maven-dependency-plugin/target/it/mdep-779-analyze-only-verbose-shows-class-names/verify.bsh
java.lang.Exception: Expected warning missing
at java.base/jdk.internal.reflect.NativeConstructorAcc

Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the warning is

String expected = "[WARNING] Used undeclared dependencies found:\n" +
                  "[WARNING]    xml-apis:xml-apis:jar:1.4.01:compile\n" +
                  "[WARNING]       class org.apache.xmlcommons.Version\n" +
                  "[WARNING] Unused declared dependencies found:\n" +
                  "[WARNING]    net.java.dev.msv:xsdlib:jar:2022.7:compile";

The new version of the dependency analyzer specifically avoids warning about xml-apis:xml-apis so the upgrade does require this fix.

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.

Analyzing a project with Java 24 as a compilation target doesn't work
3 participants