Versions Compared

Key

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

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

Important: Due to a bug in tycho currently maven version 3.6.2 cannot be used. So use 3.6.1 instead.

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.

...

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

...

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

...

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 to a unique name.

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

...

Replace ${PLATFORMTARGETFILE} with the required PLATFORMTARGETFILE.For odysseus_core e.g.:

Here are some examples

Code Block
// Odysseus core
mvn clean verify -Dtargetfilename=platform_core
// Stable development build
mvn clean verify -Dtargetfilename=platform_development_stable
// All master build
mvn clean verify -Dtargetfilename=platform_master_all

The build The build typically takes some time as dependencies are resolved and the artifacts are build.

...

Attention: The are no blancs in the "P-section"!

See The Odysseus Operator Test Framework for information how to create integration tests for your module.

Global build

Here are some example

Code Block
// Odysseus core
mvn clean verify -Pproduct,solobuild,currentOS -Dtargetfilename=platform_core
// Stable development build
mvn clean verify -Pproduct,solobuild,currentOS -Dtargetfilename=platform_development_stable
// All master build
mvn clean verify -Pproduct,solobuild,currentOS -Dtargetfilename=platform_master_all

See The Odysseus Operator Test Framework for information how to create integration tests for your module.

Global build

If you want to combine different modules to a global build (e.g. as we do in jenkins to create all odysseus_stable and incubation modules) you need to do the following:

...

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

    <modules>
        <module>stable</module>
        <module>incubation</module>
        <module>odysseus_dev</module>
    <packaging>pom<</packaging>
modules>    <parent>
        <groupId>de.uniol.inf.is.odysseus.tycho</groupId>
        <artifactId>de
</project>

2) Add odysseus_dev as submodule

Code Block
git submodule add https://mgrawunder@git.swl.informatik.uni-oldenburg.de/scm/ody/odysseus_dev.git

3) Add all required modules as submodules

4) Do something like in the following:

Code Block
# Install the parent
cd ${WORKSPACE}/odysseus_dev/de.uniol.inf.is.odysseus.tycho.configuration</artifactId>configuration
mvn clean install

# Do     <version>1.0.0-SNAPSHOT</version>
    </parent>

    <modules>
        <module>stable</module>
        <module>incubation</module>
        <module>odysseus_dev</module>
    </modules>    
</project>

2) Add odysseus_dev as submodule

Code Block
git submodule add https://mgrawunder@git.swl.informatik.uni-oldenburg.de/scm/ody/odysseus_dev.git

3) Add all required modules as submodules

4) Do something like in the following:

Code Block
# Install the parent
cd ${WORKSPACE}/odysseus_devprocessing
cd ${WORKSPACE}
# Combine all category.xml of the submodules to a new category.xml
rm -rf tooling
git clone https://git.swl.informatik.uni-oldenburg.de/scm/ODYJENK/tooling.git
javac "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.creatermap/src/de/uniol/inf/is/odysseus/creatermap/CreateRMap.java"
java -cp "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.creatermap/src" de.uniol.inf.is.odysseus.creatermap.CreateRMap "${WORKSPACE}" "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.tycho.configuration
mvn clean install

# Do processing
cd updatesite" "${WORKSPACE}
# Combine all category.xml of the submodules to a new category.xml
rm -rf tooling
git clone https://git.swl.informatik.uni-oldenburg.de/scm/ODYJENK/tooling.git
javac/tooling/ci/de.uniol.inf.is.odysseus.update.p2"        
cp "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.creatermap/src/de/uniol/inf/is/odysseus/creatermap/CreateRMap.java"
java -cp "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.creatermap/src" de.uniol.inf.is.odysseus.creatermap.CreateRMap "${WORKSPACE}" "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.updatesite" "${WORKSPACE}/tooling/ci/.update.p2/category.xml" ${WORKSPACE}/releng/de.uniol.inf.is.odysseus.update/ 

#Run the build 
mvn  clean verify -P!\solobuild -Dtargetfilename=platform_core



Install Features via Command Line

It is possible to install features without starting the product (e.g. to create a docker image with a distinct combination of features), e.g.:

Code Block
eclipsec.exe -application org.eclipse.equinox.p2.director -repository https://odysseus.informatik.uni-oldenburg.de/updatesite/odysseus_all_new/stable/origin/master/latest/ -installIU de.uniol.inf.is.odysseus.update.p2"        
cp "${WORKSPACE}/tooling/ci/de.uniol.inf.is.odysseus.update.p2/category.xml" ${WORKSPACE}/releng.wrapper.rabbitmq.feature.feature.group -destination H:/git/odysseus_core/odysseus_dev/products/monolithic/target/products/de.uniol.inf.is.odysseus.update/ 

#Run the build 
mvn  clean verify -P!\solobuild -Dtargetfilename=platform_core


.studio.product.monolithic/win32/win32/x86_64 -profile SDKProfile

See: https://help.eclipse.org/2020-03/index.jsp for further information.