Skip to content

Make jakarta.servlet import optional for consumers not using ServletContextTemplateLoader #1179

@margaretrizkalla-cmyk

Description

@margaretrizkalla-cmyk

Since 4.5.x, the handlebars artifact declares a hard OSGi import range on
jakarta.servlet [6.1,7). This breaks bundle resolution for consumers that
ship jakarta.servlet 6.0 and do not use ServletContextTemplateLoader
(the only class that depends on the servlet API).

Making the jakarta.servlet import resolution:=optional in the OSGi
manifest would allow the bundle to resolve in environments with a different
servlet API version, while retaining full functionality for users who do use
ServletContextTemplateLoader.

As a workaround we currently repackage the jar in a thin OSGi wrapper bundle
that overrides the import to resolution:=optional. We would love to be able
to drop that wrapper once this is addressed upstream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions