My favorites | Sign in
Project Home Wiki Source
Search
for
SetupOlatInEclipse  
Checkout, add needed variables, configure olat and WTP to start developing new features.
GSoC2008
Updated Mar 18, 2010 by p1bru...@gmail.com

Eclipse IDE Setup

Checkout

In Eclipse open view CVS Repository and Add CVS Repository as in the screeshot.

The password is the same as the username anonymous

checkout the two projects from head:

General Eclipse Setup

In Eclipses build path two variables are missing, and Eclipse may reference the wrong JRE, change the default to your installed JDK.

TOMCAT_HOME which should point to something like .../Tomcat6.0
M2_REPO which should point to the Maven 2 libraries repository. This is a directory named .m2 and resides in the users home e.q. ../patrickb/.m2/repository If the .m2 folder is missing, just open a console -> change to the directory ../workspace/olat3 and issue mvn eclipse:clean eclipse:eclipse.
installed JRE change it to point to your installed JDK

You add the missing variables by Window -> Prefereces -> Filter for classpath -> activate Java-Build Path-Classpath Variables -> new -> add the variables. And to change the used JRE by Window -> Preferences -> Filter for installed -> activate Java-Installed JREs -> Add your JDK

If the prerequisites are all ok, use maven to download the dependencies and build olat

mvn eclipse:eclipse creates the .classpath and .project file for eclipse
mvn install deploys the jar files to the olat project and copies other resources

After you run the two command successfully go back to eclipse and refresh both projects. Eclipe will start to rebuild the workspace and after a while you should see no more errors.

Prepare Database

For ease of development OLAT run with an embedded hsqldb database where the tables are populated automatically.

Create olat.local.properties

OLAT should run with the default olat.properties and uses an embedded hsqldb database. If you like to use set custom path for userdata of even an other database you have to adjust some properties. Create an olat.local.properties file and save it under /tomcat/lib (the first start of olat tries to create this file in tomcat/lib). The default location of userdata and databasedata is the java.io.tmpdir. You can also adjust this property by adding a java VM property as start parameter like this -Djava.io.tmpdir=/home/guido/temp .

base.dir C:/Users/patrickb/workspace32/gsoc/olat your path to olat project in your eclipse workspace
userdata.dir C:/tmp/olat_gsoc/olatdata where you want to save data
server.domainname localhost
server.port 8080
registration.notificationEmail <your valid email> else some workflows may hang for the sending timeout
adminemail <your valid email> else some workflows may hang for the sending timeout
supportemail <your valid email> else some workflows may hang for the sending timeout
smtp.host <your valid smtp host> else some workflows may hang for the sending timeout, maybe you have to provide username and password
db.name myolat if you followed the example from above or your choosen name
db.user myolatuser if you followed the example from above or your choosen name
db.pass myolatusersecret if you followed the example from above or your choosen value
brasato.debug true this enables the GUI debug mode, you will see a red square with a green bug inside on top left corner, after starting olat. And more important, the velocity pages, e.g. the xxx.html fragments are not cached.
brasato.src file:///.../workspace/brasato/src/main/java
localization.cache false makes changes to i18n files immediately effective immediate
log.rootCategory INFO, syslog, A1 add the A1 to have more info on the console

screencast

Setup up WTP Tomcat Server

With WTP you can easily manage your tomcat or whatever servers.

Add a new server configuration with the wizard found under File > New... > Other > Server. Define a new server Server > Next, where you should use localhost and no associated project. Besides the projects you find then a Server Entry

As the first OLAT startup may take long and exceed the server start time limit defined by eclipse. You should change this to unlimited Window > Preferences > Server > Server timeout delay change from Normal to unlimited.

Copy the server.xml from olat/conf/server.xml you may refresh the workspace first by clicking F5 to find the file after a ant build. Paste the file in the Server > Localhost and overwrite the existing server.xml.

Activate the Server view and start the defined server in Debug mode.

Then point your browser http://localhost:8080/olat/dmz/ this should bring you up the login screen.

THAT'S IT YOUR DONE - HAPPY GSoC Coding !!!

Comment by project member t...@freebits.de, May 15, 2008

Thank you for this quite brief description, worked well for me.


Sign in to add a comment
Powered by Google Project Hosting