Developer's Guide

commons-vfs-grid and Hermes are written in Java. We are using Java 1.5.0, since the Java 1.6.0 Runtime is not available on Macs (yet).

Downloading the source

Development tools

Java

We're currently developing in Java 1.5.0, since Mac OS X does not support version 1.6.0 yet. Download the "JDK 5.0 with Java EE" from  http://java.sun.com/javase/downloads/index_jdk5.jsp and install it.

Maven

We use Maven to keep track of library dependencies and deployment. Get a copy of Maven from  http://maven.apache.org/download.html.

If you are behind an authenticated proxy, you will need to setup your username and password through the Maven settings file. The file is located in

~/.m2/settings.xml

If no such file exist, create a new settings.xml file and add the following XML:

<settings>
    <proxies>
        <proxy>
            <active>true</active>
            <protocol>http</protocol>
            <host>PROXY_HOST</host>
            <port>PROXY_PORT</port>
            <username>YOUR_PASSWORD</username>
            <password>YOUR_PASSWORD</password>
        </proxy>
    </proxies>
</settings>

Hermes' maven repository is currently being hosted on Sourceforge. In order to deploy a file, you must have the following segment of XML within the settings tags.

<servers>
    <server>
        <id>cvg_repo</id>
        <username>SOURCEFORGE_USERNAME,commonsvfsgrid</username>
        <password>SOURCEFORGE_PASSWORD</password>
    </server>
</servers>

Using Maven

To clean the project:

mvn clean

To build the project:

mvn compile

To clean, build and run:

mvn clean compile exec:exec

Building the a library (package). This applies to commons-vfs-grid:

mvn package

Note that when you run package, it will also run the tests. To suppress testing, use the following command:

mvn package -Dmaven.test.skip=true

Offline Mode

You can any of the above commands the -o option to use Maven in offline mode. Running in offline mode disables checking with the repository, which can save you some time when building the project! However, make sure you run these commands without the -o option whenever a new library has been deployed. We do not use Maven to package Hermes - we use an Ant script instead.

To deploy a file into the library repository:

mvn deploy:deploy-file -DgroupId=org.bouncycastle -DartifactId=bcprov-jdk15 -Dversion=140 -DrepositoryId=cvg_repo -Durl=sftp://web.sourceforge.net/home/groups/c/co/commonsvfsgrid/htdocs/maven -Dpackaging=jar -Dfile=./bcprov-jdk15-140.jar

(change the values as you see fit)

To install a library in your local repository (e.g. when you want to test a new build of commons-vfs-grid with Hermes)

mvn install:install-file -DgroupID=<blah> -DartifactId=<blahblah> -Dpackaging=jar -Dversion=<version> -Dfile=<path to library>

or

mvn -DpomFile=<path to project pom.xml> -Dfile=<path to library>

Ant

Download Apache Ant from  http://ant.apache.org/bindownload.cgi. Some of our dependent libraries such as slcs-client requires Ant to build. We also use Ant for handling Hermes releases.

Instructions for packaging releases