Building ONess

Building from CVS

This project uses Maven as project manager and build tool. You only need to

  1. Install maven (at least 1.0).
  2. Run the following instruction on a single line to get latest sources from cvs HEAD
  3. maven scm:checkout-project
        -Dmaven.scm.method=cvs
        -Dmaven.scm.cvs.module=.
        -Dmaven.scm.cvs.root=:pserver:anonymous@cvs.sourceforge.net:/cvsroot/oness
        -Dmaven.scm.checkout.dir=oness
  4. If you plan to run webapp related projects you need to update the maven war plugin with this command (in a single line) or tests will fail.
  5. maven plugin:download
        -DgroupId=maven
        -DartifactId=maven-war-plugin
        -Dversion=1.7-SNAPSHOT
        -Dmaven.repo.remote=http://cvs.apache.org/repository
  6. Run maven in any module directory, or maven multiproject:artifact in the doc folder if you want to build all modules.

Building from downloaded sources

  1. Get the module you want and unzip to a dir. e.g. if you get oness-party-model-0.2 unzip it to yourdir/party/model-0.2 (name doesn't mind, only be sure that there are two directory levels if the name of the module is oness-x-y-version or three if it is oness-x-y-z-version)
  2. Get the oness-common-maven and unzip to yourdir/common/maven (name is very important)
  3. If you plan to run webapp related projects you need to update the maven war plugin with this command (in a single line) or tests will fail.
  4. maven plugin:download
        -DgroupId=maven
        -DartifactId=maven-war-plugin
        -Dversion=1.7-SNAPSHOT
        -Dmaven.repo.remote=http://cvs.apache.org/repository
  5. Then you can run maven in the directory of the module you've just downloaded. e.g. to compile the java classes.
  6. maven java:compile

Database configuration for testing

The default database connection configuration for testing is in oness-common-model module, in the file src/conf/dataSource.properties, that should be ok if you have a default installation of MySQL.

If you want to change the database, user or password you can add some of the following properties to your $HOME/build.properties that will override the default ones (you only need those that change):

maven.junit.sysproperties=dataSource.password \
    dataSource.username \
    dataSource.url \
    dataSource.driverClassName \
    hibernate.dialect

# If you want to use mysql
dataSource.username=
dataSource.password=
dataSource.url=jdbc:mysql:test
dataSource.driverClassName=com.mysql.Driver
hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect

# If you want to use postgres dataSource.username=yourpostgresusername dataSource.password= dataSource.url=jdbc:postgresql:yourdatabasename dataSource.driverClassName=org.postgresql.Driver hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect

You can find here documentation about MySQL urls.

If you are using another database server please tell me.

Using eclipse

If you want to use eclipse you will need to install some jars in your local maven repository, if you don't want to modify the eclipse project files. To do so you must call maven jar:install-snapshot in the modules you need or maven multiproject:install-snapshot in the doc module to build all.