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

Overly broad filtering of jars named /^.*servlet-api.*\.jar$/ #418

Open
woldie opened this issue Feb 22, 2018 · 0 comments
Open

Overly broad filtering of jars named /^.*servlet-api.*\.jar$/ #418

woldie opened this issue Feb 22, 2018 · 0 comments

Comments

@woldie
Copy link

woldie commented Feb 22, 2018

isServletApi in org.akhikhl.gretty.JettyConfigurerImpl uses an overly broad matcher to determine if a jar dependency in the war is a servlet-api jar and needs to be filtered from the classpath.

I suspect this logic was put in there to help silly users who mistakenly package their war projects with API spec jars. Fair enough, (although I think you should let those silly users burn rather than rescue them from the fires of their ignorance, ere they will never learn.)

In any case, please just make that matcher do more exact matching to prevent the unfortunate filtering of jars that end in, or contain "servlet-api". Classes from jars with "servlet-api" in the name will throw ClassNotFoundException when running under Gretty. Here's a link to show you all the jars you would be filtering when running under Gretty currently:

http://mvnrepository.com/search?q=servlet-api

Most of those are legit jars to filter, but not all!

We suspect the best solution here would be to create a configurable whitelist of filename regexes that contains the usual suspects. That, or just remove the "servlet-api" filtering altogether.

This was referenced Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant