Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orbit-dev] Ant bundle requires Java version "=1.8" instead of ">=1.8"

I was irritated by "unresolved requirement" errors concerning 1.7 when compiling on Java 9+, while with Java 8 it worked. Then later I had similar problems with a missing capability for Java 11 even though I was compiling on Java 13 or 16. It seems that <executionEnvironment>JavaSE-11</executionEnvironment> in my target-platform-configuration Maven configuration seems to give the system the hint it needs. The upstream project I am trying to compile does not use any toolchain definitions and nobody ever tried to compile it on Java 9+, so I am the first, but not a maintainer and I have never used OSGi before, so I am just a dilettante trying to upgrade something in order to find out it it works better with newer APIs than the previous system. 

Thanks Gunnar and Wim for your help.

Alexander Kriegisch

 

Gunnar Wagenknecht schrieb am 19.04.2021 16:26 (GMT +07:00):

Alexander,
 
You are looking a p2 metadata. p2 is a provisioning technology. It does use OSGi like properties. The =1.8 is fine because at runtime any JDK >= 1.8 *provides* 1.8 implicitly. So the bundle says "I need 1.8" and the runtime says "My JDK is compatible to 1.8".
 
-Gunnar

-- 
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx, http://guw.io/

On Apr 19, 2021, at 08:14, Alexander Kriegisch <alexander@xxxxxxxxxxxxxx> wrote:
Sorry to ask again, but I am new on this ML and not sure if I made a mistake, posting something that was so far ignored. Should I rather contact the Ant bundle maintainer(s) directly in some way? If so, would you mind telling me how? Otherwise, if my message contains insufficient information, would you please guide me towards what the delta is you need to investigate my issue?
--
Alexander Kriegisch


Alexander Kriegisch schrieb am 15.04.2021 15:32 (GMT +07:00):

Disclaimer: I have never used OSGi before and am just trying to find out
why the build of a product I am interested in is not working.

Firstly, I am sorry to cross-post both in the (mostly inactive)
community forum (moderated, not published yet) and here.

The situation is as follows:

 ** I need to upgrade a product using Eclipse OSGi bundles.

 ** One upgraded bundle contains Java 11 class files, i.e. I need to
    build running JDK 11+ for obvious reasons.

 ** Other than the compiler recognising the byte code version, I use
    not Java 9+ features at all, my build target is 1.8.

 ** One indirectly required plugin Tycho pulls is Apache Ant from
    Orbit. The concrete version resolved is 1.10.9.v20201106-1946.

 ** According to [1], the Ant bundle requires an exact match on Java
    version 1.8 according to the 'requiredProperties' tag.

 ** I do not understand this restriction, as Ant itself just requires
    Java 1.8+ to run, I use it in other projects with up to Java 16
    without any issues.

Could someone please fix the bundle descriptor to '>=1.8' instead of
'=1.8'? Otherwise neither I nor anyone else can ever build anything
requiring Ant with Java 9+.

[1]
https://download.eclipse.org/oomph/archive/reports/download.eclipse.org/releases/2021-03/index/org.apache.ant_1.10.9.v20201106-1946.html
_______________________________________________
orbit-dev mailing list
orbit-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/orbit-dev

Back to the top