Skip to content

Generate an update site

Emmanuel Chebbi edited this page Jul 7, 2018 · 2 revisions

Define the update site

Through p2 update sites, you can provide your users an easy way to download your plug-ins. The archetype automatically defines an empty one with:

  • releng/<artifactId>.releng.p2/category.xml.

This file can be modified from Eclipse IDE in order to add new features to the update site.

Update Tycho build

In order to tell Tycho to generate an update site, the releng/<artifactId>.releng.p2/pom.xml file must be modified to specify the right packaging :

<?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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	
	<groupId>fr.kazejiyu.foo</groupId>
	<artifactId>fr.kazejiyu.foo.releng.p2</artifactId>
	<packaging>eclipse-repository</packaging>
    
	<parent>
		<groupId>fr.kazejiyu.foo</groupId>
		<artifactId>fr.kazejiyu.foo.releng</artifactId>
		<version>1.0.0-SNAPSHOT</version>
	</parent>
	
</project>

Note: by default, the line <packaging>eclipse-repository</packaging> is commented because Tycho build fails when it tries to generate an empty update site.

Generate the update site

The command mvn package generates a functional update site in:

  • releng/<artifactId>.releng.p2/target/repository