Solved IntelliJ IDEA| Add a jar to your project

Discussion in 'Spigot Plugin Development' started by PabloGamer380YT, May 12, 2017.

  1. Hello, I was trying to add a .jar to my project, without needing to add a repository in the Pom, since the Plugin has no online repository for being private, and I have no idea how to do it, I was watching some tutorials, but not I did not run or run them wrong, I do not know if someone from the spigot community could help me a little bit more ??

    An example of what this is trying to do:

    Http://blog.valdaris.com/post/custom-jar/

    That tutorial I tried, but I do not copying well the Plugin
     
  2. Project structure -> Artifact -> Empty with dependency
     
  3. This tutorial is on hebrew, but should do the trick, just go to the project structure section
     
    • Creative Creative x 1
  4. Mas

    Mas

  5. You can add it like this. You don't need to add a repo to the pom file just add this to your dependencies.
    Code (Text):
    <dependency>
        <groupId>sample</groupId>
        <artifactId>com.sample</artifactId>
        <version>1.0</version>
        <scope>system</scope>
        <systemPath>${project.basedir}/src/main/resources/yourJar.jar</systemPath>
    </dependency>
     
     
  6. Thank you all for your answers, thanks to them manage to add the jar :D
     
    • Like Like x 1