The update site created in Chapter 10, Adding an Update Site, is used to provide a standard hosting mechanism for Eclipse plug-ins and features. This can be built automatically with Tycho as well.
com.packtpub.e4.update
project underneath the com.packtpub.e4.parent
project.<module>com.packtpub.e4.update</module>
to the parent pom.xml
file.pom.xml
file from the clock plug-in to the update project.<packaging>eclipse-repository</packaging>
.artifactId
to com.packtpub.e4.update
.pom.xml
file will look like:<?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> <parent> <groupId>com.packtpub.e4</groupId> <artifactId>com.packtpub.e4.parent</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> <artifactId>com.packtpub.e4.update</artifactId> <packaging>eclipse-repository</packaging> </project>
site.xml
file to category.xml
.category.xml
file does not contain a url
attribute and the version
attribute is 0.0.0
, as otherwise an Unable to satisfy dependencies error may be seen:<feature id="com.packtpub.e4.feature" version="0.0.0">
mvn package
from the parent project, and it should now build the update site as well:[INFO] Reactor Summary: [INFO] [INFO] com.packtpub.e4.parent .................. SUCCESS [0.048s] [INFO] com.packtpub.e4.clock.ui ................ SUCCESS [1.416s] [INFO] com.packtpub.e4.feature ................. SUCCESS [0.074s] [INFO] com.packtpub.e4.update .................. SUCCESS [2.727s] [INFO] [INFO] BUILD SUCCESS
file:///path/to/com.packtpub.e4.parent/com.packtpub.e4.update/target/repository
into the work with field, and installing the feature shown there. If it is not shown, uncheck the Group items by category checkbox.Creating an update site is no different from creating a plug-in or feature project. There is a pom.xml
file that defines the name of the update site itself, and it uses or detects the file called category.xml
to generate the update site.
The category.xml
file is functionally equivalent to the site.xml
file created previously, and is a name change introduced by P2 long ago. However, the update site project still generates it using the old name, so it is necessary to rename it from site.xml
to category.xml
in order to be built with Tycho.
As with the Eclipse update project, when the update site is built, the versions of the features and plug-ins in the category.xml
are replaced with the versions of the features and plug-ins just built.
3.19.29.89