DougEdey/SB_Elsinore_Server — pull request #5 by cmpterman2 (2013-09-06 13:49:53+00:00)
Title: Adding Maven Support (in addition to eclipse/ant)

I added support for building with maven. It has a few nice things over ant:
* Puts all generated build artifacts (classes, etc), into a target folder which makes it easy to add to .gitignore to prevent merge conflicts of class files and keep the src tree clean
* Helps manage dependency versions so it's a little easier to update versions of third party software
* Integrates nicely with multiple IDE(s) including netbeans and eclipse (with a plugin)

I did configure it so that it acts just like the current build, where it re-generates an all-in-one jar at the root folder.

I also added this in a way that allows both builds to work (IE, eclipse with ant and the maven build both work independently) so it shouldn't break the current environment.

Few things to note:

If you want to try building with maven you'll need to do the following:
* Get Maven from http://maven.apache.org/download.cgi
* Unzip and add the bin directory to your path

When you want to build the project with maven go to the folder of the project and run (from a shell)
mvn clean install

If you want to use maven in eclipse, do the following:

* To enable your eclipse to use maven, get the plugin here: http://eclipse.org/m2e/download/
* Follow instructions for install and restart eclipse
* Close / Delete the existing SB_Elsinore_Server Project so it's no longer in eclipse
* Under eclipse to to File --> Import --> Maven --> Existing Maven Projects, Click next
* Located the directory for the project and click the check box for /pom.xml. Click finish

Everything should work like it normally does. If you want to regenerate the jar at the root, do the following:

To rebuild the main jar, just go to Run > Run As > Maven Install