blob: c37275229d1d2c7ac19c8475976969f3d4b7b1e4 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<TITLE>JDO 3 TCK README</TITLE>
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<H1>The JDO 3.x Technology Compatibility Kit</H1>
<UL>
<LI><a href="#overview">Overview</a></LI>
<LI><a href="#prereqs">Prerequisites</a>
<UL>
<LI><a href="#maven">Maven</a></LI>
<LI><a href="#jndi">JNDI Implementation (for TCK)</a></LI>
</UL>
</LI>
<LI><a href="#api">Building the API</a></LI>
<LI><a href="#tck">Running the TCK</a>
<UL>
<LI><a href="#goals">Custom Goals</a></LI>
<LI><a href="#cli">Command Line Options</a></LI>
<LI><a href="#files">Files</a></LI>
<LI><a href="#examples">Examples</a></LI>
</UL></LI>
</UL>
<a name="overview"></a>
<H2>Overview of the JDO 3.x Technology Compatibility Kit</H2>
<p>
The JDO 3 project includes the following subprojects:
</p>
<UL>
<LI>api contains source to build jdo-api-3.x.jar, which defines the JDO API version 3.x for Java 1.5 and later.</LI>
<LI>copyjdorijars contains source to build jdo-api-3.x.jar, which defines the JDO API version 3.x for Java 1.5 and later.</LI>
<LI>exectck contains source to build the maven plugin to run the TCK the Reference Implementation (RI)
or an implementation under test (IUT) </LI>
<LI>tck contains the JDO 3.x Technology Compatibility Kit for Java 1.5 and later.</LI>
<LI>parent-pom contains the maven pom.xml that ties the projects together.</LI>
</UL>
<p>
JDO releases may be downloaded from <a href="http://db.apache.org/jdo/downloads.html">the Apache JDO downloads page</a>.
Minor updates of releases are only available as source from the Subversion repository.
Follow the instructions <a href="#building">below</a> to build the API from source.
<p>
For complete rules for certifying a JDO implementation,
see RunRules.html in the top level tck project directory.
</p>
<!-- When creating a new minor release branch, list changes from the major release here
<a name="changes"></a>
<h2>Changes since the Major Release</h2>
<p>
</p>
-->
<a name="prereqs"></a>
<h2>Prerequisites</h2>
<p>
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.
</p>
<a name="maven"></a>
<h3>Maven</h3>
<p>
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
</p><p>
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\<i>user</i>
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.
</p>
<a name="jndi"></a>
<h3>JNDI Implementation (fscontext.jar and providerutil.jar)</h3>
<p>
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 <i>lib/ext</i> and update jndi.properties in the TCK directory
src/conf. To download Oracle's implementation, go to
<a href="http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-plat-419418.html#7110-jndi-1.2.1-oth-JPR">
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-java-plat-419418.html#7110-jndi-1.2.1-oth-JPR</a>.
Aaccept the license agreement and download <b>File System Service Provider, 1.2 Beta 3</b> and then unpack
the downloaded zip into <i>lib/ext</i>. It includes the jars fscontext.jar and providerutil.jar.
</p>
<a name="building"></a>
<h2>Building from Top Level TCK Project</h2>
For instructions for checking out the JDO source, see the Apache JDO
<a href="http://db.apache.org/jdo/svn.html">source code</a> page.
To build JDO with all subprojects go to the root directory of the branch you are working in (or trunk)
<pre>mvn clean install</pre>
This will build the artifacts <i>jdo-api</i> and <i>jdo-exectck</i> and will run the TCK.
<a name="api"></a>
<h2>Building the API</h2>
<p>
To build the API, change to the "api" directory of the branch you are working in (or trunk) and run
<pre>mvn clean install</pre>
This will build the <i>jdo-api</i> artifact and install it in your local Maven2 repository and
run the TCK on the Reference Implementation.
</p>
<a name="tck"></a>
<h2>Running the TCK on an Implementation Under Test</h2>
<p>
First build the from the top level TCK project as described above.
To run the JDO TCK on an Implementation Under Test, copy the jars needed by the implementation
to the top-level lib/iut directory, as well as log4j.properties and log4j-1.2.13.jar.
The log4j jar file may be copied from lib/jdori.
</p>
<p>
Change to the "tck" directory of the branch you are working in (or trunk) and run
<pre>mvn -Djdo.tck.impl="iut" clean install</pre> and this will run the TCK
(via the "jdo-exectck" plugin) on the Implementation Under Test
on all supported databases and identity types.
</p>
<p>
The "jdo-exectck" plugin has various options so you can run other implementations or
only run particular tests.
</p>
<a name="goals"></a>
<h3>Custom Goals</h3>
mvn jdo-exectck:&lt;goal&gt;
<DL>
<DT>help</DT>
<DD>Displays help text describing custom goals and options</DD>
<DT>installSchema</DT>
<DD>Installs the database schema</DD>
<DT>enhance</DT>
<DD>enhances the test classes being used</DD>
<DT>runtck</DT>
<DD>Runs the TCK</DD>
</DL>
<a name="cli"></a>
<h3>Command Line Options</h3>
<DL>
<DT>-Djdo.tck.impl=<DD>either jdori (reference implementation) or iut (implementation under test).
<DT>-Djdo.tck.cfglist=<i>configuration file list</i><DD>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.
<DT>-Djdo.tck.dblist=<i>database list</i><DD>Overrides the property value in project.properties by supplying one or more comma-separated database names. Currently only derby is supported.
<DT>-Djdo.tck.identitytypes=<i>identity type list</i><DD>Overrides the identity types to be run, supplying one or more comma-separated identity types ("applicationidentity" or "datastoreidentity") to use for this run.
<DT>-Dproject.lib.iut.directory=<DD>Location of implementation jar files. Default: ${basedir}/../lib/iut
<DT>-Djdo.tck.impl.logfile=<DD> Location of implementation log file. Default: ${user.dir}/datanucleus.txt
<DT>-Djdo.tck.doInstallSchema=<DD> Setting this parameter to false will bypass schema installation.
<DT>-Djdo.tck.doEnhance=<DD> Setting this parameter to false will bypass enhancement.
<DT>-Djdo.tck.doRunTCK=<DD> Setting this parameter to false will bypass running the TCK.
<DT>-Djdo.tck.runTCKVerbose=<DD> Setting this parameter to true will display test progress and error output while the TCK is running.
</DL>
<a name="examples"></a>
<h3>Examples</h3>
<DL>
<DT>mvn -Djdo.tck.identitytypes=datastoreidentity jdo-exectck:installSchema
<DD>Installs the database schema for datastore identity for all supported databases
<DT>mvn -Djdo.tck.cfglist="alltests.conf cfg1.conf" jdo-exectck:runtck
<DD>Runs the test configurations specified in alltests.conf and cfg1.conf on the JDORI, using all supported identity types and databases.
</DL>
<a name="files"></a>
<h3>Files</h3>
<p>While running the TCK, maven uses the following configuration files in src/conf:
<UL>
<LI>configurations.list
<br>A list of files. Each file listed is a test configuration file.</LI>
<LI>test configuration files (*.conf)
<br>Each of these files sets values for
<DL>
<DT>jdo.tck.testdescription</DT>
<DD>An optional string describing the purpose of these tests</DD>
<DT>jdo.tck.classes</DT>
<DD>A list of one or more test classes (required)</DD>
<DT>jdo.tck.testdata</DT>
<DD>The fully qualified file name of the xml test data file(optional)</DD>
<DT>jdo.tck.standarddata </DT>
<DD>The fully qualified file name of the xml test data file(optional)</DD>
<DT>jdo.tck.mapping </DT>
<DD>The file designator that maven.xml uses to build a javax.jdo.option.Mapping value and corresponding schema name (required)</DD>
</DL></LI>
<LI>exclude.list
<br>A list of test classes NOT to execute during a TCK test run</LI>
</UL>
</BODY>
</HTML>