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

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

Line 276:

Line 276:

== Source Features ==

== Source Features ==

−

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

+

If you have configured source bundle generation (see above), you can also generate source features by using the following configuration snippet within the feature lifecycle (as part of the feature project configuration or inheriting from parents):

<source lang="xml">

<source lang="xml">

−

<plugin>

+

<build>

−

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

+

<plugins>

−

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

+

<plugin>

−

<version>${tychoExtrasVersion}</version>

+

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

−

<executions>

+

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

−

<execution>

+

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

−

<id>source-feature</id>

+

<executions>

−

<phase>package</phase>

+

<execution>

−

<goals>

+

<id>source-feature</id>

−

<goal>source-feature</goal>

+

<phase>package</phase>

−

</goals>

+

<goals>

−

</execution>

+

<goal>source-feature</goal>

−

</executions>

+

</goals>

−

</plugin>

+

</execution>

−

<plugin>

+

</executions>

−

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

+

</plugin>

−

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

+

<plugin>

−

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

+

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

−

<executions>

+

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

−

<execution>

+

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

−

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

+

<executions>

−

<phase>package</phase>

+

<execution>

−

<goals>

+

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

−

<goal>p2-metadata</goal>

+

<phase>package</phase>

−

</goals>

+

<goals>

−

</execution>

+

<goal>p2-metadata</goal>

−

</executions>

+

</goals>

−

</plugin>

+

</execution>

+

</executions>

+

</plugin>

+

</plugins>

+

</build>

</source>

</source>

Line 324:

Line 328:

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.

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.

−

To address e.g. version 0.15.0-SNAPSHOT of tycho:

+

Due to [https://bugs.eclipse.org/bugs/show_bug.cgi?id=409871 bug 409871] the filesystem scan depth is limited one level currently. If you have deeply nested plugin or feature projects, you may have to run the generator separately in each of the direct parent directories.

Target runtime environment

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 within the feature lifecycle (as part of the feature project configuration or inheriting from parents):

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.

Due to bug 409871 the filesystem scan depth is limited one level currently. If you have deeply nested plugin or feature projects, you may have to run the generator separately in each of the direct parent directories.