Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-4265

Provide automatic module name

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • java version "10" 2018-03-20
      Java(TM) SE Runtime Environment 18.3 (build 10+46)
      Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode)

    • git-Spigot-417cfb3-a0a27e5
    • Yes

      As a plugin developer that likes to live on the bleeding edge, I want to use jigsaw modules for my plugins. Bukkit however does not provide a module, so I'll just have to use the file-name based module name `bukkit`. This is considered bad practice, especially if I publish my plugin on a repository, or on the SpigotMC forums for that sake.

      Now that Java 11 (which will be the new LTS release) is around the corner it makes sense for bukkit to provide a module. The easiest way to do this is specifying an automatic module in bukkit's pom.xml since it doesn't require the project to target Java 9 (or later) and all packages will be exported. Since module names must be unique I suggest to use the following format: <domain>.<artifact> all in lowercase. For the bukkit api that would look as follows:

      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-jar-plugin</artifactId>
      <version>3.1.0</version>
      <configuration>
      <archive>
      <manifestEntries>
      <Automatic-Module-Name>org.bukkit.bukkit</Automatic-Module-Name>
      </manifestEntries>
      </archive>
      </configuration>
      </plugin>

            Unassigned Unassigned
            Jannyboy11 Jan Boerman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: