Building DbUnit

How to build DbUnit?

Since version 2.0, DbUnit is build with Maven 1.0-rc1. You can download Maven from this URL:

You can see project dependencies at the following URL, and all of them but the JDBC dependency will automatically be retrieved for you by Maven.

Use "%MAVEN_HOME%\bin\maven" under windows and "${MAVEN_HOME}/bin/maven" under unix in the dbunit-2.0 directory. From here on out, the above maven command will be abbreviated as the "maven" command

One project dependency that needs additional explanation is JDBC package and "jdbc-2.0.jar" file.
This package is now called JDBC 2.0 Optional Package Binary and the jar file is now called the "jdbc2_0-stdext.jar" file, and due to Sun's download policies, you will need to manually download it from the following URL.

Once downloaded, you must rename the "jdbc2_0-stdext.jar" file to "jdbc-2.0.jar" and manually put it in your maven repository. The location of your repository will vary, but it can be found at %USERPROFILE%\.maven\repository\jdbc\jars on Windows 2000, and probably at ${HOME}/.maven/repository/jdbc/jars under unix.

NOTE: There is currently one test from the DbUnit 2.0 source distribution that fails. You can safely ignore the "testClasspath" failure when building DbUnit.

In order to build the api javadocs, use the "maven site" command.

If you use the Eclipse editor, you will want to create .project and .classpath files using "maven eclipse" command, and define MAVEN_REPO as an exclipse java classpath environment, pointing to the "respository" directory in your maven repository.

—MikeKienenberger May 05, 2004

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License