1.15.2 Setting up Custom API with maven

Discussion in 'Spigot Plugin Development' started by Phoenix852, Feb 2, 2020.

  1. I am making a plugin with a API which doesn't actually have a dependency for maven's pom.xml. I want to know, how to add a dependency for my custom API.
  2. Nonono, I want to get the dependency of a custom api for maven. Just like the dependencies of the spigot and bukkit api.
  3. You need to either shade your API into your project or depend on it as part of a multi-module project.
    The other option would involve uploading your API to a public repository, but it's unnecessary if you don't intend to share your API. Even if you depended on it from a repository though, it would still need to be present during runtime (i.e.: loaded as a plugin by Spigot or with your own classloader).
  4. Any video tutorial? Please?
  5. You have two projects/modules, one for the plugin and one for the api, you shade the api into the plugin.
    Then when you want to use the api, you will depend on the api project/module (not the plugin project/module)
  6. @Phoenix852 I am trying to do something similar did you ever find a solution or a tutorial?
  7. When you host your code on GitHub you can use jitpack.
  8. Do you have any good video tutorials for how to use jitpack?