Contribute to the DSpace Development Fund
The newly established DSpace Development Fund supports the development of new features prioritized by DSpace Governance. For a list of planned features see the fund wiki page.
February 25, 2011: This is a work in progress that I plan to be developing throughout the first couple of weeks in March of 2011. There are a few versions of instructions currently available on within the DSpace confluence site, some of which are fairly out of date. This page will be covering instructions as relates to creating a development environment on Mac OSX 10.6 (Snow Leopard) while using the latest versions of related software, but will attempt to be platform agnostic.
Development Environment - Tools: Prerequisite Installations
This initial section will be targeted toward making certain that all prerequisite software tools have been downloaded and installed properly on the system you will be using for your development. Specifically, this is going to cover the following software:
- Database software - Currently PostgresSQL and Oracle are supported by DSpace.
- Servlet container software - The most popular servlet container tends to be Apache Tomcat, but others such as Jetty, Geronimo, etc can be used.
- Build Tools - Maven and Ant are the software project management and comprehension tools used to build and deploy DSpace from source code.
- IDE (Integrated Development Environment) - Eclipse, our IDE of choice for this endeavor.
Other software that will be noteworthy is the list of plug-ins we will use to extend Eclipse's native functionality. Among these plug-ins are:
- A servlet container plug-in - Specifically, we will be using the Sysdeo plug-in for Apache Tomcat. This will provide us some ease of control (starting, stopping, debugging) over our servlet container from within the Eclipse IDE.
- A Maven plug-in - The m2eclipse plug-in will allow us to run Maven commands such as building, cleaning, or packaging from within the Eclipse IDE.
- An Ant plug-in - This will allow us to run Ant commands from within the Eclipse IDE (this plug-in is built into the versions of Eclipse we will be using).
- An SVN plug-in - This will provide the ability to access and manipulate svn repositories from within the Eclipse IDE via either Subclipse or Subversive .
- The Web Tools Platform (WTP) plug-in - WTP provides a large swath of web development abilities from within the Eclipse IDE.
- The Data Tools Platform (DTP) plug-in - DTP provides a large swath of database development abilities from within the Eclipse IDE.
With this introduction to the necessary tools, the following sections will cover installation of these software packages / plug-ins for your system.
Database Software
DSpace requires either PostgreSQL 8.4 (or greater) or Oracle 10g (or greater) relational database software. Depending on your setup you may want your databases either local or some remote server. I've found it beneficial to have both available.
PostgreSQL 9.0.3
Eventually, I'll be incorporating specific Mac OS 10.6 related instructions into this wiki page, but for now, I've verified that these instructions (http://) work with Mac OS 10.6 (Snow Leopard) and PostgreSQL 9.0.3. Do note the typo in the section containing information on setting up the operating system's "postgres" user. The instructions say "sudu" instead of "sudo" on all but the first line. Also, the configuration options are fairly generic aside from the Mac OSX specific locations and the bonjour flag and could be used as the basis for setting up postgres in other linux / unix environments (save, again, for setting up the operating system's postgres user).
/Library/LaunchDaemons/org.postgresql.PostgreSQL.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key><string>org.postgresql.PostgreSQL</string> <key>ServiceDescription</key><string>PostgreSQL Database Server</string> <key>Disabled</key><false/> <key>Username</key><string>postgres</string> <key>Groupname</key><string>postgres</string> <key>Program</key><string>/usr/local/pgsql/bin/pg_ctl</string> <key>ProgramArguments</key> <array> <string>-D</string> <string>/usr/local/pgsql/data</string> <string>-l</string> <string>/usr/local/pgsql/data/server.log</string> <string>start</string> </array> <key>KeepAlive</key><false/> <key>RunAtLoad</key><true/> </dict> </plist>
Oracle
I've not verified them, but you'll likely meet with success using these instructions for working with Oracle 10g on Mac OS 10.6.
Servlet Container Software
Concerning the servlet containers available, this area will cover Tomcat and act as a placeholder for when/if I'm able to post concerning other popular servlet containers at a later time.
Tomcat 7.0.8
Apache Tomcat's latest stable release is 7.0.8 and can be acquired from the download page at Tomcat's official site: tomcat.apache.org.