Do you have any plans to support Jakarta EE10 for elasticsearch-java?
The latest artifact in Maven with GAV 'co.elastic.clients:elasticsearch-java:8.13.4'
shows that has dependency to 'javax.annotation' but jakarta-platform-spec spec states about 'jakarta.annotation:jakarta.annotation-api:2.1.0' or later needed ('jakarta' namespace).
The only annotation used is javax.annotation.Nullable to identify nullable parameters and return values meant to help IDEs and static code checking tools.
Is this causing an issue with Jakarta EE? Have you encountered a problem? If yes, can you describe it?
We try use it as an OSGi bundle into Jakarta EE10 environment hence elasticsearch-java bundle has OSGi Manifest with Import-Package: javax.annotation
dependency that cannot be satisfied into OSGi world as there aren't any bundle export such package into our Jakarta EE10 env. Lately will lead to ClassNotFoundException at runtime.
It's a Jakarta EE issue, it should be jakarta.* as the namespace to replace javax.*. The OSGI bundle manifest is generated by the BND tool.
I can fix the manifest by just make the import optional that will shift the problem to the runtime. Than I can provision the javax.annotation bundle at runtime as by chance it doesn't have any other 'javax' namespace dependencies. That will probably fix my problem but it just seems wrong mixing jakarta.* and javax.* for Jakarta EE.
It's been a while since I last looked at OSGi, but it seems to me that something like adding javax.annotation as a Private-Package in the .bnd file you use to package the Java client could to the trick, by embedding that jar file in the bundle so that you don't have to deploy it in a dedicated bundle?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.