Why does my plugin need a "META-INF/MANIFEST.MF" file?

Discussion in 'BukkitDev Information and Feedback' started by Scyntrus, Dec 9, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    Scyntrus

    My plugin was automatically rejected for not having a "META-INF/MANIFEST.MF" file.
    This file is not necessary and there was previously no requirement to have one.
     
    DoggyCode™ likes this.
  2. Offline

    bwfcwalshy Retired Staff

    @Scyntrus Yep I tweeted about this myself, honestly it is completely unneeded and stupid to ask for it. It's only needed if they executed the jar it will return that error, which makes me think for some weird reason they execute the jar as some automatic service.

    It would be nice to have an official reason why this is needed.
     
  3. Offline

    Necrodoom_V2

    Googling around a bit, looks like their "manual" plugin checker expects the plugin to actually be a forge mod.
     
  4. Offline

    ZeldoKavira Administrator Curse

    This is part of the upload process verification, I'll talk to the devs and see if we can get it changed. The new site has structure checks on everything uploaded (most useful for WoW where any variation and the addon will not load) and it seems they thought this would be needed. When creating a jar via the normal means this is usually created, how are you guys packaging your jars?

    Edit: Looks like the devs were at their PC's, this requirement should be gone now.
     
  5. Offline

    bwfcwalshy Retired Staff

    @ZeldoKavira There are two ways to make the jar, you make just a jar file or you make a runnable jar. The difference is the second one is meant to allow the user to run it. This mean Java needs to find the main class so that requires a META-INF. All plugins are created as just a jar file as they are loaded and ran by Bukkit, this is also why Bukkit has the plugin.yml so they can find the main class and load that easily.

    I would see no reason in forcing people to export as a runnable jar when they have always just been fine exporting as a jar file. It also means that the jar file could be ran by the user and could cause some bad things to happen even if they arent intended. Running a jar like that would not open a GUI or console, it would silently run.

    Anyway, I hope this has gone and I will be sure to check for it when I release Soul Shards v2
    Thank you for taking action on this.
     
  6. Online

    timtower Moderator Moderator

    @bwfcwalshy I don't export runnable jars yet I have meta inf folders in every single one of them.
     
  7. Offline

    I Al Istannen

    @timtower
    Maven adds them, but they are not standard for IntelliJ artifacts as far as I know.
    The creation of one is not needed, so why would you force users to include it?
     
  8. Online

    timtower Moderator Moderator

  9. Offline

    bwfcwalshy Retired Staff

    @timtower That's interesting, I've never had that before only with Maven and as @I Al Istannen said Maven does that. Still don't see why it would force others to do it though, some I guess may have them but I'd assume the vast majority don't.
     
    DoggyCode™ likes this.
  10. Offline

    Tecno_Wizard

    @I Al Istannen I believe IntelliJ does... Just the jarring utility in the first place adds it, regardless of the content.

    EDIT: IntelliJ does add the manifest regardless. IDK how it's even possible to create a jar without a manifest tbh.
     
  11. Offline

    bwfcwalshy Retired Staff

    @Tecno_Wizard IntelliJ never has for me, by default it doesn't and just says (No warning) that the jar doesn't contain one.
     
  12. Offline

    Tecno_Wizard

    @bwfcwalshy, odd.

    Unrelated, but it is possible to make a jar without the manifest apparently. It's the -M flag. But even my plugins have the manifest and I have never explicitly added them. Look.
    Image (open)
    Screen Shot 2016-12-12 at 1.22.22 PM.png
     
  13. Offline

    AlvinB

    @Tecno_Wizard
    @bwfcwalshy is correct. If you don't specify a main class or link to an external manifest, IntelliJ will by default create the jar without a manifest.
     
Thread Status:
Not open for further replies.

Share This Page