Do not use cached URLs for locating the Jandex indexes #1590
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #1578.
The Jandex indexes have always been located using the classpath but that happened early at what turns out to be native image build time. The resulting index URLs were cached and then used later to actually read the indexes -- at native image runtime, by which time the cached
file:
URLs were useless.In this PR the code still keeps the count of the index URLs because that is used from several places in the code to make decisions based on whether any indexes were present, but the native image runtime code now invokes the method that uses
getResources
rather than using the cached URLs as it used to.There was also a typo in the pom that crept in somehow which prevented the second test Jandex index from being built. I fixed that also in this PR.