Solved Maven build including libraries

Discussion in 'Plugin Development' started by daboross, Jun 29, 2013.

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

    daboross

    This isn't particular to bukkit, but I haven't found anything on StackExchange or the maven sights, so I am posting here. I will post a question on StackExchange if this isn't appropriate here.
    Now to the question:

    I have a plugin that includes a library inside of it (that I created), and I need to build the plugin with that library compiled into the jar. I have added the library as a dependency, but I am not sure what else to do.
    When I build a 'jar-with-dependencies', I end up with something that includes ALL of my dependencies, including Vault, Bukkit, and any other plugins I rely on. I need to compile the project with around 2 of my dependencies, and not include any others.

    I was able to do this in Netbeans by adding to my build.xml, but I can't find a way to do this inside Maven.

    This is my pom.xml: https://github.com/daboross/PlayerData/blob/master/pom.xml
    Specifically I need to include the CommandExecutorBase and DXMLLibrary inside the jar, while leaving Bukkit and Vault out of it.

    Edit:
    I ended up using maven-shade-plugin. It isn't perfect but it works.
    I am not watching this thread anymore so please tahg me if you reply.
     
Thread Status:
Not open for further replies.

Share This Page