Versions Compared

Key

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

New. You can now use tycho to build Odysseus modules.

If you want to create a module that should sometimes be added to the Odysseus eco system (building and updatesite) you need to follow some rules for the tycho build.

Pomless build

First of all, we still want to use the Eclipse platform so we use a pomless build, i.e. maven is only used to organize the project.

To define pomless builds create

WIP

There are some steps to build odysseus bundles with tycho. 

Pomless build

Create a new folder .mvn on the root level of the project and add file extensions.xml with the following content:

Code Block
languagexml
<?xml version="1.0" encoding="UTF-8"?>
<extensions>
  <extension>
    <groupId>org.eclipse.tycho.extras</groupId>
    <artifactId>tycho-pomless</artifactId>
    <version>1.2.0</version>
  </extension>
</extensions>

Global and local builds

There are different ways to build Odysseus (implemented with maven profiles).

  1. Each module can be build (so called solobuild)
  2. A group of modules can be grouped together to be build. The stable and the incubation updatesite is build on this way.

Main Pom

To allow local and solobuilds the must be a pom.xml on the main level of the project. In the following there is an example from odysseus_core.

Code Block
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>de.uniol.inf.is.odysseus</groupId>
    <artifactId>de.uniol.inf.is.odysseus_core.root</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <parent>
        <groupId>de.uniol.inf.is.odysseus.tycho</groupId>
        <artifactId>de.uniol.inf.is.odysseus.tycho.configuration</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <relativePath>./odysseus_dev/de.uniol.inf.is.odysseus.tycho.configuration</relativePath>
    </parent>

    <modules>
        <module>common</module>
        <module>resource</module>
        <module>client</module>
        <module>server</module>
        <module>monolithic</module>
        <module>wrapper</module>
    </modules>    

    <profiles>
        <profile>
            <id>solobuild</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>odysseus_dev</module>
                <module>releng/de.uniol.inf.is.odysseus.update</module>
            </modules>
        </profile>
        <profile>
            <id>test</id>
            <modules>
                <module>test</module>
            </modules>
        </profile>
    </profiles>
</project>


The are different parts in this maven pom.

On the top there is the base information:

For your project you must change the <artifactId> the a unique name.

In the parent clause the parent is defined. In this such things as the target platform and the different base configurations are handled.

Remark: The parent is part of the odysseus_dev submodule. It is importent to keep this module up to the latest version.

The modules part contains all directories, where plugins can be found. In this case there is a module for most subdirectories.

There are two maven profiles below the modules section


TODO: CREATE ECLIPSE PROJECT ...

...