Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] Building with Tycho against Platform M5 products requires some effort

Hi all,

> As you may have seen on some other thread, build with latest release of
> Tycho with Platform M5 product (sdk, ide...) in target-platform can
> result in the following error:
> [ERROR] Cannot resolve target definition:
> [ERROR]   Software being installed: org.eclipse.platform.ide
> 4.8.0.I20180122-2000
> [ERROR]   Missing requirement: org.eclipse.platform.ide
> 4.8.0.I20180122-2000 requires 'config.a.jre.javase [9.0.0]' but it could
> not be found
> This would only affect you if you use the Platform *products* in your
> target-platform. It won't affect your build if it only references
> features or bundles directly, which are not the same way by the recent
> changes.

well, that's not entirely true. We don't reference platform products in
our build but use the target-platform-validation-plugin [1], whose
validate-target-platform goal apparently also stumbles over the missing

> [INFO] --- target-platform-validation-plugin:1.0.0:validate-target-platform (validate-target-platform) @ photon ---
> [INFO] Validating /Users/sewe/Documents/oomph/org.eclipse.recommenders/git/org.eclipse.recommenders/targets/photon/
> [INFO] Fetching p2.index from
> [INFO] Adding repository
> [INFO] Adding repository
> [INFO] Fetching p2.index from
> [INFO] Fetching p2.index from
> [INFO] Adding repository
> [INFO] Fetching p2.index from
> [INFO] Fetching p2.index from
> [ERROR] Cannot resolve target definition:
> [ERROR]   Problems resolving provisioning plan.:
> [ERROR]      Unable to satisfy dependency from org.eclipse.sdk.ide 4.8.0.I20180124-2000 to config.a.jre.javase [9.0.0].
> [ERROR]      Unable to satisfy dependency from org.eclipse.sdk.ide 4.8.0.I20180124-2000 to a.jre.javase [9.0.0].
> [ERROR] 
> [INFO] Failed, see Error log below
> [ERROR] Validation found errors in 1 .target files:
> Could not resolve content of

Alas, I couldn't get the workaround to work:

> So if you see this error, it requires some action:

> * you can use a workaround to explicitly add the (config.)a.jre.javase
> [9.0.0] units in your target platform. You can simply add these units in
> you .target file from the p2 repo of Eclipse Platform,

This is my .target file:

> <location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
> <unit id="" version="0.0.0"/>
> <unit id="" version="0.0.0"/>
> <unit id="" version="0.0.0"/>
> <unit id="org.eclipse.sdk.ide" version="0.0.0"/>
> <unit id="config.a.jre.javase" version="9.0.0"/>
> <unit id="a.jre.javase" version="9.0.0"/>
> <repository location=""/>
> </location>

What did work for me, however, is *not* changing the .target file but
adding an <executionEnvironment> of JavaSE-9 to the
target-platform-validation-plugin's <configuration> [2]. Unfortunately,
that option is not documented at all, so I am a little bit mystified why
this works.

Maybe some can enlighten me?

Best wishes,



Codetrails GmbH
The best code possible

Robert-Bosch-Str. 7, 64293 Darmstadt
Phone: +49-6151-276-7092
Mobile: +49-170-811-3791

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940

Attachment: signature.asc
Description: OpenPGP digital signature

Back to the top