Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1693

module-info declares jakarta.mail as a transitive dependency, but pom.xml does not

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.4.4, 1.3.4
    • 1.4.2, 1.4.3
    • logback-core
    • None
    • Maven 3.8.6

      JDK 17

      modular downstream project, which requires ch.qos.logback.core.

    Description

      Hooray, yet another modules-related issue 😉 

      After updating logback-core from 1.4.1 to 1.4.2+, I started getting this error from maven-compiler-plugin:

      module not found: jakarta.mail
      

      This surprised me, as I didn't declare any{{requires}} in my module-info. However, when opening the module-info of logback-core, my IDE highlighted the problem:

       

      Note that missing modules don't cause any problems with requires static, as expected. However as soon as we add transitive, they are required by downstream modules.

      It is my understanding that transitive should only be used, if the module exposes public API which uses classes from the corresponding module. Is this really the case for jakarta.mail? If so, I guess they should be added as a (non-optional) dependency.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            overheadhunter Sebastian Stenzel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: