Can I get Helidon 2.x to use the latest Jandex versions

104 Views Asked by At

From

I am trying to clean up a messy Gradle-based monorepo while upgrading from Java 8 to Java 11/17. I am not a Jandex or Helidon expert, but I am slowly getting more expert with Gradle. I am wondering if Bazel would be a better solution. , but I digress...

Along the way, many things broke, and my general approach has been upgrading version of tools that hopefully work better with Java 11. However, this is not always an effective strategy.

We use Helidon 2.x for several projects, but I have run into trouble with Jandex, and I really don't understand Jandex as the documentation is weak on context. ChatGPT gave me a better explanation of Jandex than the Jandex documentation, but I can only go so far.

I tried upgrading to Helidon 3.x, but too many things broke. It appears that Jandex wants org.jboss:jandex:2.3.1.Final (c), but I am wondering if there is any way to make it work with io.smallrye:jandex:3.0.5 or io.jboss:jandex:3.0.5 just so I can have the latest version of things? Right now, I am trying to figure out the best version of the Gradle Jandex Pluging to use, as 1.1.0 does not seem to work.

I tried to force this with https://docs.gradle.org/current/userguide/dependency_constraints.html but could not get it working.

The people on the https://github.com/smallrye/jandex issues have been enormously helpful and prompt, but have suggested this is a better forum for getting help with my issues.

Finally, can anyone point me to some more comprehensive documentation on Jandex and how it works?

1

There are 1 best solutions below

2
On

To answer the question as asked:

No, you cannot get Helidon 2.x to use Jandex 3.x. Among other things, this is because (as previously explained) the version of SmallRye's OpenAPI project (which is actually the thing that uses Jandex, so Helidon is basically irrelevant here) that is used by Helidon 2.x requires the API published by Jandex 2.x.

To answer a rephrasing of the question:

"Can I get SmallRye's OpenAPI project version 2.0.26, whether it is used by Helidon or not, to use Jandex 3.x?"

No, you cannot get SmallRye's OpenAPI project version 2.0.26 to use Jandex 3.x. Among other things, this is because (as previously explained) the API exposed by Jandex 2.x is different from the API exposed by Jandex 3.x (which is almost certainly why the major version number increased).