Solved IntelliJ Exporting

Discussion in 'Spigot Plugin Development' started by Waldxn, Apr 19, 2017.

  1. I've looked on google and can't find a clear answer on this issue.

    How would I go about exporting my plugin as a Jar. I just switched from Eclipse and IJ is new to me.
  2. 1: Press CTRL + Alt + Shift + S
    2: Click on 'artifacts'
    3: Click on the green plus, select 'Jar', click on 'empty' (You can give your artifact a name if you want to, the default name is "unnamed")
    4: Double click on the available elements on the right side, so they appear on the left side (this are the elements that are going to be compiled, double click all on the right side, well at least that are possible)
    5: Click on the green plus under 'output layout', click on 'file' and navigate to your plugin.yml, double click it so it appears on the left side either under the other elements (somehow thats not needed for everybody, but I had to do this)
    6: Close the Project Structure window
    7: Click on Build -> Build artifacts -> Click on the one you have created
    8: Navigate into your IntellIJ project folder on your computer, click your project's folder, click on 'out', then on 'artifacts', then click on the folder that has your artifact's name.
    9: Inside that folder theres a jar file, this is your compiled plugin.
    • Useful Useful x 2
    • Agree Agree x 1
    • Informative Informative x 1

  3. Thank you very much kind sir!
  4. Have you tried it yet? It's possible that some errors occure while compiling.
  5. It worked flawlessly. Thank you for the help.
  6. Nice to hear :)
  7. or you can use maven, much easier
  8. More versatile*. Building using a GUI is easier to learn and doesn't require one to remember a lot in the beginning. While maven has more capabilities, it is definitely not "much easier".
  9. NEVERRR!!!!
    jk xD
    I'd like to start learning maven, good tutorials?
  10. It is much easier...

    In IntelliJ it's literally a click of "Install" and your plugin will be exported...
  11. Now you're simply confirming what I said. I think you need to re-read it.
  12. Maven is more efficient. So if you want to offer a better performance I'd also use Maven instead of inserting the libary(s) you need manually.
  13. uh no. maven is yes more versatile and is way simpler than using artifacts in intellij.
    make a pom.xml put your contents, add as maven project, then mvn install/package, etc
    • Agree Agree x 1
  14. I did read it. You mentioned GUIs but that's irrelevant here since when using IntelliJ you are always using a GUI - clicking "install" is much easier to me than the process of exporting a JAR file...
  15. Personally I think that clicking some buttons is a little easier than either copy-pasting or remembering every xml element. You're probably also spending less time on it.

    GUIs are pretty relevant to me. They are intended to make life easier, and in this case it sure does.