Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8194922

jlink --exclude-resources should never exclude module-info.class

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9, 10, 11
    • Fix Version/s: 11
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b02

      Description

      Suppose module m1 requires m2. Now try the following commands:

      $ jlink --output myimage --module-path mods --add-modules m1 --exclude-resources /m1/module-info.class

      $ jlink --output myimage --module-path mods --add-modules m1 --exclude-resources glob:/m1/**

      $ jlink --output myimage --module-path mods --add-modules m1 --exclude-resources /m2/module-info.class
      Error: m2 not found

      $ jlink --output myimage --module-path mods --add-modules m1 --exclude-resources glob:/m2/**
      Error: m2 not found

      We need to re-examine the exclude-resources plugin as it was never intended to be able to change the module graph and drop modules list this. More generally, the exclude-resoures plugin makes it too easy to create a DOA image. If the plugin stays it should at least disallow excluding module-info.class.

        Attachments

          Activity

            People

            • Assignee:
              sundar Sundararajan Athijegannathan
              Reporter:
              alanb Alan Bateman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: