There are two reasons why the feature is included in the product despite the optionalDependencies=ignore
1.
optionalDependencies=ignore only applies to the direct dependencies of the module’s artifact, i.e. the dependency from the product to feature A, but
not the dependency from feature A to feature X.
2.
optionalDependencies=ignore is AFAIK not implemented for eclipse-feature modules. But even if it was, it wouldn’t help you due to point 1
Instead, you can archive what you want by excluding feature X from the target platform of your eclipse-repository module. There is a stackoverflow question
covering this case:
http://stackoverflow.com/questions/12372269/eclipse-rcp-built-by-tycho-includes-unwanted-optional-dependencies
Regards
Tobias
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx]
On Behalf Of Neil Corbet
Sent: Donnerstag, 24. April 2014 19:33
To: Tycho user list
Subject: Re: [tycho-user] Filtering out optional features
Just giving this a slight bump, has no one had a use case for optionally including features in a product build...possibly based on a profile.
Would it be normal to just have different products with different feature sets?
Neil
On Apr 22, 2014 11:01 AM, "Neil Corbet" <neil.corbet@xxxxxxxxx> wrote:
I have a product that is based on Feature A. Inside Feature A is FeatureX. Feature X is listed as optional.
I have included in the pom of FeatureA:
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<dependency-resolution>
<optionalDependencies>ignore</optionalDependencies>
</dependency-resolution>
</configuration>
</plugin>
</plugins>
But, FeatureX is still included in the final product. Is there a way to include/exclude optional features or does this only work on the plugin level.
Thanks,
Neil