Since we’ve committed to the development of tDAR, we’ve been looking into what’s required to set up a development environment for contributing.
tDAR is a Maven project which means that resolving dependencies will be automated and hopefully very easy: You’ll need to have the Java JDK installed and not much else. It uses Struts2, Spring and Hibernate, so we’ll want to grab the relevant plugins required for our IDE. With all that in mind, and also considering the fact that tDAR’s existing developers are all using it, we chose to run Eclipse as our IDE.
tDAR is hosted at bitbucket, and uses Mercurial/Hg SCM to manage its trees, so generating a local repository after Eclipse is installed is a fairly simple task. Be prepared to wait a little while though: the tree is currently 600mb+.
The last required components are two standalone packages: PostgreSQL and Atlassian Crowd. Postgres is the database manager used by tDAR, and does sometimes present some issues running under Windows. Crowd is Atlassian’s authentication, single sign on and identity management server, and while it isn’t completely open source it is very powerful and easy to use.
Basic steps for setting up tDAR’s development environment on your desktop/laptop are as follows:
- Install Mercurial
- Install Maven
- Install Eclipse
- Install the Struts2, Jboss, Spring, Mercurial and Maven plugins for Eclipse
- Use Eclipse to access the tree on bitbucket (@https://bitbucket.org/tdar/tdar.dev/)
More specific details can be found on tDAR’s own Confluence Wiki. Before running the application, either to execute tests or to try it on your local machine, you’ll also need to do the following:
- Install PostgreSQL
- Install Crowd
- Create tDAR’s necessary databases (tdardata, tdarmetadata & tdargis)
- populate & update the tdarmetadata database by running the tdarmetadata.sql and upgrade-db.sql scripts
- populate the tdardata database with the tdardata.sql script
- populate the tdargis database with the tdargis.sql script. Note that the tdargis database is used for PostGIS data. More details later.
This should allow you to download the tree to your local repository and run it. To contribute back you’ll need access, and so you’ll need to speak with the tDAR development team via the Confluence Wiki.
tDAR will throw an exception on load if the tdargis database isn’t properly enhanced to run PostGIS data, but it will continue to run. Further instruction on how to set up PostGIS will be added in a future post.