Building TJDO From Source

Requirements

Build Tools

Additional Libraries

File Place In Needed To
Enhance Apps Run Apps Build TJDO Test TJDO
jdo.jar
commons-logging-version.jar
lib/ X X X X
jdori.jar lib/ X     X
jta.jar lib/   X X X
ojdbc14.jar lib/   X* X* X*
junit.jar (v1.8+) $ANT_HOME/lib       X
commons-collections.jar
commons-dbcp.jar
commons-pool.jar
lib/test       X*
DBMS-specific jars lib/test/dbname       X

* = optional.

Building

  1. Download the latest source of TJDO.
  2. Install any necessary software listed above.
  3. Run ant from the project root directory. See the Ant project file "build.xml" or type:
    ant -projecthelp
    to see the available targets.

Testing

The unit test suite includes tests that perform a fairly thorough exercise of TJDO using a real database.

To run the TJDO unit tests:

  1. Create a lib/test/dbname directory containing the following:

    The properties file must define JDBC connection parameters by including the following:

    database.driver=JDBC driver class name database.url=JDBC driver URL database.user=Database user name (if needed) database.password=Database password (if needed)

    To see all the databases you have setup in lib/test, type:

    ant get-db-list

  2. To run the tests on a specific database, type either of:

    ant -Ddb=dbname unit-tests ant -Ddb=dbname unit-tests-twice
    The latter runs the all the tests twice; once with auto-created tables and once again with existing tables, which helps test schema validation.

    To run the tests on all defined databases type:

    ant unit-tests-all

    A test_results/ directory will be created to hold the results of individual test runs. Ant's <junitreport> task is used to generate pretty JUnit test result pages.


SourceForge.net