One of the crucial technologies we have taken advantage of in the development of the Whole Brain Catalog has been Maven2. Since not everyone is familiar with it, I thought it would be good to get a quick overview to it here.
The first thing to know about Maven is it provides the “single command” ability to build an entire code base. With SVN and Maven installed you can issue the following commands to download and build the entire source of the Whole Brain Catalog:
svn co http://wholebrain.googlecode.com/svn/wbc/trunk wbc
cd wbc
mvn clean install
The one caveat to this is that you need to place a single configuration file called settings.xml in your maven directory. Your maven directory is located at ~/.m2 on linux/mac, C:\Users\[username]\.m2 on Vista, and C:\Documents and settings\[username]\.m2 in Windows XP. You can download our copy of the settings.xml file here. This will point your copy of Maven at our proxy maven repository, which contains many of the third party dependencies necessary for the Whole Brain Catalog.
This last process (mvn clean install) will take a long time because it does a lot of magic things for you. First of all it downloads all the jar files that the Whole Brain Catalog depends on to your local machine, under your maven home directory. This will take a while as the WBC depends on a lot of jars. It will also download Maven specific jar files that are used to build the code, run tests, create java docs, do deployment, and so on. Once all these jars are downloaded, it will go step-by-step through the wbc modules, compile them, run their test cases, and package them into jars.
We prefer Maven to other build systems, notably Ant, because it hides a lot of functionality away in its plugins, allowing the build configuration to be specified within a single XML structure known as the “pom”, short for Project Object Model. This file, pom.xml, contains all details about the dependencies needed to build a system, how to configure compilation, how to package up the code, what the current version of the code is, and much more. More about Maven2 can be found online at its website.