Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Optional plugins in feature


I am trying to optionally include a plugin in my feature, based on a Maven profile. I can't seem to get it to work.

Here's what I tried: inside my feature project, I added a resources directory with two versions:


I need to have a feature.xml, otherwise Tycho will complain. In the 'initialize' phase of the feature project, I copy the correct feature file and overwrite `feature.xml`. This works fine, but the build fails with:

package-feature failed: Could not resolve plugin org.scala-lang.modules.scala-xml_0.0.0; Path to dependency: -> [Help 1]

This is one of the optional plugins, so:

1. copy worked
2. it is being considered for inclusion
3. .. but Tycho still can't find it. 

The required bundle (it's a pom-first) appears in my dependencies. If I run it a second time (this time `feature.xml` is already in place, with the additional plugin entries), the build succeeds. It looks like Tycho looks at features.xml very early on, and ignores plugins that are not specified in there?

Is there a way to make this work? Alternatives? I'd like to have a single build step (I know I could do the copy in a maven run).

It looks like Eclipse specific files (MANIFEST, features.xml, etc.) can't be configured the "maven" way, since they are considered so early in the lifecycle. Is there a better "Tycho way"?


« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

Back to the top