Development
Core Plugins
Datastores
Documentation
Testing
Building DataNucleus with Maven1

DataNucleus can be easily developed using Maven1. You also require JDK1.5, an SVN client (to download DataNucleus) and an editor. Additionally, you should set the environment variable "MAVEN_OPTS" to "-Xmx512m -Xms512m" in order to avoid OutOfMemoryErrors during maven builds.

DataNucleus is split into several Maven1 projects and you need these building in a particular order due to dependencies.

local.repository

The "local.repository" project (in SVN under "platform/local.repository/trunk") provides all jars required by DataNucleus in a Maven1 style repository layout. It is referenced by all DataNucleus projects and so you need this to be present. You don't need to build anything here.

core

The DataNucleus "core" (in SVN under "platform/core/trunk") project is the root of all DataNucleus projects and is the primary requirement for development. You then simply type (from this project)

maven clean jar:install

This builds the jar under "target" and installs it into the Maven repository.

thirdparty

The "thirdparty" project (in SVN under "platform/thirdparty/trunk") contains stubs for third party libraries that may be needed when building DataNucleus. The most common requirement that it fulfils is to provide stubs for JDBC4 (JDK1.6) that DataNucleus builds against.

To build the "thirdparty" using Maven1, you simply type (from this project)

maven clean jar:install

This builds the jar under "target" and installs it into the Maven repository.

store.rdbms

The "store.rdbms" project (in SVN under "platform/store.rdbms/trunk") provides persistence to RDBMS datastores, and builds on top of "core". It requires "thirdparty" to be built.

To build the "store.rdbms" using Maven1, you simply type (from this project)

maven clean jar:install

This builds the jar under "target" and installs it into the Maven repository.

store.db4o

The "store.db4o" project (in SVN under "platform/store.db4o/trunk") provides persistence to DB4O datastores, and builds on top of "core".

To build the "store.db4o" using Maven1, you simply type (from this project)

maven clean jar:install

This builds the jar under "target" and installs it into the Maven repository.

enhancer

When building "enhancer" (in SVN under "platform/enhancer/trunk") using Maven1, you need "core" to be built. You then simply type (from this project)

maven clean jar:install

This builds the jar under "target" and installs it into the Maven repository.

Other projects

When building other DataNucleus projects (in SVN under "platform") you follow the same instructions as shown above. That is, download the project, and type (from that project)

maven clean jar:install

This builds the plugin jar under "target" and installs it into the Maven repository.

test.framework

The "test.framework" project (in SVN under "platform/test.framework/trunk") contains the basic classes used for testing DataNucleus. The first thing you need to do is build this.

To build the "test.framework" using Maven1, you simply type (from the test.framework project)

maven clean jar:install

This builds the jar under "target" and installs it into the Maven repository.

test.samples

The "test.samples" project (in SVN under "platform/test.samples/trunk") contains a series of basic model samples for use in testing DataNucleus. These are the classes to be persisted, but do not include the information about how they will be persisted (that is specified in the individual test suite). The first thing you need to do is build this.

To build the "test.samples" using Maven1, you simply type (from the test.samples project)

maven clean jar:install

This builds the jar under "target" and installs it into the Maven repository.

DataNucleus : Test Suites

For details of running the Test Suites using maven please consult the unit tests documentation.