Skip to content
cpedrinaci edited this page Jun 29, 2011 · 14 revisions

If you want to contribute to iServe or simply extend iServe's code for your own purposes you are free to do so. Indeed, we would prefer if you contribute your code so that the project as a whole benefits from your efforts much like you would by using the existing code. We understand, though, that for various reasons this may not alway be the case.

Whatever your goal is you will need to setup your development environment first so here you are some instructions on how to do so. We will strive to improve these instructions and update them continuously. Should you find any difficulties whatsoever don't hesitate to contact us. Similarly, if you can provide additional instructions, tips, or simply some other recommendations regarding this process, please do let us know so that we continue improving these instructions

Requirements

Before you can start compiling and deploying iServe you will need to get yourself quite a few tools and software you may not have already. In particular you will need:

Optional Requirements

In addition to the requirements above you may also use some additional software:

  • OWLIM http://www.ontotext.com/owlim, either SWIFT or BIG (recommended) would provide you some additional support over Sesame notably regarding OWL but also in terms of scalability. Ourselves we use Big OWLIM.

  • A proper Maven repository

Setting up your development environment

We would recommend you to use some IDE for developing. Ourselves we use Eclipse but this is certainly up to you. You may however sometimes find more reliable to compile the code from the command line directly.

Downloading the Sources

In order to obtain the sources simply follow the guidelines for any other project in github. See http://help.github.com/fork-a-repo/ for instructions on how to fork a repository.

Downloading additional libraries

Now that you have downloaded the sources you are almost ready for compiling the code. You, however, require some additional libraries which are not accessible directly maven. These libraries need to be installed manually in your local maven repository.

The libraries are:

  • higgins-configuration-api-SNAPSHOT.jar

  • higgins-sts-api-SNAPSHOT.jar

  • higgins-sts-common-SNAPSHOT.jar

  • higgins-sts-server-token-handler-SNAPSHOT.jar

  • higgins-sts-spi-SNAPSHOT.jar

(libraries above are required by openrdf4java to parse the authentication results)

Compiling the code

iServe's source code is divided into a number of modules, each of which being defined as a Maven project. The top-level project can be used for compiling each of the modules in one go.

In order to program you may want to import the code into your own Java editor. For Eclipse (with the M2e plugin installed) this is done by:

Import -> Maven -> Existing Maven Projects

In case you are using Eclipse, after importing the projects we'd recommend you to update the project settings by right-clicking on the project and selecting:

Maven -> Update Project Configuration.

Once you have done so you should have a project per module in your workspace. In order to compile the modules Eclipse will need to download a considerable number of dependencies. In principle Maven will take care of this but it may occur that some dependencies can't be resolved. In those cases you will have to sort it out manually following the instructions given by Maven.

Once all the dependencies are present in your local Maven repository you should be ready to go. For installing the whole project you can go to the command line at the top-level project and do:

mvn install

Alternatively you can use mvn install -DskipTests in order to skip the tests.

Create your RDF repositories

iServe relies on a couple of RDF repositories for capturing the data about services as well as logs of users' actions (annotation submission, deletion, etc).

You will have to create two repositories by hand. In Sesame this can be done relatively easily using the workbench. If you have deployed locally in your server you can probably access to it at the URL http://localhost:8080/openrdf-workbench The names used for the repositories in this step will have to be remembered for the configuration step (see next).

Set up the configuration file

Copy the config file in iserve-sal-gwt (or iserve-sal-rest) from src/main/webapp/WEB-INF/config.properties.default to src/main/webapp/WEB-INF/config.properties.

Edit the config file to point to your specific setup, notably URLs and repository IDs.

In iServe a number of modules can be accessed via HTTP, this includes:

  • iserve-sal-rest (storage access layer)

  • iserve-discovery-engine (discovery engine)

  • iserve-sal-gwt (user interface based on GWT)

While developing it may be more convenient to deploy each of these modules in a server within your development environment to have immediate updates and avoid continuously deploying the new code for testing. In order to help in this process all 2 modules have a configuration file which they will require. You can just use the same values for each of the modules but it will still be required on a per module basis in order to be able to test the system since each of them would be deployed as a separate application.