Sunday, June 15, 2008

How to setup the Udig / JGrass / BeeGIS development environment while drinking a beer



Well, I wanted to start this like: "Installing your GIS development environment has never been that easy!", but since every time I start like that every time I get burried by bugs and problems, this time I will try to keep my feet on the grund. :)

Alright, so I wrote my first plugin for the eclipse IDE. It is a plugin that automatically installs everything needed to do Udig-sdk, JGrass or BeeGIS development. Also it tries to import projects and configure the target platform, in order to really help beginning rcp developers to start with GIS development.

Here the step-by-step guide to do so (this assumes that you downloaded the eclipse IDE suitable for plugin development):

step 1) connect to the update site and install the plugin that will take care of all this

Go under Help->Software updates->Find and install

select the second: search for new features to install

in the next tab select new remote site and insert as name: JGrass Devel Setup
and as URL:

after pushing the finish button, eclipse will contact the update site and present the plugin to install:

Select it, push next, accept the license agreement, push next once more and in the last tab push the finish button.

Eclipse will download the plugin, prompt for installing verification and after ok, it will also prompt you to restart eclipse.
Let's answer everything asked with ok, yes or whatever positive answer.

Once restarted we go in Window->Show View->Other...

and we will get the list of available views:

Select the JGrass DevelEnv Setup View and you will get a view window with some choices:

At that point you have several choices:
  • install the udig sdk
  • install the JGrass extras
  • install the svn code from the JGrass repository
  • install the svn code from the BeeGIS repository
I will leave them all checked for this example, which will lead to install everything.

step 2) Installation: Push the button and open the beer!

If everything went well, what should happen now is:

- download of the udig sdk (this will take a while, about 100MB to be transfered)

- extraction of the udig sdk into your workspace

- download of the JGrass sdk extras and its extraction into the udig sdk

- checkout of the JGrass svn code and import of the checked out projects into eclipse workspace

- checkout of the BeeGIS svn code and import of the checked out projects into eclipse workspace

Be sure it finished (in my case it took 14 minutes to download and checkout everything)

step 3) setting the target platform

You will probably notice that all the imported projects have compilation problems. This is ok, since they do not yet have the proper target platform set to compile against. That is what we will do in the next and last step.

Go under the eclipse preferences and there select: Plug-in Development->Target Platform

You will note in the lower part a section dedicated to Pre-defined Targets. The plugin adds a new pre-defined target, which points to the newly downloaded and prepared udig-sdk. Select the entry JGrass/Udig Target Platform and push the load target button. You will note that now some net.refractions.udig.* plugins are listed. If so, you did it right.
Make sure that all the plugins are selected, if they are not, select them all.

Before pushing apply you see the compilation problems:

After pushing apply the errors have gone:

You are now ready to start development!
Already finished the beer?

Enjoy and please let me know any issue. This is the first version of the plugin, so there could be issues for example on different platforms. Right now I tried it only on Macosx to make this howto.

PS: if you are curious about the versions of which software it is using and where downloading from, have a look at the configuration file it uses (it connects to that site):
Post a Comment