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

Cleanup webappconfiguration #3703

Merged
merged 7 commits into from
Jun 5, 2019
Merged

Conversation

gregw
Copy link
Contributor

@gregw gregw commented May 28, 2019

cleanup webappconfiguration

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw gregw requested a review from janbartel May 28, 2019 12:01
gregw added 3 commits May 28, 2019 17:07
Signed-off-by: Greg Wilkins <gregw@webtide.com>
…configuration-cleanup

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw
Copy link
Contributor Author

gregw commented May 30, 2019

Note that this PR is really a draft until we work out how to fix the OSGi tests. @janbartel any ideas yet?

@gregw
Copy link
Contributor Author

gregw commented Jun 3, 2019

@janbartel nudge

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw gregw force-pushed the jetty-10.0.x-configuration-cleanup branch from 34ad5f6 to 52c332a Compare June 3, 2019 15:52
"org.eclipse.jetty.alpn.");
"org.eclipse.jetty.servlet.NoJspServlet"
);
expose("org.eclipse.jetty.servlet.listener.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these are classes/packages are in org.eclipse.jetty.servlet.
Would it not make more sense to have a Configuration class in the jetty-servlet module rather than in jetty-webapp?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. servlet is usable without webapps. But configuration really about configuring webapps - specifically by a combination of convention and the configurations we push into it from our modules. If we wanted to move Configuration down to servlet, then we'd have to move the WebAppClassLoader (or at least an abstraction of it) down as well... and then we start having no difference between servlet and webapp.

tl;dr; any direct users of jetty-servlet configure by using API directly and probably don't have a different classloader (maybe not even a context).

@@ -141,6 +141,7 @@
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why provided? jetty-servlets is supposed to be portable across containers (it's not, but I think that's the idea), so it should really be in WEB-INF/lib.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think they are portable. More over, the jetty-servlets module exposes them on the webapp classpath. Putting them in webapp just brings in all our io, http and util classes and exposes all the classloader problems that entails.
In fact, some of the classes (eg PushCacheFilter) only work if loaded from the container. I don't think we are in the business of providing general utility servlets for any container.

break;
out.write(buffer,0,len);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason to inline IO.copy()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because you wouldn't let me do a release of a fixed jetty-util jar :)
Once we have a fixed 9.4 jetty-util release, we can re-instate the tests that use it and then we can remove this inline (I told you it was a pain!)
I don't want to bring in jetty-10 util just for this 1 usage.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw gregw requested a review from sbordet June 5, 2019 06:55
@gregw gregw merged commit 043521c into jetty-10.0.x Jun 5, 2019
@gregw gregw deleted the jetty-10.0.x-configuration-cleanup branch June 5, 2019 09:54
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

Successfully merging this pull request may close these issues.

3 participants