Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Cannot use JavaSE1.8 from test plugin

Thank you Jan for your hint.

I manage to make it work with a quite strange setup. For reference here is what I did:

Inside my test plugin I have:
 - .classpath uses JavaSE-1.8 so from IDE I'm able to write and compile Java 8 code
 - MANIFEST.MF specify as BREE JavaSE-1.6 so Tycho will allow to install the plugin in a 1.6 compliant environment. Because this is a test plugin and we don't deliver this plugin this setting, albeit wrong, is acceptable for us.

Tycho compiler is configured with <useProjectSettings>true</useProjectSettings>. I assume if that would be false I would need also an jre.compilation.profile="" inside the of my plugin.

Inside the pom.xml we configure target-platform-configuration with <executionEnvironment>JavaSE-1.6</executionEnvironment>. Of course Tycho is executed with JavaSE-1.8


On Tue, Aug 11, 2015 at 11:55 AM, Sievers, Jan <jan.sievers@xxxxxxx> wrote:
the p2 product publisher hardcodes a dependency to bogus IU a.jre.javase

To make it happy, you could try

- using JavaSE-1.6 as BREE in the test bundle (as you mentioned)
- overriding the execution environment of the test bundle using one of the
methods in


On 11/08/15 10:24, "tycho-user-bounces@xxxxxxxxxxx on behalf of Robert
Kiss" <tycho-user-bounces@xxxxxxxxxxx on behalf of robert.kiss@xxxxxxxxx>

>Hello all
>I have a test plugin which contain "UI system tests" so as a result it
>requires the entire product to run the tests.
>The pom.xml have the following content (partially)
>    <groupId>com.sample</groupId>
>    <artifactId>com.sample.systests</artifactId>
>    <packaging>eclipse-test-plugin</packaging>
>            <plugin>
>                <groupId>org.eclipse.tycho</groupId>
>                <artifactId>target-platform-configuration</artifactId>
>                <version>${tycho.version}</version>
>                <configuration>
>                    <dependency-resolution>
>                        <extraRequirements>
>                            <!-- add dependency to product IU under test
>                            <requirement>
>                                <type>p2-installable-unit</type>
>                                <id>MyProduct</id>
>                                <versionRange>0.0.0</versionRange>
>                            </requirement>
>                        </extraRequirements>
>                    </dependency-resolution>
>                </configuration>
>            </plugin>
>        </plugins>
>    </build>
>Tests run as expected when JavaSE1.6 is referenced from plugin's
>MANIFEST.MF and .classpath however when JavaSE 1.7 or 1.8 is used the
>build fails with the following message:
>[INFO] Installing IUs [com.movidius.systests,
>org.eclipse.tycho.surefire.osgibooter, org.eclipse.tycho.surefire.junit4,
>MyProduct] to
>Installing com.sample.systests
>Installing org.eclipse.tycho.surefire.osgibooter 0.23.1.
>Installing org.eclipse.tycho.surefire.junit4 0.23.1.
>Installing MyProduct
>Installation failed.
>Cannot complete the install because one or more required items could not
>be found.
> Software being installed: MyProductProduct (MyProduct
> Missing requirement: MyProductProduct (MyProduct
> requires 'a.jre.javase [1.6.0]' but it could not be
>I have other test plugins which does not use
><type>p2-installable-unit</type> and are marked with JavaSE1.8 and they
>run correctly.
>My product definition have the following content:
>      <feature id="org.eclipse.rcp"/>
>      <feature id="org.eclipse.rcp.configuration"/>
>      <feature id="org.eclipse.platform"/>
>      <feature id="org.eclipse.equinox.p2.user.ui"/>
>I suspect a bug in Tycho but maybe not...
>Any advice?
>Robert Kiss

tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top