NEW (29.01.2024): We will change some dependency handling! For development with eclipse you must install the m2e PDE Integration into the Eclipse IDE.

After the installation it can be used in the PDE Target Editor.

06.02.2024: Due to a bug in Eclipse, you will need to use the latest eclipse version (2024-03): https://www.eclipse.org/downloads/packages/release/2024-03/


Nearly everything in Odysseus is designed to be replaced or extended. Here are the typical ones:

Some OSGi/Eclipse basics


OSGi Life Cycle


OSGi debugging

TODO: Check commands with apache felix console


Setting up 

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

New:

1. Prerequisites

You will need the following tools:

2. Checkout Source Code

Remark: Under windows it is best to use a folder, that is not inside the user home path (because of long file names). A good option would be a base folder git somewhere on the root level.

There are different ways to create new functionality with Odysseus. The first way should be used if you want to add something new to Odysseus (e.g. a new wrapper) but do not want to change the common code base. This should be the preferred way of development with Odysseus:

Option 1: Extending Odysseus with New Plugins

Odysseus has a very large code base. To allow a lightweight start, we provide a template project in our Bitbucket server. You should clone or fork this project and use it to add new plugins to this template. The template can be found here: https://git.swl.informatik.uni-oldenburg.de/projects/ODY/repos/odysseusrepotemplate/browse . When using git you should use the following command to clone Odysseus. The template contains some standard products and the target platform as a submodule. The "--recurse-submodules" flag clones this submodule when cloning the repository. Alternatively, you can clone the submodule individually.

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.

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

ODT

There is also a first approach for an eclipse plugin that could make processing easier. For this, install the Odysseus Development Tools from the following update site

https://odysseus.informatik.uni-oldenburg.de/download/odt/

and uncheck "Group items by category".

After installation and restart there is a new menu option Odysseus where you can create an initial project:

Option 2: Extending an Existing Odysseus Plugin/Extending Odysseus Core

You want to extend an existing plugin from Odysseus or extend the core system? Then, instead of cloning the empty template from Option 1, clone the repository of the plugin you want to develop on. If the plugin is hosted in our Bitbucket, you can probably find it in one of the projects in this list: https://git.swl.informatik.uni-oldenburg.de/projects . Look for example at the Odysseus, the Odysseus Incubation and Odysseus Wrapper projects. When you have found the repository you want to use, check it out and don't forget to clone the submodule to get the target platform definition and the standard products:

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:

git clone <your repo URL>
cd <repo>
git submodule init
git submodule update
cd odysseus_dev
git checkout master
cd ..

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:


After clicking "Next", select all needed projects.

Now there are many project already opened:

Most of them are from odysseus_dev.


The source code folder has the following subfolders:

4. Target Platform

You now see a lot of compiler error. This is because the target platform is not set.

The target platform can be found in the project targetplatform.

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).

Click "Set as Active Target Platform" to use this as your target platform. Important: Do not click, if "Resolving..." is still active!

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

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)

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:

For your first run, the easiest way is to start the "Odysseus Studio 2" (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.

6. Additional Information

Features

Since Odysseus is an OSGi based application, it is divided into several bundles (the bunch of projects you checked out and imported before). To keep the overview of all bundles, they are combined to features. Each feature reflects a special functionality of Odysseus. Thus, we have a core.feature that encapsulates all minimal needed bundles or the studio.feature that contains all bundles for the RCP (i.e., GUI) of Odysseus (what we call Odysseus Studio). The combination of several features is called a "product" - which should be runnable. The section above, for example, lists three products that combine different sets of features.

The core feature is necessary because it contains all fundamental functions for Odysseus. Here's a list of Odysseus Features: Features. See Adding features to products how to add a new Feature to an existing product.

Logging

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 log4j2.xml to configure the logging behavior (or use one of the given).