Skip to main content

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

Hi,

Things are supposed to work as you expect and installing an IU with req 17 on a profile that runs on req 11 should fail in the UI.

> But that doesn't help, alas, as my Tycho-generated update site offers, among other things, also a.jre.javase IUs.

Those a.jre.javase units are supposed to be ignored when installing from UI (unless the corresponding preference is disabled), please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=483383 and https://github.com/eclipse-equinox/p2/commit/535cf0ec5a3b6275050e601883bd3db140bf0b97 .

Cheers,
Mickael


On Thu, Nov 6, 2025 at 8:10 PM Andreas Sewe via p2-dev <p2-dev@xxxxxxxxxxx> wrote:
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

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/p2-dev



--
Mickael Istria
Eclipse IDE developer, for Red Hat

Back to the top