Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-2268

Tests run under classpath if JDK 23 is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5.0
    • 3.5.1
    • Maven Surefire Plugin
    • None

    Description

      Something odd is going on with JDK 23. If I run my tests under JDK 21 or JDK 22 they run under the module-path. If I change "maven.compiler.release" to 23, then all of a sudden Surefire is running the tests on the classpath. It's odd. I'm not changing anything else about my code. If I run:
       
      LoggerFactory.getLogger(getClass()).info("class: {}, module: {}", getClass(),
      getClass().getModule().toString());
       
      under JDK 21, I get a module name. Under JDK 23, I get "unnamed module" and module-specific functionality breaks (e.g. Module.getDescriptor() returns null).
       
      Have you tried running any of the integration tests under JDK 23? I'm hoping you can reproduce the problem on your end...

      Attachments

        Issue Links

          Activity

            People

              sjaranowski Slawomir Jaranowski
              cowwoc Gili
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: