Preliminary information

Some people have experienced difficulties in building KAON when KAON source was placed in a path that constains spaces. To prevent such problems, please put KAON sources in a path that doesn't contain any spaces.

Building from the command line

You can simply build KAON from the command line provided that:

If you meet all these prerequisites, you can build KAON by changing to the v1.1\kaon directory and simply invkoing ant. The build script will generate all necessary files, compile all modules and generate the release. During build javadoc warnings will be displayed. This cannot be avoided, since we use XDoclet for generating necessary EJB files, and the XDoclet documentation states that these warnings cannot be avoided. The project will be build into kaon_build_root directory that will be placed parallel to your yasws directory. The KAON release will be generated in kaon_build_root\kaon\release directory. In order to use the built release, please make sure you set the KAON_ROOT environment variable to the root of the release.

Generated source files

During build, KAON generates some source files. Supplied JBuilder project already includes these files. However, if you plan to compile KAON in some other IDE, you need to generate these files once (using ANT) and include them into your project. The following files will be generated:

Using JBuilder project files

KAON comes with three project files that can be used for KAON development. These files work only with JBuilder 6 Enterprise version and will not work with other versions. Before using any of these files, you must first build KAON using ANT. This will generate all necessary files that are referenced by the JBuilder projects.

Following projects are available:

Compiling KAON with Eclipse

(Courtesy of Christoph Schmitz <schmitz@aifb.uni-karlsruhe.de>)

  1. Create Java project, e. g. "kaon_cvs"
  2. For each KAON module ("apionrdf", "apiproxy", ...) use "Check out into..." to check it out into kaon_cvs.
    Hint: once you've checked out one of them, you can check out the rest from the command line, as the CVS metadata will then be known to CVS:

    cd kaon_cvs
    cvs co .

    ... which is much faster than checking out each one by hand.
  3. On a shell, go to kaon/kaon and invoke "ant" so that KAON is built.
  4. For each module, add kaon_cvs/<module>/src to the project source path.You may have to hit "refresh" in order for your new directories to show up.
  5. engineeringserver, rdfserver, datalog and query use code generators. We therefore need to incorporate the automatically generated code into our project. This can be done as follows:

    cd kaon_cvs mkdir -p gensrc/{engineeringserver,rdfserver,datalog,query}
    for a in engineeringserver rdfserver datalog query;
    do ln -s ../../../build/kaon_build_root/$a/gensrc gensrc/$a/src; done
    // the last two on one line

    Add the three gensrc/<bla>/src directories to the project source path.
  6. Add all libraries under 3rdparty/... to the library path.
  7. Now KAON should build flawlessly.

A drawback of this method is that the build directory via ant and Eclipse's build directory are disjoint. Let me know if you find a nice way of working around this.