Building Benerator from SVN
Why this?
There may be bugs which are fixed in the source code, but not yet released as a binary. Possibly you may want to find out yourself and create a local patch.
In such cases you can fetch the latest sources from the public Subversion repository and build benerator yourself.
This is not necessary for programming regular benerator extensions like generators, Data Sources or Consumers!
Prerequisites
For building benerator you need
• A Java JDK of at least version 6.0
• j2ee.jar in the JDK's ext folder
• A Subversion client
• Maven 2.0.8 or newer
Structure
benerator consists of the following 5 modules:
• maven benerator plugin: A Maven plugin for integrating Benerator in Maven builds.
• benerator: The benerator core and the standard domain packages.
• webdecs: databene libraries for parsing/processing and rendering different file formats.
• gui: databene libraries with Swing components and utilies.
• commons: common utilities for all databene projects.
and depends on these 3 Databene libraries:
• jdbacl: database access functionality• contiperf: Performance measurement
• dbsanity: Database data validation
All these are likely to have changed from the latest release to the current snapshot version, so descriptions follow for updating and compiling all of them together:
Creating a release
You can download the modules from the public SVN repository if you have a Subversion client installed. When using the SVN command line client, create a working directory and invoke the following commands for retrieving all databene libraries that benerator depends on:
svn co https://svn.code.sf.net/p/databenecommons/code/trunk commons
svn co https://svn.code.sf.net/p/databene-script/code/trunk databene-script
svn co https://benerator.svn.sourceforge.net/svnroot/benerator/webdecs/trunk webdecs
svn co https://jdbacl.svn.sourceforge.net/svnroot/jdbacl/trunk jdbacl
svn co https://contiperf.svn.sourceforge.net/svnroot/contiperf/trunk contiperf
svn co https://benerator.svn.sourceforge.net/svnroot/benerator/benerator/trunk benerator
svn co https://benerator.svn.sourceforge.net/svnroot/benerator/maven-benerator-plugin/trunk maven-benerator-plugin
Then build the components
cd commons
mvn clean install
cd ../databene-script
mvn clean install
cd ../webdecs
mvn clean install
cd ../jdbacl
mvn clean install
cd ../contiperf
mvn clean install
cd ../benerator
mvn clean install assembly:assembly
cd ../maven-benerator-plugin
mvn clean install
Finally you will find the benerator distribution as zip and as tar.gz file in the directory benerator/target and the Maven plugin will be available in your local maven repository.
Modifying Benerator
If you want to patch benerator, first checkout and build the latest version as described above.
It contains a .project file which you can use to create an Eclipse project: Choose File - Import - Existing Projects into Workspace and select the benerator directory.
Then open the Preferences dialog, go to Java - Build Path - Classpath Variables and create a classpath variable M2_REPO that points to your local Maven repository.
Have a Maven Eclipse plugin like m2eclipse for using Benerator's Maven build configuration.



