Should I use maven?

Discussion in 'Plugin Development' started by thepaperboy99, Nov 11, 2013.

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

    thepaperboy99

    Hello bukkit, I just wanted to get feedback about if I should use maven to compile plugins. The reason I ask this is because I saw some posts saying that it's good for big plugins, which I made, and sometimes it has errors compiling. So, is maven worth it? Or no? Thanks
     
  2. Offline

    PolarCraft

    Not really? Depending on what system. But personally I use eclipse :D
     
  3. Offline

    TeeePeee

    I use Eclipse with the plugin m2e to allow for compiling with Maven. It's awesome for managing dependencies, etc. and I highly recommend it.
     
  4. Offline

    drtshock

    what

    thepaperboy99 Yes, use maven. It's amazing <3 If you need help getting started with it then I have a simple template that I use whenever I make a new plugin https://github.com/drtshock/MavenTemplate
     
  5. Offline

    thepaperboy99

  6. Offline

    Compressions

    thepaperboy99 TeeePeee sent you the Eclipse plugin. drtshock sent you a skeleton to use for Maven projects.

    Personally, I love using Maven. Though what I do doesn't always require Maven, its version management is awesome, and I am much more productive with it.
     
  7. Offline

    drtshock

    I don't even know how to export things in Intellij other than with maven.
     
    amhokies likes this.
  8. Offline

    xTrollxDudex

    Configure your artifacts :)

    Then you can do Build -> Build Artifacts -> Build -> ??? -> Profit.
     
  9. Everyone should use maven, even if it's a small app.
     
    1Rogue and drtshock like this.
  10. Offline

    1Rogue

    Maven helps enormously with dependencies, licensing, and filtering files to all have the same information (plugin.yml, etc).
     
  11. Offline

    thepaperboy99

    I know, but is there a certain maven I should use? From the two links from my post, what one do you use?
     
  12. Offline

    desht

    Yes, you absolutely should use Maven. It's one of those systems that people don't really see the point of until they actually start using it, and then wonder how on earth they managed before. Eclipse supports it pretty well with the m2eclipse plugin, and Intellij supports it really well right out of the box (I have to admit: I'm a recent Intellij convert too)

    As for learning it... it can be a bit tricky. There's plenty of documentation out there, but not so much in the way of basic tutorials. Probably the best way is to look at other people's plugins and see how their pom.xml files are set up. The template posted by drtshock is a fine place to start for a simple Bukkit plugin.

    thepaperboy99 the Maven software comes from http://maven.apache.org/ - you'll need that. If you're developing on Linux (the civilised platform for development :) ), then your distro probably has a Maven package to install. The link that TeeePeee posted is for m2eclipse, which integrates Maven with Eclipse, so if you use Eclipse get that too. Maven on its own just gives you the Maven build system plus a command-line interface.
     
    Mitsugaru and drtshock like this.
  13. thepaperboy99 I think most people use Maven 2.X but I use maven 3. Anyways download it from here: http://maven.apache.org/download.cgi and install it, set the system variable and so on, if you're using eclipse then install the m2e plugin, else just switch over to intellij and done.
     
  14. Offline

    thepaperboy99

    Thanks for the info! I'm going to install it when I get back from school :)

    Thanks, but I have one quick question (sorta doesn't have anything to do with maven), but lets say I install maven, I looked up some tutorials on google, and I looked through the readme file and it said to put the folder in your c drive program files (I'm on windows btw), and install it like that. Then I put all the variables in my system properties as it says, and the folder path gets removed, would that harm my computer in any way? Thanks

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  15. thepaperboy99 Nope, you just need to set the system vars so you can, as example, execute the maven commands directly from the console instead of navigating to C:\maven. If you remove the folder then it will just say that it couldn't access C:\<maven path>...
     
  16. Offline

    thepaperboy99

    So I can install maven with all the variables and everything, then if I were to remove the folder maven is in, my pc will be perfectly fine?
     
  17. Offline

    jorisk322

    As long as you don't try to use Maven it will be fine. When you do, it will give you an error, but it shouldn't cause any damage. If you do remove it, just make sure to also change back the vars.
     
  18. Offline

    thepaperboy99

    What if I removed it, then removed the variables later, would that still be ok? I just want to know cause I really don't want to mess something up lol
     
  19. thepaperboy99 It won'tdo anty damage except if you start to mess with standard system vars, don't worry, just do it.
     
  20. Offline

    thepaperboy99

    Ok I will, thanks for all your guys help! :)
     
Thread Status:
Not open for further replies.

Share This Page