Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] Is it possible to declare that a feature depends on a particular Java execution environment?

Hi P2 Developers,

I have a plug-in (build using Tycho) whose Bundle-RequiredExecutionEnvironment needs to be bumped from JavaSE-11 to (finally!) JavaSE-17. Alas, I am struggling a bit with the update's UX:

Someone still running the Eclipse platform on Java 11, can happily performs an (auto)-update of the feature, only to see the feature's bundles failing to resolve. And this just means that all UI contributions are missing, with no indication why.

How can I get p2 to provide a reasonable error message already during *installation*, along the lines of "Missing requirement to execution environmnt: JavaSE-17" or so.

So far, I've tried the following in my feature.xml, using the magic "a.jre.javase" IU (not sure whether this is a p2 or Tycho concept, BTW):

<requires>
   <import plugin="a.jre.javase" version="17" match="greaterOrEqual"/>
</requires>

But that doesn't help, alas, as my Tycho-generated update site offers, among other things, also a.jre.javase IUs. Hence, I assume these IUs are really not meant to represent an actual installed execution environment -- which you certainly cannot get from my update site -- but something subtly different.

Is what I am after possible at all (similar to limiting a feature's supported operating systems or architectures)? Perhaps with a magic p2.inf incantation?

Any help would be greatly appreciated.

Best wishes,

Andreas

--
Dr. Andreas Sewe (he/him) | sewe@xxxxxxx | +49 152 56342856
CQSE GmbH | Centa-Hafenbraedl-Strasse 59 | 81249 Muenchen | www.cqse.eu
Amtsgericht Muenchen | HRB 177678 | GF: F. Deissenboeck, M. Feilkas | cqse.eu/privacy



Back to the top