OpenLiberty / OpenLiberty/docs

Jandex extended path

Open Beginner friendly
#8,451 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
14
Forks
58
Avg merge
4m
Merged PRs (30d)
35

Description

Feature epic details
Operating systems

Does the documentation apply to all operating systems?

  • Yes
  • No; specify operating systems: ______
Summary

Provide a concise summary of your feature. What is the update, why does it matter, and to whom? What do 80% of target users need to know to be most easily productive using your runtime update?

Configuration:

Elements: applicationManager, application
Attribute: readWebInfJandex
Description: When performing class scans, when "useJandex" is true, also look for a jandex index under "/WEB-INF/classes/META-INF/jandex.idx".
Possible values: true | false
Default value: false

Examples

 <applicationManager useJandex="true" readWebInfJandex="true"/>
 <application location="TestServlet40.ear" useJandex="true" readWebInfJandex="true"/>

Discussion

Initial Liberty support for jandex looks for jandex indices at "/META-INF/jandex.idx" relative to module roots. That is correct for EJB modules, but is incorrect for web modules. The industry standard location for jandex indices within web modules is relative to the web module class path root: "/WEB-INF/classes/META-INF/jandex.idx".

The new attribute readWebInfJandex enables support for the industry standard location, "/WEB-INF/classes/META-INF/jandex.idx". When the new attribute is enabled, when processing web modules, Liberty looks for jandex indices in both the original location relative to the module root, and at the industry standard location relative to the web module class path root. (If indices are present at both locations, the "/META-INF/jandex.idx" location has precedence.)

The new attribute may be used in the applicationManager element and in the application element. When used in the applicationManager element, the attribute value applies to all applications. When used in an application element, the attribute value applies to that one application. (A value supplied in the application element overrides a value supplied in the applicationManager element, for that one application.)

To reduce migration risks, the new attribute is an opt-in attribute. The default value is false. A true value must be explicitly set to enable support for the new location.

Support for jandex is not enabled by default. The useJandex option must be explicitly set to true to enable jandex support. The new readWebInfJandex option is meaningful only when useJandex is true.

Updates to existing topics

The attribute is being added to two existing configuration elements, application and applicationManager.

https://openliberty.io/docs/latest/reference/config/applicationManager.html
https://openliberty.io/docs/latest/reference/config/application.html

Create a new topic

N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing applicationManager and application configuration reference topics linked in the issue. Add the readWebInfJandex attribute, its default, supported values, relationship to useJandex, precedence, and the provided examples to both topics. Done means both rendered reference pages accurately document the opt-in behavior and WEB-INF/classes/META-INF/jandex.idx location.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.