Packaging Types
Tycho defines the following custom Maven packaging types targeted for Eclipse Plug-in development.
eclipse-plugin
corresponds to Eclipse Plug-in and Plug-in Fragment projects.eclipse-test-plugin
is similar toeclipse-plugin
but only contains Plugin Tests to be executed inside an OSGi runtime. There is a noticable difference betweeneclipse-plugin
andeclipse-test-plugin
with respect to the goal executed duringintegration-test
. The former usestycho-surefire-plugin:integration-test
while the latter usestycho-surefire-plugin:test
.eclipse-feature
corresponds to Eclipse Feature projectseclipse-repository
corresponds to projects containing acategory.xml
file, the support of [Eclipse Update Site projects]https://github.com/eclipse-pde/eclipse.pde/blob/master/docs/User_Guide.md#Update-Site) has been removed in latest Tycho versionseclipse-target-definition
corresponds to Eclipse Target Platformp2-installable-unit
corresponds to Installable Units
The lifecycle bindings (i.e. which Maven plugins are executed in which Maven phase by default) are defined by tycho-maven-plugin
in a Maven extension therefore it needs to be loaded accordingly:
<plugin>
<groupId>org.apache.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${project.version}</version>
<extensions>true</extensions>
</plugin>
All bindings are defined in https://github.com/eclipse-tycho/tycho/blob/master/tycho-maven-plugin/src/main/resources/META-INF/plexus/components.xml.
Only the default
lifecycle has custom bindings, i.e. the clean
and site
lifecycles behave as for every other packaging.
The according artifact handlers (i.e. the mapping from the packaging type to a specific extension) are provided by p2-maven-plugin
in https://github.com/eclipse-tycho/tycho/tree/master/p2-maven-plugin/src/main/java/org/eclipse/tycho/p2maven/repository. When referencing one of the packaging types as Maven dependency it needs to be loaded with extensions as well:
<plugin>
<groupId>org.apache.tycho</groupId>
<artifactId>p2-maven-plugin</artifactId>
<version>${project.version}</version>
<extensions>true</extensions>
</plugin>