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

Add support to deprecate jetty-home modules #7111

Closed
joakime opened this issue Nov 12, 2021 · 1 comment · Fixed by #7125
Closed

Add support to deprecate jetty-home modules #7111

joakime opened this issue Nov 12, 2021 · 1 comment · Fixed by #7125
Labels
Bug For general bugs on Jetty side

Comments

@joakime
Copy link
Contributor

joakime commented Nov 12, 2021

Jetty version(s)
10.x +

Description
We need a feature to allow deprecation of modules.

It should notify on add and use.
It should also allow freeform text to indicate what the suggested action on the deprecation. (such as an alternate module name)

@joakime joakime added the Bug For general bugs on Jetty side label Nov 12, 2021
@sbordet
Copy link
Contributor

sbordet commented Nov 13, 2021

@joakime there already exist a "deprecation" mechanism, see https://github.com/eclipse/jetty.project/blob/jetty-11.0.7/jetty-home/src/main/resources/modules/deprecated.properties.
The file above is loaded by the Modules class.

However, that seems more a "removed" rather than "deprecated" mechanism (as the warning is printed only if the module is missing), to support complete removal of modules e.g. during upgrade to a newer major Jetty version.

It'll be trivial to add a section such as:

foo.mod

[deprecated]
Module 'foo' is deprecated for removal in a future Jetty version.
Use module 'bar' instead.

[tags]
deprecated

In this way, modules that still exist but are deprecated can be listed, a warning printed, etc.

I'll give it a go at implementing the [deprecated] section.

sbordet added a commit that referenced this issue Nov 16, 2021
sbordet added a commit that referenced this issue Dec 1, 2021
sbordet added a commit that referenced this issue Dec 1, 2021
Updates after review.
Now if a module is deprecated, the list of enabled modules reports it.

Signed-off-by: Simone Bordet <[email protected]>
@sbordet sbordet linked a pull request Dec 1, 2021 that will close this issue
sbordet added a commit that referenced this issue Dec 2, 2021
* Issue #7111 - Add support to deprecate jetty-home modules.

Signed-off-by: Simone Bordet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants