>Product Builds with Tycho 0.10.0-SNAPSHOT

>One of the biggest pain points I have always had with eclipse, has been product builds. For one reason or another it was never just as simple as setting up the product file, and then submitting the job. Those days are gone, for those using Tycho and Maven 3.

Tycho-188 has been the tracking bug for some work to make product builds actually work. As simple as creating your product file and features. It introduces a new type:
  • eclipse-repository

This is not only for products but will eventually replace the eclipse-update-site type currently supported by tycho 0.9.0.

Setting up the pom:


<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>com.example.workbench</artifactId>
<packaging>eclipse-repository</packaging>
<version>2.2.0-SNAPSHOT</version>
<name>Example IDE build with Maven/Tycho </name>

<parent>
<groupId>com.example</groupId>
<artifactId>com.example-parent</artifactId>
<version>2.2.0-SNAPSHOT</version>
</parent>

<build>
<plugins>
<plugin>
<groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-p2-director-plugin</artifactId>
<version>${tycho-version}</version>
<executions>
<execution>
<id>materialize-products</id>
<goals>
<goal>materialize-products</goal>
</goals>
</execution>
<execution>
<id>archive-products</id>
<goals>
<goal>archive-products</goal>
</goals>
</execution>
</executions>
<configuration>
<products>
<product>
<id>productId</id>
</product>
</products>
</configuration>
</plugin>
</plugins>
</build>

</project>

That is it. When run with Tycho 0.10.0 this will read the product file with the specified id, and generate your product. You can further configure it to generate for specific target platform environments as well.

Advertisements
This entry was posted in build, eclipse, osgi, release engineering. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s