Compile deegree from SVN

Tags:
Document Information
Document ID: 
app2009-005

These are CSW-centric notes on compiling deegree — a Java-based spatial data services engine (http://www.deegree.org/) — JAR and WAR files from their Subversion (SVN) code repository  in the Eclipse (Galileo - Java EE Developer version 3.5 http://www.eclipse.org/) Integrated Development Environment (IDE). last updated 7/30/2009.

Compile deegree2.jar from SVN "/svn/deegree/base/trunk" (deegree2) in Eclipse

Follow https://wiki.deegree.org/deegreeWiki/Eclipse/InstallingSVN and https://wiki.deegree.org/deegreeWiki/Eclipse/DeegreeSVN to install the SVN client for Eclipse and to access deegree's SVN code repository. However, I installed and used my own JDK version (C:\jdk1.5.0_17) and the latest Java EE developer version of Eclipse. You may also want to add external libraries - such as those from your servlet engine (C:\Tomcat5527\common\lib) to your eclipse project through "Project | Properties | Java Build Path | Libraries".

Note that you may have to add the commercial libraries described in https://wiki.deegree.org/deegreeWiki/NonFreeLibraries to successfully compile the deegree2.jar file. I found the JAR files by installing PostgreSQL with PostGIS (free; already included in "/svn/deegree/base/trunk/lib"), ArcSDE Developer Kit 9.3 (search "jsde90_sdk.jar" for an older version that's floating around on the ESRI site), and Oracle (free trial install).

As described in https://wiki.deegree.org/deegreeWiki/Deployment, install the latest Ant (in Windows, don't forget to set your "ANT_HOME" and "path" environmental variables) and add the latest ant-contrib.jar and junit.jar (renamed junit-4.6.jar) to your "<ANT_HOME>/lib" folder.

Inside of the deegree Eclipse project, right click on the build.xml file and select "Run As | External Tools Configurations...". On the "Classpath" tab, click on the "Ant Home" button and point it to your Ant installation root to replace Eclipse's build-in Ant. Now, you can right click on the build.xml file and choose "Run As | Ant Build" to compile deegree2 classes.

When you open the build.xml file in Eclipse you can access the other build commands in the Outline pane. You can also open an Ant pane - "Window | Show View | Ant" - and drag the build.xml file into it to access other build commands such as "compile [default]" (compile classes), "build-lib" (build the deegree2.jar file), "clean-all" (delete compiled stuff before recompiling), etc.

Don't forget to modify your "\deegree-csw\WEB-INF\conf\csw\xslt\iso19119_transaction.xsl" file if you do not use Oracle as your back-end for CSW (search for oracle within the XSL file to comment/uncomment stuff under "<app:anyText>"). Otherwise, anyText will not search all CSW fields.

Additional deegree SVN "projects" you may want to get into Eclipse to create whole applications

I keep one Eclipse workspace for deegree within which I create multiple projects such as "deegree2," "demo," and "services-template."

"/svn/deegree/demo/trunk" (demo) - used to generate the the demo apps distributed by deegree

Lynn Büsching from deegree's commercial arm lat/lon wrote in the deegree users listserv:
"It would be possible to check out from https://svn.wald.intevation.org/svn/deegree/demo/. There exists an ant script we are using to create the demo services. You have to put the deegree.jar, you want to use in the root folder and adjust property deegreebase in the build.xml (must direct to deegree2). Use ant build-csw-2 to build a deegree war, containing the CSW 2.0.2."

Besides "deegreebase" (points to the the deegree core project from SVN at "/svn/deegree/base/trunk"), I also had to edit other build.xml properties such as "deegreeservicestemp" (apparently points to "/svn/deegree/apps/services-template/trunk" in SVN), etc.

I had to get the following Ant commands to work before I could generate a new deegree_csw.war file: get-libs (get all libraries from SVN "/svn/deegreebase/trunk/lib"), copy-csw2-conf (copy stuff from SVN "/svn/deegree/base/trunk" and SVN "/svn/deegree/apps/services-template/trunk"), get_log4j_prop (may not be necessary?), build-csw-2 (generates the war file).

SVN "/svn/deegree/apps/services-template/trunk" (services-template) 

The Ant variable "deegreeservicestemp" in "/svn/deegree/demo/build.xml" points to this.

Application Documents Description Document ID Posted by Updatesort icon Rating
Configuring degree CSW 2.x This is a list of our configuration changes too deegree-csw - specifically version 2.3-pre (Compile deegree from SVN)... app2009-006 wgrunberg 12/01/2009 - 10:46am
3.5
Related Community Groups
ETL Debug Blog | 12 Posts | Join
A group blog on implementing and debugging Extract-Transform-Load (ETL) efforts.