Help importing jackson for IntelliJ IDEA Spigot Plugin

Discussion in 'Spigot Plugin Development' started by Mithrandir, Oct 10, 2019.

  1. Hey, so I'm trying to get the jackson library for JSON parsing included on my IntelliJ IDEA Spigot Plugin project, in order to store some persistent player data.

    However, I get this error:
    Error: (8,28) java: package org.codehaus.jackson does not exist

    What I did was:
    1. Download jackson library, extract and put .jar file in a lib folder within the project for convenience.
    2. right click .jar within intellij idea & click Add as library...

    I even get object completions pointing to the library as you can see in the following images :/

    [​IMG]

    [​IMG]

    All seems fine but I get the error. What else do I need to do besides the steps I already followed in order to fully import this library?
     
    • Agree Agree x 2
    • Friendly Friendly x 1
  2. Depends on how you are exporting your plugin. Most likely way is through an artifact, so you want to extract the jar into your output in the artifact menu.

    Reiterating the previous response - GSON is already bundled so it is worth taking a look, even if you don’t end up using it. Maven makes dependency management a lot easier, so again, just something to think about.
     
  3. I prefer gradle because it has a maven support and you can automatize tasks/implements logic code with it.
     
    • Agree Agree x 1