Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

See also some newer slides

Setting up

This section describes how to set up Eclipse and Odysseus for development.

...

You will need the following tools:

  • Java 8 JDK11 OpenJDK
  • Eclipse for RCP and RAP Developers (Important! Do not use a standard eclipse version!
  • GIT client (you can use git from command line or with a tool of your choice)

...

Code Block
languagebash
git clone --recurse-submodules https://git.swl.informatik.uni-oldenburg.de/scm/ody/odysseusrepotemplate.git newRepo
cd newRepo
cd odysseus_dev
git checkout master

Remark: because you are not allowed to push updates to the template repository you should change your repository URL to your git location and rename your folder to your new repository name.

Code Block
languagebash
// in your newRepo Folder!
git remote set-url origin <new url>

...

Code Block
languagebash
git clone --recurse-submodules <your repo URL>
cd <repo>
cd odysseus_dev
git checkout master

Remark: There could be some updates in odysseus_dev that is not already reflected in each module. So it is always a good idea to update the odysseus_dev submodule to the newest version.

If you missed the --recurse-submodules, you can also use:

Code Block
git clone <your repo URL>
cd <repo>
git submodule init
git submodule update
cd odysseus_dev
git checkout master
cd ..
git remote set-url origin <new url>

3. Setup Eclipse

After Eclipse started, you have to import all bundles (these are the parts of Odysseus and are equal to an Eclipse project). Use "File -> Import -> Existing Projects into Workspace" to import them into Eclipse as follows:

Image RemovedImage Added

Image RemovedImage Added


After clicking "Next", select all needed projects.

Image Added

Now there are many project already opened:

Most of them are from odysseus_dev.

Image Added


The source code folder has the following subfolders:

  • client: contains all bundles that run on the client and don't have any dependencies to the server directly. It mainly offers the GUI.
  • common: this holds common stuff and utilities that are needed on both server and client. Common does not have any dependencies to other folders like server, client...
  • monolithic: this folder contains bundles that will only work in a monolithic system where server and client are the same product
  • resource: possibly some resources for the bundle, but probably empty. The resources are part of the target platform and are downloaded automatically by Eclipse when settings the target platform.
  • server: this is the server part of Odysseus and contains Odysseus main functionalities. Except of common, it does not have any dependencies to other folders. It does not have any GUI or client functionalities.
  • test: contains stuff for testing and benchmarking

Furthermore, each main folder has different subfolders. Each subfolder normally contains a certain functionality or a dedicated extension (aka plugin for Odysseus).

In the follwing screenshot some bundles are selected.

Image Removed

We recommend to create working sets like here to group certain bundles:

Image Removed

Image Removed

...



4. Target Platform

You probably only checked out the bundles you need, not the whole Odysseus core, resources and other stuff. All these things are part of the target platform and are loaded when setting the target platform for your workspace. Before you do that, you probably now see a lot of compiler errors. After you set the target platform, the errors should be goneerror. This definition is provided via because the " target -platform.target" file (hint: if you don't see the target platform as a project when importing, go back to the git checkout project and make sure you cloned the submodule).platform ist not set.

The If you are using the project template, the target platform can be found in the project targetplatform. If you are making core odysseus development (which is unlikely), it  can be found in the bundle/project called "de.uniol.inf.is.odysseus.common.feature". Open this file and click "Set as target platform

Image Added

Choose the correct Targetplatform for you work.

Remark: It works best, when you first open the file (double click) and wait some time (until the platform is resolved).

Image Added

Click "Set as Active Target Platform" to use this as your target platform. This can take a while. When you click on the small green progress-bar icon in Eclipse you can see the progress.

You can also use CRTL-SHIFT-R to search for the target platform

Image Removed

Image Removed

Notice, the target platform is valid for your whole workspace (therefore we recommend to use a dedicated workspace for Odysseus development).  Remark: Sometimes eclipse behaves strange when setting a new target platform. See Odysseus FAQ for further hints if there are problems with the target platform.

. Important: Do not click, if "Resolving..." is still active!

Image Added

After that, the project will be compiled and there should not be any errors anymore.

Image Added

If there are still errors, you should try to update the odysseus_dev folder (sometimes there are errors with the sites, that dliver target platform contents)Image Removed

5. First Run - Available Products

Now you should be able to run Odysseus. There are some predefined product-definitions to run Odysseus. Depending on the bundles/folders you checked out before they can differ, but the standard submodule should contain three products:

  • Odysseus Server .product - (located in de.uniol.inf.is.odysseus.server.starterproduct) - This is just a server-based instance of Odysseus (without any GUI) which can be used e.g. via a webservice REST.
  • Odysseus Studio 2 (Client) .product - (located in de.uniol.inf.is.odysseus.client.starterproduct) - This is only the client part (GUI), which tries to connect to an Odysseus Server instance via webservice.
  • Odysseus Studio 2 (Monolithic).product - (located in de.uniol.inf.is.odysseus.client.starter or de.uniol.inf.is.odysseus.monolithic.feature product ) - This combines server and client into a single product and adds some additional bundles that only work in such a monolithic combination.

For your first run, the easiest way is to start the "Odysseus Studio 2 (Monolithic).product"" (de.uniol.inf.is.odysseus.studio.product.monolithic). Open this file and go to the tab "Overview". Click "Synchronize" under "Testing" and afterwards click "Launch an Eclipse application" to run Odysseus (you can alternatively run it in debug mode if you want). When Odysseus Studio (the GUI) comes up, you have to insert some credentials. A default user is "System" and the password is "manager", the tenant can be left empty. Now Odysseus should be up and running.

Image Added

6. Additional Information

...

Odysseus comes with the Simple Logging Facade for Java (SLF4J). To use logging, add the de.uniol.inf.is.odysseus.slf4j bundle. In this bundle you can find the log4jlog4j2.properties xml to configure the logging behavior .

MacOS

Currently, only the server is working on MacOS. You can start the Odysseus Server product from Eclipse, but you cannot start any GUI product (e.g. Monolithic) that involves RCP. To run the server product, you have to install Java JDK 1.8, e.g. with homebrew: https://www.lonecpluspluscoder.com/2017/10/08/installing-other-versions-of-the-java-jdk-via-homebrew/(or use one of the given).