You are here: Community > Working With Source Code > Building Full Distribution

Building db4o

Building full distribution will allow you to get the same db4o packages as you can get from db4o download center. However, the flexibility of the build project also allows you to get only parts of it, like only java distro, only documentation, only tests etc.

The following documentation explains how to build a full distribution using Eclipse version 3.4 Ganymede. It is assumed that you have ant and one of Eclipse SVN clients (Subclipse or Subversive) installed.

Projects Required

In order to build db4o you will need to check out the following projects.

machine.properties

You will need to create machine.properties file in db4obuild folder. The contents of the file can be copied from build.xml (see the comments at the beginning of the file). Modify the paths where applicable to set the build variables for your environment.

Read the instructions at top of the build.xml to find out what options are available. Here's an example:

file.compiler.jdk1.3=%JAVA_HOME%/bin/javac.exe
file.compiler.jdk1.3.args.optional=-source 1.3
file.jvm.jdk1.5=%JAVA_HOME%/bin/java.exe
dir.workspace=C:/Users/Gamlor/Develop/db4o/db4o-src/
eclipse.home=C:/progs/eclipse
msbuild.executable="C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe" 

Build Preparation

First you will need to run some preparation scripts. This is done only once per workspace and should not be repeated in the future.

Run build-db4obuild.xml, this will compile some of the tools used in the build process.

You will need to generate a key to sign the tutorial applet. Use the following commands:

keytool -genkey -alias db4objects -keyalg rsa

keytool -export -alias db4objects -file [path]/db4obuild/config/db4objects.crt

Use "kistoa" (without quotes) as your keypass and storepass.

Replace [path] with the path to db4obuild project on your system and make sure that db4objects.crt file is created in db4obuild/config folder.

If you've already generated db4objects key pair before, you will need to delete it before re-generating:

keytool -delete -alias db4objects

You will need to add ant-contrib.jar to your eclipse ant. You can download ant-contib.jar at:

http://sourceforge.net/projects/ant-contrib

Running The Build

Now everything is ready to run db4o build. Right-click build.xml file and select "Run As/Ant Build". You will need to run "buildall" target to generate java and .NET distribution.