On Ubuntu 12.04 you need to install Java 1.7:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-jdk7-installer
sudo update-alternatives --display java

To install maven on Fedora 18:

sudo yum install maven

It should install everything you need. By default Fedora uses OpenJDK. If you want yo use Sun/Oracle Java then follow instructions in :

Install and setup your Postgresql database. In Fedora:

sudo yum install postgresql

Check out '/usr/share/doc/postgresql-9.2.4/README.rpm-dist' for Fedora specific configuration.

Set database specific properties:

cp src/main/resources/META-INF/persistence.xml.default src/main/resources/META-INF/persistence.xml
vim src/main/resources/META-INF/persistence.xml

Create database and import database schema:

createdb legalacts
psql legalacts < schema.sql


mvn package

Now you got two jars in 'target' directory: 'original-server-0.1-SNAPSHOT.jar' and 'server-0.1-SNAPSHOT.jar'. First has only your classes and second contains everything you need to run it (maybe except JRE(Java Runtime Environment), didn't check it out).


java -jar target/server-0.1-SNAPSHOT.jar

You have your server on 'http://localhost:8080/'.

Root directory lists acts metadata in JSON format.

/GET/10 - returns .xml with id=10.

See terminal from witch you executed server for error and debug info. To stop server press Ctrl+C or terminate process from task manager. To upload your files:

java -jar target/server-0.1-SNAPSHOT.jar --add paths/to/*.xml

If server is already running, do it on separate terminal.

To test server run this command:

curl -sXGET '' | python -mjson.tool