Repository navigation
Make the Servlet import optional in the OSGi bundle - #1193
Open
MoChiUaena wants to merge 1 commit into
Open
MoChiUaena wants to merge 1 commit into
MoChiUaena wants to merge 1 commit into
Conversation
Allow the Handlebars bundle to resolve without Servlet when applications do not use ServletContextTemplateLoader. Keep the existing Servlet version range and other package imports unchanged. Fixes jknack#1179 Signed-off-by: dlwlrma <965810157@qq.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The
handlebarsOSGi bundle currently requiresjakarta.servlet [6.1,7)even when an application never usesServletContextTemplateLoader. As a result, the bundle cannot resolve without Servlet or with Servlet 6.0 alone.Mark only the
jakarta.servletimport optional. Its version range and the other package imports stay the same. In an Equinox check using the built JAR, applications without Servlet and with Servlet 6.0 both resolved the bundle and rendered a template. With Servlet 6.1, the package was still wired andServletContextTemplateLoadercould be constructed.Validation: full
clean packageon JDK 17 and 21; all 11 modules succeeded on both, with 1,176 tests per run (3 existing skips, no failures or errors). The OSGi resolver and rendering checks covered all three Servlet setups.Fixes #1179.