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

Main classes not included in classpath when using Java Modules

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 3.0.0-M4
    • None
    • classloading
    • None
    • Windows 10, JDK 11

    Description

      According to the documentation, the `classes` directory should be put on the classpath by default.

      In this case, given that I have a `demo` package in both my main sources and my test source, the enumeration `classLoader.getResources("demo")` should have 2 URLs in it. One for the package in the test sources and one for the main sources.

      When using the Java Module System, this is not the case. Instead, I get two URLs, both for the test sources. This error does not occur when not using the module system.

      I created a repository, which can reproduce this error. It can be found here

      Attachments

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              rolaca11 László Stahorszki
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: