ggp-org/ggp-base — pull request #23 by nitay (2013-10-26 05:32:15+00:00)
Title: Add pom.xml to build with maven.

Build the project with maven using just the "mvn" command. This has a whole bunch of things built in e.g. running findbugs, pmd, a license checker, executing the tests, building jar for code, sources, and javadoc. You can also easily put in things like code coverage. Also it can generate a pretty nice html website with reports for everything that is run.

Maven is a really a powerful tool, I highly recommend it. The initial learning curve is steep but once you get used to it you'll never want to go back to ant.

I think we should move anything else you need out of the build.xml, and get rid of altogether. I'll leave it to you to decide when it's best to do that. For example I noticed there are some executable tasks in there, we could make simple bash scripts for that.

As I already mentioned we should fix up the ProjectSearcher as right now the code won't really work as a library. Are there other things that are path dependent? We should probably replace them with proper resources usage.

Also another thing I noticed: The tests should really be separated from the main code. With maven you normally make a separate directory for tests, and then can run them with "mvn test". Note just running "mvn" will also run them as it does the full build. Furthermore it's rather weird that we use JUnit in non-test code.

I've actually already used a tweak of this to deploy the jar to maven central under my group name:
http://search.maven.org/#artifactdetails%7Ccom.nitayjoffe.thirdparty.org.ggp%7Cggp-base%7C0.1%7Cjar. The tweaked pom.xml is here: https://github.com/nitay/ggp-base/blob/dev/pom.xml. As you can see I just replaced org.ggp with com.nitayjoffe.thirdparty.org.gpp. Also this jar looks for classes under ~/code/ggp-base/bin (see https://github.com/nitay/ggp-base/blob/dev/src/org/ggp/base/util/configuration/ProjectConfiguration.java).