Permalink
Fetching contributors…
Cannot retrieve contributors at this time
130 lines (90 sloc) 4.13 KB
Maven
-----
Diffa is maven built using Maven. Currently version 3.0.3 is supported.
Maven Proxy
-----------
In order to download artifacts not available in Maven central, you can use the Diffa repository. To do so,
add the following to your $M2_HOME/settings.xml:
In the profiles block:
<profile>
<id>diffa-repo</id>
<repositories>
<repository>
<id>diffa</id>
<url>https://nexus.lshift.net/nexus/content/groups/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>diffa</id>
<url>https://nexus.lshift.net/nexus/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
</profile>
And in the activeProfiles block:
<activeProfile>diffa-repo</activeProfile>
Scala
-----
Diffa is written mostly in Scala. Due to Scala's class post-processing mechanism, we tend to find that the default Perm Gen settings get exhausted quite quickly.
So before you perform any of the Maven commands, please give the JVM a little more Perm Gen:
On Unix:
export MAVEN_OPTS=-XX:MaxPermSize=512m
Or on Windows:
set MAVEN_OPTS=-XX:MaxPermSize=512m
This is also documented in the README.maven_opts.txt file for an easy copy and paste.
Building
--------
Please do not overlook the previous note about perm gen. To build Diffa, just use the mvn install command from the root directory:
$ mvn install
This will run the the test suite that comes with Diffa.
To verify against a database other than the default (hsqldb), follow the instructions below.
* Oracle DBMS
Note: please refer to the README for further details on using this profile.
Set profile to 'oracle' (-Poracle)
Set these parameters (either MAVEN_OPTS="-Dparam1 -Dparam2 ..." or mvn -Dparam1 -Dparam2 ...)
diffa.jdbc.driver=oracle.jdbc.OracleDriver
diffa.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
diffa.jdbc.sys.url=<URL of the target Oracle database instance>
diffa.jdbc.sys.username=<username of a privileged Oracle database user>
diffa.jdbc.sys.password=<password of the above user>
diffa.jdbc.url=<same as diffa.jdbc.sys.url>
diffa.jdbc.username=<username of the owner of the diffa agent database>
diffa.jdbc.password=<the owning user's password>
Note on diffa.jdbc.sys.username
The user identified by this username must have privileges to create a schema
and grant create session and dba privileges. This user is only needed for
testing; in a production environment, the application database user is
provisioned manually with suitable privileges.
Note on diffa.jdbc.username/password
This user is created during the testing/verification process. The user MUST
NOT be the same as diffa.jdbc.sys.username.
* MySQL
Set profile to 'mysql' (-Pmysql)
Set these parameters (either MAVEN_OPTS="-Dparam1 -Dparam2 ..." or mvn -Dparam1 -Dparam2 ...)
diffa.jdbc.driver=com.mysql.jdbc.Driver
diffa.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
diffa.jdbc.dbname=<name of the diffa agent database to create>
diffa.jdbc.sys.url=<URL of the base MySQL instance (without database name)>
diffa.jdbc.sys.username=<username of a privileged MySQL database user (will
create the db owner)>
diffa.jdbc.sys.password=<password of the above user>
diffa.jdbc.url=<URL of the target MySQL database (with database name)>
diffa.jdbc.username=<username of the owner of the diffa agent database>
diffa.jdbc.password=<the owning user's password>
Booting The Agent
-----------------
The Diffa agent can be run using the Jetty plugin:
$ cd agent
$ mvn jetty:run
Booting The Demo Participants
-----------------------------
Diffa comes with a demo application that provides two fake participants. This can also be run using the Jetty plugin:
$ cd participants-web
$ mvn jetty:run
License Checking
----------------
Diffa uses the maven license plugin (http://code.google.com/p/maven-license-plugin/) to check that the license files are up to date.
To run the license check:
$ mvn -e license:format -Dyear=2010-2011
To reformat each file according to the header file:
$ mvn -e license:format -Dyear=2010-2011