"Seegrid will be due for a migration to confluence on the 1st of August. Any update on or after the 1st of August will NOT be migrated"

Deegree Development Setup



Here is the official Deegree developer information on SVN checkout and Eclipse setup:

The official guide has some problems:
  • It describes manually adding all library JAR files to the project. This is not necessary in Eclipse 3.3 as the New Project Wizard does it for you.
  • It does not detail how to handle optional dependencies.

This page describes how to setup an Eclipse environment with support for Oracle Spatial and without support for ArcSDE.

Eclipse and Java

  • I run Eclipse 3.3 with Java 6. You can use any Java 5 or later.
  • Java 5 is the reference platform for Deegree.
  • I use a Java 5 JDK (jdk1.5.0_14) for running tests and as a reference API. I use the Java JDK (not JRE) as my project runtime in Eclipse because it come with source, which Eclipse attaches automatically.

Configure Eclipse JRE and compiler compliance

  • Open Window > Preferences > Java > Installed JREs
    • Add the Java 5 JDK.
    • Add the VM argument -Xmx512m (more memory for XML processing).
    • Make Java 5 the default JRE.
  • Preferences > Java > Compiler
    • Set Compliance Level to 5.0.

Check out source code from SVN repository

I use a command line SVN client:

Subclipse should also work for direct checkout, but command line svn is much faster.

Create an Eclipse Java Project

  • Go to File > New > Java Project, select Create project from existing source, specify the location of the SVN working directory, and use the defaults (or read ahead and set up your dependencies at this stage).
  • Eclipse will attempt to compile the project and will fail due to missing dependencies.

Resolve dependencies

Fix xml.apis.jar priority

  • Go to Properties > Java Build Path > Order and Export
  • Move the JRE to the top of the build path so that the JRE xml-apis.jar take precedence. (The batik one is incompatible.)

Exclude ArcSDE packages to disable ArcSDE support

In Eclipse Package Explorer view, right click on the following packages and and select Build Path > Exclude to have eclipse ignore them:
  • org.deegree.io.datastore.sde
  • org.deegree.io.sdeapi

This disables all ArcSDE support, and allows Eclipse to build Deegree without it.

Provide Oracle JARs to enable Oracle support

Deegree uses Oracle JDBC to connect to Oracle databases. This requires the Oracle JDBC JAR ojdbc5.jar, which can be found in an Oracle installation or downloaded from the Oracle website. For example, for Oracle Spatial 11g on Linux, this might be found at:
  • /opt/app/oracle/product/11.1.0/db_1/jdbc/lib/ojdbc5.jar
Deegree depends on JAR files shipped with Oracle Spatial to provide support for Oracle spatial data types (SDO_GEOMETRY). These can be found in an Oracle Spatial installation in the same directory as sdoapi.jar. For example, for Oracle Spatial 11g on Linux, this might be found at:
  • /opt/app/oracle/product/11.1.0/db_1/md/jlib/sdoapi.jar
  • sdo{api,gr,nm,topo,utl}.jar are sufficient to compile. (Might not need all of these, but compilation succeeds with them.)
  • If these do not provide everything you need at runtime, add all the sdo*.jar.

Put these in a local directory, or even in a (non-Java) project in your workspace for convenience.

Add Oracle dependencies to the project and recompile

Right click on the project, and select Properties > Build Path > Libraries then add the Oracle JARs with Add JARs (if they are in a project in this workspace) or Add External JARs (if they are not).

When you change the build path by reordering dependencies or adding new ones, Eclipse will recompile the project. The project should compile without errors.


In Eclipse Package Explorer, right-click on the test/junit package and Run As > JUnit Test. I get 233 tests, with 27 errors and 5 failures. Some of the problems are packages without tests, and some are network service tests or security manager problems. I expect a closer reading of the shipped ant build.xml would reveal which tests should be run and when.


Topic revision: r3 - 15 Oct 2010, UnknownUser

Current license: All material on this collaboration platform is licensed under a Creative Commons Attribution 3.0 Australia Licence (CC BY 3.0).