You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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 a new folder .mvn on the root level of the project and add file extensions.xml with the following content:

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

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

If you want to create an update site, create a new folder "releng/de.uniol.inf.is.odysseus.update"

Add a pom to this folder

<project>
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>de.uniol.inf.is.odysseus</groupId>
		<artifactId>de.uniol.inf.is.odysseus</artifactId>
		<version>1.0.0-SNAPSHOT</version>
		<relativePath>../../pom.xml</relativePath>
	</parent>

	<artifactId>de.uniol.inf.is.odysseus_core.update</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>eclipse-repository</packaging>

</project>


add a file category.xml



Create a root pom.xml similar to:

<project>
	<modelVersion>4.0.0</modelVersion>
	<groupId>de.uniol.inf.is.odysseus</groupId>
	<artifactId>de.uniol.inf.is.odysseus</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>odysseus_dev</module>
		<module>releng/de.uniol.inf.is.odysseus.update</module>
		<module>server/de.uniol.inf.is.odysseus.wsenrich</module>
		<module>server/de.uniol.inf.is.odysseus.wsenrich.feature</module>
	</modules>	
</project>

The modules section can also reference to a folder with another pom that defines the modules inside this folder. E.g.:

	<modules>
		<module>odysseus_dev</module>
		<module>integration.testing</module>
		<module>releng/de.uniol.inf.is.odysseus.update</module>
	</modules>	

and the folder (here integration.testing) must contain a pom.xml similar to this:

project>
	<modelVersion>4.0.0</modelVersion>
	<groupId>de.uniol.inf.is.odysseus</groupId>
	<artifactId>de.uniol.inf.is.odysseus.integration.testing</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<packaging>pom</packaging>

	<parent>
		<groupId>de.uniol.inf.is.odysseus</groupId>
		<artifactId>de.uniol.inf.is.odysseus</artifactId>
		<version>1.0.0-SNAPSHOT</version>
	</parent>

	<modules>
		<module>compile.feature</module>
		<module>de.uniol.inf.is.odysseus.test.component.compile</module>
		<module>de.uniol.inf.is.odysseus.test.component.jira</module>
		<module>de.uniol.inf.is.odysseus.test.component.keyvalue</module>
		<module>de.uniol.inf.is.odysseus.test.component.keyvalue.feature</module>
		<module>de.uniol.inf.is.odysseus.test.component.nexmark</module>
		<module>de.uniol.inf.is.odysseus.test.component.operator</module>
		<module>de.uniol.inf.is.odysseus.test.component.parallelization</module>
		<module>de.uniol.inf.is.odysseus.test.component.parser.cql</module>
		<module>de.uniol.inf.is.odysseus.test.component.probabilistic</module>
		<module>de.uniol.inf.is.odysseus.test.feature</module>
		<module>jira.feature</module>
		<module>nexmark.feature</module>
		<module>operator.feature</module>
		<module>test</module>
		<module>xml</module>
		<module>xml.feature</module>
	</modules>
</project>

todo ...



  • No labels