last week, I've released Jandex 3.0.0-RC1, and yesterday, I've released
Jandex 2.4.3.Final. (A corresponding release of the Jandex Maven plugin is
on its way to Central as we speak.)
There's a few breaking changes in Jandex 3.0 and the 2.4.3 release is
supposed to make migration easier (or at least require less coordination).
Specifically, Jandex 2.4.3 deprecates these 2 methods because they have a
different return type in 3.0:
Replacements are, respectively:
These 2 replacement methods are present both in Jandex 2.4.3 and
Additionally, certain usages of MethodInfo.parameters() can be simplified
using MethodInfo.parametersCount() and parameterType(int). These 2 methods
are also present both in 2.4.3 and 3.0.0[-RC1].
Updating to Jandex 2.4.3 is safe, because it's fully compatible with
previous releases. A project that uses Jandex 2.4.3 and avoids deprecated
methods is almost fully _binary_ compatible with Jandex 3.0 (almost because
of the return type change in Indexer.index(), but that should only affect a
very small number of existing code paths).
I went through the projects that I know use Jandex and made the necessary
changes myself and will submit PRs in the coming days. These projects are:
- Quarkus, including ArC and RESTEasy Reactive
- SmallRye OpenAPI
- SmallRye Async API -- no changes required
- SmallRye GraphQL
- WildFly Core -- no changes required, just updating Jandex
- WildFly Full
- RESTEasy (classic) -- no changes required
If you maintain (or know about) some other project that uses Jandex, feel
free to ping me, I'll be happy to help.
Note that there are more changes in Jandex 3.0. All the details can be
found in the issue tracker: https://github.com/smallrye/jandex/milestone/3
For your convenience, here's a summary of what's coming in Jandex 3.0 and
is technically a breaking change, even though most of them won't likely
- moved Jandex to SmallRye
- bumped minimum Java version to 8
- regularized access to annotations from AnnotationTarget
- this is why ClassInfo.annotations() needs to change the return type
- there are methods to access annotations without considering nested
annotation targets, too!
- regularized access to method parameters from MethodInfo
- this is why MethodInfo.parameters() needs to change the return type
- common parameter-accessing methods on MethodInfo ignore
- special methods exist to access all parameters, including
- added a new kind of types, TypeVariableReference, to faithfully represent
recursive type variables
- changed Indexer.index() to return void (instead of ClassInfo)
- required to be able to post-process an index during Indexer.complete()
- added indexing of class-retained annotations
- Jandex 2 only indexes runtime-retained annotations
- AnnotationInstance.runtimeVisible() can be used to distinguish
- added a few methods to IndexView
- navigation for interfaces: getKnownDirectSubinterfaces(),
- navigation for packages: getClassesInPackage(), getSubpackages()
- breaks projects that implement this interface on their own (which I
know at least WildFly and Quarkus do)
- removed IndexReader.getDataVersion()
- it's been incorrect anyway, and I couldn't find anyone using it
When Jandex 3.0 goes final, which I hope happens in a few weeks, I will
publish an announcement with all details on the SmallRye blog. In the
meantime, I'll use the previously mentioned projects (and their test
suites) to verify that Jandex 3.0 doesn't contain any hidden surprises.
Any questions? Ideas? My inbox and the Jandex issue tracker are always open
At the moment we are working on a branch called big-bang to refactor the
various testsuites in WildFly to use Jakarta EE 10.
For the next couple of weeks please be careful picking up tasks to develop
these testsuited further, obviously if changes are needed they are needed
but all changes in this area risk merge conflicts with big-bang so unless
the changes are urgent they may be better to hold off or if the testsuite
has already been migrated submitted straight to big-bang directly.
Red Hat <https://www.redhat.com/>
As a follow-up on , I wanted to let you know that we set up a new
test suite for the management console: 'hal/manatoko' .
The motivation for the new test suite was to address some weak points
with the existing test suite 'hal/testsuite.next' :
- Still on Arquillian 1.6, JUnit 4
- Weak SoC (separation of concerns)
- Hard to run in a CI environment
The new test suite was developed with the idea that each test should be
self-contained. This is possible by leveraging the Testcontainers 
framework. WildFly, the management console, and browsers run in containers,
and the unit tests can focus on testing the UI and verifying the modifications
in the management model.
This approach makes running the test suite in CI environments very easy.
We already do this using GitHub actions .
Currently, the new test suite doesn't contain all tests from the existing
test suite. But we already migrated 27 of 34 test modules. The migration
requires effort, but the new unit tests can re-use classes from the existing
test suite, such as Arquillian pages and constants from the HAL code base.
In the next month, I'd like to migrate the remaining tests from
'hal/testsuite.next' to 'hal/manatoko'.
If you want to learn more, browse the README.md . If you have any questions
or any ideas or want to get involved, leave a comment or reach out to me.