2012/10/28 Владимир Большуткин <enargit@xxxxxxxxx>
Hello,
I use Tycho in my open-source project Octclipse. I encountered a situation that I cannot process with Tycho.
The project needs some native code built for the specific OS/arch and for the specific Octave version. I decided to have separate features for each Octave version and separate fragments for each supported OS/arch combination. Each fragment
requires specific native libraries (built by Maven NAR plugin on separate virtual machines). This approach works well when I have ALL native libraries built and stored in some Maven repository and want to build the whole release package with everything inside.
But if I change something in native code and want to test this change, I cannot build the product with only one feature (for the current development environment: current Octave version and OS/arch).
For instance, I have compiled native code for Octave 3.6.0 and want to build a product with the corresponding to test if it works. I tried exclude unnecesary modules using Maven profiles
<module>net.sf.octclipse.octave_3_6_0</module>
<module>net.sf.octclipse.octave_3_4_3</module>
and setting features optional in the parent feature
net.sf.octclipse.platform.feature/feature.xml:
<includes id="net.sf.octclipse.octave_3_6_0.feature" optional="true" version="0.0.0"/>
<includes id="net.sf.octclipse.octave_3_4_3.feature" optional="true" version="0.0.0"/>
In this case build process passes first dependency resolution but fails on module net.sf.octclipse.platform.feature with message:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.17.0-SNAPSHOT:package-feature (default-package-feature) on project net.sf.octclipse.platform.feature: Execution default-package-feature of goal org.eclipse.tycho:tycho-packaging-plugin:0.17.0-SNAPSHOT:package-feature
failed: Could not resolve feature net.sf.octclipse.octave_3_4_3.feature_0.0.0; Path to dependency: -> [Help 1]
Is this an expected behavior or a bug?
If it is correct, is there a way to perform build-time selection of features to be included in a product?