smallrye / jandex

Java Annotation Indexer
Apache License 2.0
400 stars 94 forks source link

Can't read Jandex index #439

Closed zaahirlaher closed 2 months ago

zaahirlaher commented 2 months ago

Hi,

We have a Quarkus maven project that has a new dependency which uses io.smallrye:jandex-maven-plugin:jar:3.2.0. This results in a runtime error Can't read Jandex index from /META-INF/jandex.idx: Can't read index version 12; this IndexReader only supports index versions 2-3,6-11.

Other dependencies use older versions of of the plugin.

I've updated the version of in my project to 3.2.2, since the documentation state the versions are backward compatible. But I still get the error. I've also noticed that when running mvn dependency:tree , the jandex version is 3.1.6 which is mean is can only read version 11 of the index?

`[INFO] - io.smallrye:jandex-maven-plugin:jar:3.2.1:compile

[INFO] +- org.codehaus.plexus:plexus-utils:jar:3.5.1:compile [INFO] - io.smallrye:jandex:jar:3.1.6:compile`

Ladicek commented 2 months ago

You need to use the Jandex version that your Quarkus version (or one that is compatible with that per https://smallrye.io/jandex/jandex/3.2.2/index.html#persistent_index_format_versions).

Since Quarkus was updated to Jandex 3.2.0 in 3.12, it seems you're using an older Quarkus than that -- in which case, you need to use Jandex 3.1.