Solved Why use Maven?

Discussion in 'Plugin Development' started by beastman3226, Dec 11, 2013.

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

    beastman3226

    Very obviously, why should I use maven?
    How do I use it?

    Nevermind

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  2. Offline

    hellboyPS

    For very small projects it is more of a pain than it's worth it, really. But the moment you start something bigger it becomes neccessary. The benfits are you never have to worry about updating your libaries (for example if the bukkit api changes) maven will do the hard work for you, you only have to specify what version you want to use.

    If you have, like me, interdependent projects, you have to use maven anyway. Some of my projects depend on other projects. If have around ~20 projects which all depend on my core project. If I update my core project I would have to modify the build path of every single other project every time I change something in the core project. If I am testing some stuff in the core project (debug output etc.) its just not doable.

    So you will need to use maven later on anyway. There are plenty of other benefits I didn't mention yet. This was just one "prime" example.
     
    samosaara likes this.
  3. Offline

    RawCode

    you dont need maven as long as you work alone, no matter how many projects you have.
     
  4. Offline

    hellboyPS

    RawCode might be true. as long as you really work alone and offline (no svn etc.) you could just use an ant script to update your libs. thats probably more correct than my statement.
     

  5. Netbeans works as well!

    I like Netbeans because it has a JFrame builder. (I write Java applications/games apart from bukkit plugins)
     
  6. Offline

    epicfacecreeper

    I don't see how netbeans solves the problem of having dependant projects.
     
  7. Offline

    Not2EXceL

    Netbeans JFrame builder pushes code less organized than Eclipse's WindowBuilder plugin. Doing JFrame designs by hand becomes not only faster but much cleaner code with practice.

    Umm if the build paths are set up correctly, you can avoid that. The only reason I see any usage of maven for bukkit plugins is for people who use NMS code and need to make it easier for building against different versions, or for jenkins.
     
  8. Offline

    zeeveener

    Not2EXceL

    JFrame and Maven are two completely separate entities. JFrame is a class in the Java library, Maven keeps dependencies in check for the Jar file.

    You are right regarding build paths, but that only works if your core project is native to your computer. As soon as you introduce something external like Github/Mercurial or Jenkins/Hudson or any kind of repo, you will need Maven.
     
  9. Offline

    Not2EXceL

    My Jframe statement was in regards to that person's post about netbeans.

    And I manage everything with git just fine without Maven. Its not required, nor needed. Though if you use a repo that does automatic building like jenkins ofc you'll need Maven since that's what the repo uses to build.
     
  10. Offline

    zeeveener

    Not2EXceL

    Ya, I might have responded to the wrong person on the netbeans thing.

    You are also right regarding github working without maven. The other two examples still stand though, am I wrong?
     
  11. Offline

    Not2EXceL

    Never used Hudson before and Mecurial, I know it has a build feature(sortof) but I've only used it with .net, so im assuming it uses maven for java.
     
Thread Status:
Not open for further replies.

Share This Page