Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
outlinetrue
stylenone

Introduction

This wiki page is targeted for those individuals who work with DSpace but have need to explore or modify the DSpace source code and would like to setup their DSpace installation(s) within an Integrated Development Environment so as to have access to the features and tools that those tools provide.

Information on Prerequisite Tools

Integrated Development Environment

This wiki page concerns setting up Eclipse, but there are others (which are more popular among DSpace developers). If you like, please browse to the pages on NetBeans (oracle site, dspace wiki) or IntelliJ (jetbrains site, dspace wiki).

The current version of Eclipse (as of 2012-02-01) is 3.7, codenamed "Indigo". This is the version that will be the subject of this wiki page. Keep in mind that there are several very popular Eclipse "packages". The significance of an Eclipse package is which tools or plugins are bundled with that particular download. The three most popular (in ascending order of size / number of included tools/plugins) are:

  1. Eclipse Classic - This version is only the base Eclipse software (3rd most popular).
    1. This version includes no additional tools or plugins.
  2. Eclipse for Java Developers - This version includes some basic plugins, here are the highlights:
    1. CVS
    2. Egit
    3. m2e
    4. Mylyn
  3. Eclipse for Java EE Developers - This version includes more, but not all that the regular Java version provides.
    1. CVS
    2. Mylyn
    3. DataTools
    4. JDT (Java Development Tools)
    5. JST (J2EE Standard Tools)
    6. WST (Web Standard Tools - this encompasses JDT, JST, and some others)
    7. RSE (Remote System Explorer - otherwise known as Target Management)

I highly recommend choosing Eclipse for Java EE Developers as it is very likely that you make good use of all the included tools save perhaps for Mylyn (depending on your organization / institution's development environment). Also, this is the package that I'll be using for this tutorial (other plugins will be added via the Eclipse update tool as well as the Eclipse "plugins" folder). Feel free to make notes within this page for different versions of installation instructions.

SCM (Source Code Management) Tool(s)

The SCM you use is certainly up to you (and your organization). However, Duraspace provides source code repositories for DSpace via both Subversion^1^* and Git^2^*.

CVS

With the development of DSpace being so closely intertwined with Maven, and my relative inexperience with CVS for Maven projects, I'm recommending against this option and can provide no real assistance. Please feel free to expand this section.

Subversion

This is a perfectly sound option though it does have some constraints on the versions of software that you may end up using.

Git

The DSpace Git repository is very new (Jan 2012) so I can't give a lot of detail at the moment. Also, I've not yet had the opportunity to setup Git on my development machines. I'll be providing more information on this option in the coming months (Feb-April 2012).

Build Tools - Utilities necessary for deploying an instance of DSpace

Maven

The Apache Maven project is a software development tool targeted primarily toward dependency management but also helps to keep code and projects well organized. For more information on Maven please check out the Apache Maven website. This is a required build tool for working with DSpace source code (and is not required for the pre-built versions that can be downloaded). If you're reading this tutorial and are wanting to setup an IDE for working with DSpace, this tool will be a prerequisite.

Ant

Apache Ant is a Java library and command-line tool. It's purpose is to drive processes that are described in build files (xml format). These build files contain "targets" that can be run, which can also be dependent on each other, in turn creating process chains. Ant is another requisite of building DSpace from source.

Servlet Container

A servlet container. There are many (Apache Tomcat, Apache Geronimo, GlassFish, and Jetty, to name a few). Though this section may be expanded later to Geronimo and/or Jetty, I'll be covering Apache Tomcat to start.

Tomcat

Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies. This is application that will run the servlets created through the DSpace deployment process.

Eclipse Plugins

Subclipse or Subversive

Both of these plugins connect Eclipse with Subversion repositories. Their strengths and weaknesses vary a little depending on the task. I tend to go with Subclipse primarily due to this article from person.

m2e (Maven to Eclipse)

There have been significant developments recently within the integration between Eclipse and Maven, not all of this is good. However, if starting from scratch, building a new IDE from the ground up, you don't have to worry about breaking existing projects. As long as this is the case, you shouldn't have to worry about the state of Eclipse-Maven integration.

m2e Extensions

These are extensions for the m2e plugin and are available through the m2e marketplace (accessible from within Eclipse).

SCM Connector

These are CVS, Subclipse, Subversive, EGit, etc SCM extensions for m2e.

Embedded Maven 3 (optional)

An installation of Maven 3 available from within the Eclipse IDE. Using an embedded version of Maven will limit your memory space to that allowed to Eclipse, for this reason I generally recommend against using this option and instead installing Maven externally from Eclipse (somewhere on your filesystem).

Sysdeo Tomcat Connector

This an Eclipse plugin which will allow for starting/stopping/restarting tomcat from within Eclipse and will also enable debugging of DSpace source code from within Eclipse.

oXygen XML Editor (recommended for XMLUI theme development)

This plugin won't be fantastically useful unless you plan to be doing some development within the XMLUI interface driven by Apache Cocoon. If you will be doing work in Cocoon or on themes for DSpace, this is (in my experience) a very valuable tool.

Gathering Your Materials

Installing Your Software

Configuring Your Environment

A Quick Feature Run-Through