Preparing an SLC development environment

From ArgeoWiki

Jump to: navigation, search

This page shows how to prepare an environment to build and develop on SLC proper. Frameworks based on SLC are supposed to use the same technologies and follow the same conventions, what follows should therefore apply to these frameworks.

Contents

Requirements

Java 5+

At least version 1.5, 1.6 is supported as well.

On Linux, it is recommended to use the JDK shipped with your distribution and OpenJdk (1.6) is recommended over GCJ (1.5).

On Fedora 9+, simply run as root:

 yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel java-1.6.0-openjdk-src

On Windows or if your Linux distribution does not provide a modern JDK, download it from http://java.sun.com/javase/.

Maven

Subversion

On Linux Subversion is probably provided with your dsitribution.

On Fedora, you can install it by running:

 yum install subversion

On Windows, download the community version from here: http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100 (svn-win32-1.5.*.zip)

Install it an make sure that the 'bin' directory is also in your PATH.

Python

The web components of SLC are based on Qooxdoo which require Python to build.

On Linux, you probably have Python already installed.

On Windows, you have to install it from http://www.python.org/ftp/python/2.6.1/python-2.6.1.msi . We are working on a method which would not require an installation on Windows.

Checkout

Experience shows that it is best to check out the whole SLC source tree, from the command line (or using any other Subversion tool) and not to checkout individual projects in an IDE. Checking out module in an IDE will work for more focused work, but quickly become a mess if you want an overview of all components.

In order to checkout chose a location for your code base (let's say ~/dev/src/slc), cd into it and execute:

 svn co https://www.argeo.org/svn/slc/trunk .

(note the '.' at the end !!)

Build

The first things to do before trying to use Eclipse or another IDE is to make a complete build of SLC.

Go into the directory where you checked out SLC (~/dev/src/slc in our example) and run:

 mvn clean install

Don't be surprised if it download a lot of components the first time you use it: Maven constructs its own classpath and the classpath of the components it builds from Jars downloaded from repositories.

If you reach "BUILD SUCCESSFUL", you're done.

Later on when you want to update and rebuild SLC, this is always a safe bet to go at the root and do:

 svn update
 mvn clean install

If you knwo what you are doing and are familiar with the SLC project you can build individual modules, etc. But the above is the robust way to be sue that you are completely inline. This is also a good practice to run it before committing important changes to an SLC based project

Eclipse usage

Once the Maven build succeeded, it is time to set up your IDE.

See Argeo IDE

Only then, import the projects into Eclipse: In package explorer, righ-click, "Import Existing Projects from the workspace". Choose the directory where you checked out the sources and import all projects you are interested in.

You can skip the following projects when importing:

  • the sandbox projects (./sandbox)
  • the SLC specific Maven plugins (./maven)
  • the UI components (./eclipse) which require additional configuration of an Eclipse target environment
Personal tools