NMC DSP Getting Started on Windows

From BioAssist
Jump to: navigation, search

NMC DSP - Mainpage

Software Packages

In order to get started with the NMC Data Support Platform (NMC DSP) you need to obtain the following software packages:


installing Apache Tomcat

Installing Apache Tomcat on Windows is pretty straightforward. Download the binaries from http://tomcat.apache.org/download-55.cgi and find setup instructions at http://tomcat.apache.org/tomcat-5.5-doc/setup.html

installing PostgreSQL

To install the PostgreSQL database, download the installer at http://www.postgresql.org/download/windows

Setting up your workspace

Where you would like your workspaces stored is of course a personal preference. Just create a directory somewhere in your homedirectory or desktop.

You can now start Eclipse EE and select / change to your Molgenis workspace (File --> Switch Workspace --> Other --> <yourhomedirworkspace>).

Adjusting Build path and Java Runtime

By default Eclipse EE might use versions 1.5 of the JDK and JRE, however Molgenis requires 1.6. In order to get things working you need to change the project settings to use 1.6 instead of 1.5 by changing the Java Build Path and Java Compiler in the properties of the molgenis project (file --> properties).

NMC DSP Leopard Eclipse JavaBuildPath.png

NMC DSP Leopard Eclipse JavaCompiler.png

Setting up Apache Tomcat for your project

Select the properties for Eclipse and configure a Tomcat server with JRE 1.6:

NMC DSP Leopard Eclipse Server RuntimeEnvironment 1.png

NMC DSP Leopard Eclipse Server RuntimeEnvironment 2.png

NMC DSP Leopard Eclipse Server RuntimeEnvironment 3.png


Now that you have everything set up correctly, and you have switched your Eclipse EE workspace to your Molgenis workspace, you can generate the Molgenis code by running MolgenisGenerate.java :

NMC DSP Leopard Eclipse MolgenisGenerate.png

Now that you have generated the Molgenis code, you can run it on your -previously defined- Tomcat server:


The first time you would like to Run the Molgenis project you need to define how and where to Run your code:

  1. select molgenis3_2_distro
  2. right click --> Run As --> Run On Server
  3. create a new Tomcat server based on the server definitions created above

NMC DSP Leopard Eclipse Server RunOnServer-1.png

NMC DSP Leopard Eclipse Server RunOnServer-2.png

NMC DSP Leopard Eclipse Server RunOnServer-3.png

When you have configured this server once, it will appear in the servers tab where you can easily start / stop the project on your Tomcat server:

NMC DSP Leopard Eclipse Server RunOnServer-4.png

Code Sharing / Versioning

Now that you have got the default Molgenis installation up and running, we can have a look at how to start using the Subversion repository. As decided by convention all developers will develop in branches. Stable code will regularly be merged to the main line (trunk) and stable releases will be tagged at certain intervals.

deleting default and unwanted files

Now that you are all set up and ready to go, you can start deleting again ;) First of all remove the XML (configuration) files and the default plugin folder. Unfortunately you cannot rename them as Molgenis does tend to read these files and directories which will result in errors. Hence do the following:

you@computer ~/Workspace/nmcdsp $ cd ~/Workspace/nmcdsp/molgenis_x_y_distro/; rm -rf *.xml; rm -rf ./handwritten/plugin*

installing the subclipse plugin

Make sure you have the subclipse plugin (a subversion implementation) installed in eclipse, a detailed guide can be found link here.

fetching the latest code

Initially it is easiest to perform a manual checkout of the latest code (trunk) or one of the development branches which you would like to use as base code. Fire up your terminal and head over to your molgenis_x_y_distro folder and perform an initial checkout:

cd ~/Workspace/nmcdsp/molgenis_x_y_distro/
svn checkout --username you https://gforge.nbic.nl/svn/nmcdsp/molgenis/trunk

or, if you would like to use one of the development branches instead:

cd ~/Workspace/nmcdsp/molgenis_x_y_distro/
svn checkout --username you https://gforge.nbic.nl/svn/nmcdsp/molgenis/branches/duh

setting up your own development branch

In Eclipse, first refresh (F5 or file --> refresh) your view and right click on molgenis_x_y_distro and select Team --> Share Project

Subclipse Share-Project.png

Select SVN

Subclipse Share-Project SVN.png

Select 'Create a new repository location' and click next

Subclipse Share-Project Repository-Location.png

Enter https://gforge.nbic.nl/svn/nmcdsp/molgenis/branches as repository location and click next

Subclipse Share-Project Enter-Location.png

Select 'use specified folder name' and enter your (nick)name:

Subclipse Share-Project Repository-Folder-Name.png

Finish the wizard

Ignoring molgenis specific files

As we are not interested in code belonging to Molgenis en we only want to store our own code in subversion, we need to subclipse / subversion to know what to submit and what to ignore. In order to easily do that is by adding an ignore property to the svn propety list:

Subclipse Share-Project Add-Property.png

For property name enter: svn:ignore and for Property Content enter the following:


Subclipse Share-Project Add-Property2.png

And press OK

Add Plugins to version control

The last thing that needs to be done is to manually add the plugins directory to version control. You need to do this because you added it's parent folder (handwritten) to the ignore property list. As plugins is the code we would like to share, you need to add it manually to the versioning list:

Subclipse Add-Plugins-To-Version-Control.png

Commit your changes

Now that everything is set-up correctly you're finally ready to commit your changes and to make your first contribution!

Subclipse Share-Project Commit.png

Subclipse Share-Project Commit2.png