Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicting small rye jandex libraries #1664

Open
pradeepbavirisetty opened this issue Nov 29, 2023 · 7 comments
Open

Conflicting small rye jandex libraries #1664

pradeepbavirisetty opened this issue Nov 29, 2023 · 7 comments
Labels
bug Something isn't working plugin/gradle

Comments

@pradeepbavirisetty
Copy link

Hi Team,

plugins {
id ("io.smallrye.openapi") , version ("3.7.0")
}

dependencies {
implementation "io.smallrye:smallrye-open-api-core:2.1.16" // this must be required for openapi ui build
}

While running the project, I am getting error "org.jboss.jandex.UnsupportedVersion: Can't read index version 11; this IndexReader only supports index versions 2-3,6-10"

In run time i required 2.4.3.Final generated jandex file but in some reason io.smallrye:jandex:3.1.5 generated file is getting added to my jar file under META-INF/jandex.idx. due to this i am getting above error. if i skip generateopenapiSpec task in my build time its working fine.

Thanks,
Pradeep

@pradeepbavirisetty
Copy link
Author

smallrye plugin is adding the jandex file into jar's META-INF folder which creates the issue from my runtime classes. is there a way can we exclude this smallrye plugin jandex files?

@MikeEdgar MikeEdgar added bug Something isn't working plugin/gradle labels Dec 1, 2023
@MikeEdgar
Copy link
Member

Thanks for reporting @pradeepbavirisetty . I'll try to take a look at this soon.

@MikeEdgar
Copy link
Member

@pradeepbavirisetty can you provide a small reproducer project that demonstrates the issue?

@ruchi-rani
Copy link

helidon-quickstart-mp (2).zip

@MikeEdgar
Copy link
Member

@pradeepbavirisetty , running a build with that project results in a Jandex index with format version v6 (compatible with 2.0.x [1]) and the OpenAPI document generates. What steps are you taking to build/run the project?

[1] https://smallrye.io/jandex/jandex/3.1.6/index.html#persistent_index_format_versions

@ruchi-rani
Copy link

@MikeEdgar ,
using id('io.smallrye.openapi') version('3.7.0') for smallrye plugin.
for running the project -> java -jar <jar_name>

@MikeEdgar
Copy link
Member

MikeEdgar commented Dec 22, 2023

@ruchi-rani it seems the sample project is not producing a runnable jar:

$ gradle clean assemble
$ java -jar build/libs/helidon-quickstart-mp-unspecified.jar 
no main manifest attribute, in build/libs/helidon-quickstart-mp-unspecified.jar

What am I missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plugin/gradle
Projects
None yet
Development

No branches or pull requests

3 participants