Quantcast
Channel: tycho-user
Viewing all articles
Browse latest Browse all 4647

Re: [tycho-user] build products with optionally included features

$
0
0
I'm just guessing here, but shouldn't you mark BOTH features and plugins as optional? The Missing Constraint message implies that your plugins are not optional. I mean, I would expect it to look like this instead:
Require-Bundle: foo.bar.baz1;bundle-version="0.0.0";resolution:="optional".

Kind regards,
Mikhail Kalkov

Eclipse Developer | Purple Scout AB |Âwww.purplescout.com
Kyrkogatan 20-22, SE-41110 Gothenburg, Sweden


On Wed, Jun 18, 2014 at 3:07 PM, Moritz Eysholdt <moritz.eysholdt@xxxxxxxxx> wrote:
hi,

in second try I tried to filter out only the optional feature but not the optional plugin. The build doesnât fail but the optional feature (even though it was filtered!) was bundled into the product :(

Iâve created a ticket:

regards,
 Moritz

On 18 Jun 2014, at 14:48, Moritz Eysholdt <moritz.eysholdt@xxxxxxxxx> wrote:

Hi Neil,

thank you for your response.Â

I proposed a similar question a month or two back. The optional feature does not work like you would hope. I think that is meant more for plugins.


:(

I ended up making two different products because my use case changed, but you can filter out your feature from the target platform when building the product. You can do this by profile and achieve what you need.

Iâve tried the filtering approach as it is described here:Â

But then Iâm getting the exception stated below. Maybe thatâs because Iâm building the artifacts and filtering them out in the same reactor.Â

org.apache.maven.InternalErrorException: Internal error:Âjava.lang.RuntimeException:Âorg.osgi.framework.BundleException: Bundle my.optional.plugin cannot beÂresolved
Resolution errors:
 ÂBundle my.optional.plugin - Missing Constraint: Require-Bundle: foo.bar.baz1; bundle-version="0.0.0"
 ÂBundleÂmy.optional.pluginÂ- Missing Constraint: Require-Bundle:Âfoo.bar.baz2; bundle-version="0.0.0"
 ÂBundleÂmy.optional.pluginÂ- Missing Constraint: Require-Bundle:Âfoo.bar.baz3; bundle-version="1.0.0"

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

regards,
 Moritz

Neil

On Jun 17, 2014 10:02 AM, "Moritz Eysholdt" <moritz.eysholdt@xxxxxxxxx> wrote:
Hi,

Iâm building an eclipse product and based on the selected maven profile, a certain eclipse feature should be included into the product or not.

I have two feature.xml, lets call them master-feature.xml and optional-feature.xml

master-feature.xml includes optional-feature.xml viaÂ

<includes
    Âid=âoptional.feature"
    Âversion="0.0.0"
    Âoptional="true"/>

The master-feature.xml is always included in the product.

If I build the product with with optional-feature.xml included, all goes well.

If I try to build build the product with optional-feature.xml excluded, I get the error message below:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.20.0:package-feature (default-package-feature) on project master.feature: Execution default-package-feature of goal org.eclipse.tycho:tycho-packaging-plugin:0.20.0:package-feature failed: Could not resolve feature optional.feature_0.0.0; Path to dependency: -> [Help 1]

The optional-feature is indeed not there because Iâm using a maven profile to not include its pom.xml build it when itâs not required.Â

However, since the feature-inclusion happens via optional=âtrueâ, Iâd expect tycho not to complain about it. Is this a bug? Is there another way to build different variants of the same product?

regards,
 Moritz

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user

_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Viewing all articles
Browse latest Browse all 4647

Trending Articles