</pre>Note that this is usually defined in the parent POM in under build / plugins

</pre>Note that this is usually defined in the parent POM in under build / plugins

== Repository providing the context of the build ==

== Repository providing the context of the build ==

−

Specify a repository to get pre-built pieces from. Multiple repository can be specified. See also target platform section.

+

Specify a repository to get pre-built pieces from. Multiple repositories can be specified. See also target file section.

<pre>

<pre>

<repository>

<repository>

Line 20:

Line 33:

</pre>

</pre>

−

== Target platform providing the context of the build ==

+

== Target file providing the context of the build ==

Use a target platform to get pre-build pieces from. The target platform file can be edited using Eclipse PDE editor.

Use a target platform to get pre-build pieces from. The target platform file can be edited using Eclipse PDE editor.

Line 29:

Line 42:

<version>${tycho-version}</version>

<version>${tycho-version}</version>

<configuration>

<configuration>

−

<resolver>p2</resolver>

<target>

<target>

<artifact>

<artifact>

Line 41:

Line 53:

</plugin>

</plugin>

</pre>

</pre>

+

+

== Target runtime environment ==

+

{{Note|This paragraph is a stub - not verified by a Tycho guru}}

+

+

Specify which environments your software should be built for (os/ws/arch). This will determine the set of platform dependent fragments to be included in the project's dependencies. If you omit this the build will say

For convenience, you can do this only once in your parent POM. A source bundle (with ".source" appended to the Bundle-SymbolicName) will be generated for each module inheriting from this parent which has packaging type eclipse-plugin or eclipse-test-plugin.

For convenience, you can do this only once in your parent POM. A source bundle (with ".source" appended to the Bundle-SymbolicName) will be generated for each module inheriting from this parent which has packaging type eclipse-plugin or eclipse-test-plugin.

−

To assemble source bundles, at this point you need to create source feature(s) which include the source bundles same as for normal bundles.

+

You can then reference source bundles as normal bundles in other MANIFEST.MF or feature.xml by referencing with their Bundle-Name: <bundle.name>.source.

+

+

== Source Features ==

+

+

If you have configured source bundle generation (see above), you can also generate source features by using the following configuration snippet:

+

+

<source lang="xml">

+

<plugin>

+

<groupId>org.eclipse.tycho.extras</groupId>

+

<artifactId>tycho-source-feature-plugin</artifactId>

+

<version>${tychoExtrasVersion}</version>

+

<executions>

+

<execution>

+

<id>source-feature</id>

+

<phase>package</phase>

+

<goals>

+

<goal>source-feature</goal>

+

</goals>

+

</execution>

+

</executions>

+

</plugin>

+

<plugin>

+

<groupId>org.eclipse.tycho</groupId>

+

<artifactId>tycho-p2-plugin</artifactId>

+

<version>${tycho-version}</version>

+

<executions>

+

<execution>

+

<id>attach-p2-metadata</id>

+

<phase>package</phase>

+

<goals>

+

<goal>p2-metadata</goal>

+

</goals>

+

</execution>

+

</executions>

+

</plugin>

+

</source>

+

+

The generated source feature will have the feature id <tt>&lt;featureId&gt;.source</tt>.

+

Feature label (with a configurable suffix), description, branding plugin and other attributes are taken over from the original feature by default.

+

If required, you can override individual source feature values by adding a <tt>sourceTemplateFeature/feature.properties</tt> file.

+

See [https://bugs.eclipse.org/bugs/show_bug.cgi?id=398250 bug 398250] on why the p2-metadata goal is required for now.

This will scan the filesystem starting from the current directory for bundles (i.e. MANIFEST.MF files) and features (feature.xml files) and generate the corresponding pom.xml files. It assumes test bundles have a suffix ".tests". You can change this default by specifying <tt>-DtestSuffix=.mytestBundleSuffix</tt>

+

+

Note that the generated pom.xml files are intended to give you a quickstart template only. You will most probably have to refine the generated files e.g. fill in repositories in the generated parent pom from which to resolve depndencies.

Target runtime environment

This paragraph is a stub - not verified by a Tycho guru

Specify which environments your software should be built for (os/ws/arch). This will determine the set of platform dependent fragments to be included in the project's dependencies. If you omit this the build will say

For convenience, you can do this only once in your parent POM. A source bundle (with ".source" appended to the Bundle-SymbolicName) will be generated for each module inheriting from this parent which has packaging type eclipse-plugin or eclipse-test-plugin.

You can then reference source bundles as normal bundles in other MANIFEST.MF or feature.xml by referencing with their Bundle-Name: <bundle.name>.source.

Source Features

If you have configured source bundle generation (see above), you can also generate source features by using the following configuration snippet:

The generated source feature will have the feature id <featureId>.source.
Feature label (with a configurable suffix), description, branding plugin and other attributes are taken over from the original feature by default.
If required, you can override individual source feature values by adding a sourceTemplateFeature/feature.properties file.
See bug 398250 on why the p2-metadata goal is required for now.

Generating POM files

If you have an existing build which you want to migrate to tycho, you can generate templates of the required pom.xml files using

This will scan the filesystem starting from the current directory for bundles (i.e. MANIFEST.MF files) and features (feature.xml files) and generate the corresponding pom.xml files. It assumes test bundles have a suffix ".tests". You can change this default by specifying -DtestSuffix=.mytestBundleSuffix

Note that the generated pom.xml files are intended to give you a quickstart template only. You will most probably have to refine the generated files e.g. fill in repositories in the generated parent pom from which to resolve depndencies.