The JDO 3.x Technology Compatibility Kit

Overview of the JDO 3.x Technology Compatibility Kit

The JDO 3 project includes the following subprojects:

JDO releases may be downloaded from the Apache JDO downloads page. Minor updates of releases are only available as source from the Subversion repository. Follow the instructions below to build the API from source.

For complete rules for certifying a JDO implementation, see RunRules.html in the top level tck project directory.

Prerequisites

You must install the software listed in the following sections to successfully run the TCK. Other dependencies, such as the reference implementation, DataNucleus, and the Apache Derby database, are downloaded automatically by maven. Note that Apache JDO uses the apache commons logging package for logging.

Maven

You must have Maven version 2+ to build the projects from source and to execute the TCK. You can download maven from http://maven.apache.org/download.html

Note that maven uses the user.home system property for the location of the maven local repostitory: ${user.home}/.m2/repository. Under Windows this system property is C:\Documents and Settings\user no matter what the HOME variable is set to. As a workaround you may set the system property by adding -Duser.home=%HOME% to the environment variable MAVEN_OPTS.

JNDI implementation (fscontext.jar and providerutil.jar)

The JNDI test cases in tck need a JNDI implementation. The TCK is configured to use Sun's JNDI implementation. To use your own implementation, put the implementation jar files into tck/lib/ext and update jndi.properties in the TCK directory src/conf. To download Sun's implementation, go to http://java.sun.com/products/jndi/downloads/index.html, click the Download button at Download JNDI 1.2.1 & More, accept a license agreement, download File System Service Provider, 1.2 Beta 3 and then unpack the downloaded zip into tck/lib/ext. It includes the jars fscontext.jar and providerutil.jar.

Building from top level tck project

For instructions for checking out the JDO source, see the Apache JDO source code page. To build JDO with all subprojects go to the root directory of the branch you are working in (or trunk)
mvn clean install
This will build the artifacts jdo-api and jdo-exectck and will run the TCK.

Building the API

To build the API, change to the "api" directory of the branch you are working in (or trunk) and run

mvn clean install
This will build the jdo-api artifact and install it in your local Maven2 repository.

Running the TCK

To run the JDO TCK on the Reference Implementation, copy the following files to the top-level lib/jdori directory. Copy log4j.properties from tck/src/conf. The others may be downloaded from the maven repository.

asm-3.0.jar
c3p0-0.9.0.2.jar
datanucleus-api-jdo-3.0.7.jar
datanucleus-api-jpa-3.0.8.jar
datanucleus-core-3.0.9.jar
datanucleus-enhancer-3.0.1.jar
datanucleus-rdbms-3.0.8.jar
log4j-1.2.13.jar
log4j.properties
To run the JDO TCK on an Implementation Under Test, copy the jars needed by the implementation to the top-level lib/jdori directory, as well as log4j.properties and log4j-1.2.13.jar.

Then change to the "exectck" directory of the branch you are working in (or trunk) and run

mvn clean install
This builds and installs the "jdo-exectck" Maven plugin in your local Maven2 repository.

Change to the "tck" directory of the branch you are working in (or trunk) and run

mvn clean install
and this will run the TCK (via the "jdo-exectck" plugin) on the JDO Reference Implementation on all supported databases and identity types.

The "jdo-exectck" plugin has various options so you can run other implementations or only run particular tests.

Custom Goals

mvn jdo-exectck:<goal>
help
Displays help text describing custom goals and options
installSchema
Installs the database schema
enhance
enhances the test classes being used
runtck
Runs the TCK

Command Line Options

-Djdo.tck.impl=
either jdori (reference implementation) or iut (implementation under test).
-Djdo.tck.cfglist=configuration file list
Overrides the definition of jdo.tck.cfglist found in tck/src/conf/configuration.list by supplying one or more comma-separated test configuration files. Test configuration files typically have the .conf extension. To run a single test, create a .conf file (copy an existing file) and put the test into the jdo.tck.classes property.
-Djdo.tck.dblist=database list
Overrides the property value in project.properties by supplying one or more comma-separated database names. Currently only derby is supported.
-Djdo.tck.identitytypes=identity type list
Overrides the identity types to be run, supplying one or more comma-separated identity types ("applicationidentity" or "datastoreidentity") to use for this run.
-Dproject.lib.iut.directory=
Location of implementation jar files. Default: ${basedir}/../lib/iut
-Djdo.tck.impl.logfile=
Location of implementation log file. Default: ${user.dir}/datanucleus.txt
-Djdo.tck.doInstallSchema=
Setting this parameter to false will bypass schema installation.
-Djdo.tck.doEnhance=
Setting this parameter to false will bypass enhancement.
-Djdo.tck.doRunTCK=
Setting this parameter to false will bypass running the TCK.
-Djdo.tck.runTCKVerbose=
Setting this parameter to true will display test progress and error output while the TCK is running.

Examples

mvn -Djdo.tck.identitytypes=datastoreidentity jdo-exectck:installSchema
Installs the database schema for datastore identity for all supported databases
mvn -Djdo.tck.cfglist="alltests.conf cfg1.conf" jdo-exectck:runtck
Runs the test configurations specified in alltests.conf and cfg1.conf on the JDORI, using all supported identity types and databases.

Files

While running the TCK, maven uses the following configuration files in src/conf: