1.1. Prerequisites

1.1.1. Software and Configuration

First of all you need the java webapp developers base pillars:

  1. java SDK 1.5.x or SDK 1.6.x http://java.sun.com

  2. eclipse 3.2 or 3.3 http://www.eclipse.org

  3. mySQL http://www.mysql.org/downloads/mysql/5.0.html, please read the MySQL part in the techdocu for the setup OLAT Techdocu MySQL

  4. tomcat 5.x or tomcat 6.x http://tomcat.apache.org/ (scroll down -> Binary Distribution -> Core -> may be windows service installer )

  5. Maven 2.0.x or higher, only if you need to change or debug the olatcore project

Install those big things on your computer. Now you have to configure Eclipse 3.x.x to work together with the tomcat. Either you install the Sysdeo tomcat plugin or you use the eclipse Web Tools Platform WTP.

The whole how-to description expects from now on Eclipse 3.x and WTP installed.

Follow these steps to have the Web Tools Platform (WTP) at your finger tips:

  • start eclipse

  • Help | Software Updates | Find and Install , use this to search for new features and watch out for the Web Tools Platform, select and install it.

  • typically it is recommended to restart eclipse... do so.

Further eclipse setup:

  1. check that you have a Servers entry under Window | Preferences

  2. activate Installed Runtimes and Add an Apache Tomcat runtime, configure it to fit your pathes.

  3. add a Server entry: add a new server by File | New | Other. Take the default value localhost for server and typically the preselected Apache tomcat for the server runtime. Just be patient if you do not found a project which you can add.

  4. add TOMCAT_HOME class path variable into eclipse, if not already available

So far you should have an eclipse with a tomcat at localhost configured server. But you are missing the OLAT source code. Let us then proceed to anonymously checkout the OLAT source from HEAD.

1.1.2. Get the OLAT source code

The OLAT source code is splitted in two java eclipse projects: the olatcore project (cvs module: "olatcore") and the LMS (learning management system) project (cvs module: "olat3"). The olatcore project is the framework upon which the LMS is based on. Basically, one only needs the olat3 for LMS development, since per default the olatcore lib is provided as jar in the olat3/webapp/WEB-INF/lib .

For debugging purposes, there is the possibility to checkout the olatcore and link the olatcore source to the olat3 project build path (Eclipse: olat3 project Properties/Java Build Path/Source/Link Source). It is advisable that the olatcore should not be changed during the LMS developing process.

1.1.2.1. OLAT anonymous CVS access with Eclipse

The OLAT project gives you read-only access to its sources. If you encounter bugs or have some interesting hints or questions about parts of the source - do not hesitate to write it to the developers list.

You have to open the CVS Repository Exploring Perspective, which you find via Window | Open Perspective | Other..

  1. create a new repository location: right click on the right side to create a new repository location

  2. fill in the needed fields:

    • host: cvs.olat.org

    • repository path: /usr/local/cvs

    • user: anonymous

    • password: anonymous

    • connection type: pserver

    • use default port

    • validate connectoin on finish

    • save password

  3. click on finish, this validates if you can connect... you should be connected to internet to have this working.

1.1.2.2. CVS check out the LMS project

After successfully creation of this CVS repository location you can browse your repository. Just go straight ahead to the HEAD | olat3 right click on it and check out this copies the whole project from the repository server to your eclipse workspace. This may take a while...

As already mentioned, the LMS java project already contains the olatcore jar (olat_core-1.0-SNAPSHOT.jar).

1.1.2.3. Optionally: CVS check out the olatcore project

In case you also need the olatcore source:

  1. checkout the olatcore module from HEAD.

  2. Define a M2_REPO classpath variable for your maven repository.

    Define your maven repository to eclipse by running the maven command:

    • $ cd workspace_dir

    • $ mvn -Declipse.workspace=. eclipse:add-maven-repo

    This command creates an Eclipse classpath variable M2_REPO that points to your local maven repository.

    IF THIS DOESN'T WORK: add M2_REPO class path variable manually into eclipse (olatcore project Properties | Java Build Path | Libraries | Add Variable | Configure Variables… | New)

  3. mvn clean package (download basic libs form maven-repo into local repository)

  4. mvn eclipse:clean eclipse:eclipse

If you want to work/debug in both projects (olatcore and olat3), you must change the default olat3 project settings like :

  1. remove olatcore-1-0-SNAPSHOT.jar from olat3 project build classpath

  2. link the olatcore source to project olat3, (olat3 Project Properties| Java build path| Source| Add Link, select path to olatcore/src/main/java and olatcore/src/main/resources)

  3. execute Project 'clean...'