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

the p2 product publisher hardcodes a dependency to bogus IU a.jre.javase
[1.6.0]

https://bugs.eclipse.org/bugs/show_bug.cgi?id=387701


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
  
https://wiki.eclipse.org/Tycho/Execution_Environments#Execution_environment
_configuration 


Regards
Jan


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>
wrote:

>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>
>
><build>
>            <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 
>C:\WS\trunk\trunkEclipse\systests\plugins\com.sample.systests\target\work
>Installing com.sample.systests 1.0.0.201508110757.
>Installing org.eclipse.tycho.surefire.osgibooter 0.23.1.
>Installing org.eclipse.tycho.surefire.junit4 0.23.1.
>Installing MyProduct 1.0.0.201508110757.
>Installation failed.
>Cannot complete the install because one or more required items could not
>be found.
> Software being installed: MyProductProduct 1.0.0.201508110757 (MyProduct
>1.0.0.201508110757)
> Missing requirement: MyProductProduct 1.0.0.201508110757 (MyProduct
>1.0.0.201508110757) requires 'a.jre.javase [1.6.0]' but it could not be
>found
>
>
>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?
>
>
>Regards
>
>Robert Kiss
>
>
>
>
>
>
>



Back to the top