My favorites | Sign in
Project Logo
          
Search
for
Updated May 19, 2008 by mayankjain20
Labels: GSoC2008
SetupOlatInEclipse  
Checkout, add needed variables, configure olat and WTP to start developing new features.

Eclipse IDE Setup

Checkout

In Eclipse open view SVN Repository and Add SVN Repository where you can use the links from the list and your code google username and password should be visible in your code google settings. Checkout the trunk or your desired revision.

brasato info | https://brasato.googlecode.com/svn/ screencast
olat info | https://olat.googlecode.com/svn/ screencast

If you are behind a proxy server use this link to set up proxy for subversion.

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/brasato and issue mvn clean package and then mvn eclipse:clean eclipse:eclipse. If you are behind proxy then use this link to setup proxy for maven.
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

After the rebuild you should have no more errors.

screencast

Setup OLAT dependency to Brasato sources

The fastest development cycle is achieved by using the brasato project instead of the olatcore-SNAPSHOT.jar.

In the olat project's Properties > Build Path > Source you can link the folders .../workspace/brasato/src/main/java and .../workspace/brasato/src/main/resources And then remove the olatcore-1.0-SNAPSHOT.jar from your build path.

screencast

Prepare Database

As root user create the olat database, and an olat user with password

Open a shell / console and

mysql -u root -p login as root
CREATE DATABASE myolat; a database named myolat
GRANT ALL PRIVILEGES ON myolat.* TO 'myolatuser'@'localhost' IDENTIFIED BY 'myolatusersecret the db user myolatuser has access from localhost with password myolatusersecret these you should remember later for the build.properties
QUIT; return to shell for verification
mysql -u myolatuser -p connect to database using the myolatuser with password

screencast

Create build.properties

You have to copy the build.properties.default to build.properties and change the following values to meet your installation directories.

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

Run as Ant Build

Right click on the build.xml, select Run As... and then Ant Build.... From the dialog select the targets deletedatadir, dbsetup, config-all and be aware that deletedatadir will delete all files in the datadir and dbsetup will drop your olat database.

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.

Wait until you see something like Full Indexer.... then point your browser http://localhost:8080/olat/dmz/ this should bring you up the login screen.

screencast

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


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

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


Sign in to add a comment
Hosted by Google Code