JaydenIsAPig
JaydenIsAPig

Reputation: 19

Having a dependency in spigot

So i have been messing around with twilio (if you don't know its a way to send phone messages through code), and i got it working by itself, and am trying to incorporate in into spigot, i am using twilio as a dependency for the plugin, but since twilio is not a plugin it does not work, here is the code (i think the code is fine, i just do not know how to make twilio a dependency)

     
    public static final String ACCOUNT_SID = "XXXXXXXXXXXXXX";
      public static final String AUTH_TOKEN = "XXXXXXXXXXXXXXX";
      
    @Override
     public void onEnable() {
         Message msg = Message.creator(new PhoneNumber("+1XXXYYYZZZZ"),
        new PhoneNumber("+1AAABBBCCCC"), "test").create();
        Bukkit.getConsoleSender().sendMessage(msg.getSid());
     }
     
     @Override
     public void onDisable() {
         }
}

so yeah tldr, how do i make a jar file a dependency if it is not a plugin?

btw i replaced a bunch of stuff with A B C X Y Z, because thoose are case sensative (such as phone numbers, and twilio acc info

Upvotes: 0

Views: 563

Answers (1)

ValentinLehmann
ValentinLehmann

Reputation: 11

I would use the shade plugin in maven to compile it into the output jar. Here is a documentation on how to use it: https://maven.apache.org/plugins/maven-shade-plugin/usage.html

If you're using IntelliJ as your IDE you could also just change the dependency type of twilio to compile to get it outputted into the final jar.

Upvotes: 1

Related Questions