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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • 9, 10, 11
    • tools
    • None
    • b02

      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.

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

              Created:
              Updated:
              Resolved: