-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
How to deploy the same WAR in both Jetty 10 and Jetty 12? #11266
Comments
Interesting problem. But considering that Jetty 10 is now at End of Community Support, why do you need Jetty 10 support still? |
This doesn't exist yet, right? I was indeed looking for something like this :)
First, thanks for the info, I wasn't aware of that! Till today, the version of Jetty that XWiki supports is Jetty 10 (see https://dev.xwiki.org/xwiki/bin/view/Community/SupportStrategy/ServletContainerSupportStrategy/). The reason is that XWiki was not able to upgrade to 11 since that would have meant removing the What we could do indeed, is only support Jetty 12 on our master branch (ie on our latest releases), and not on our LTS branch (which would still be on Jetty 10). Note: it would be too harsh to our users to ask them to move to Jetty 12 in a heartbeat. However, if we could support both Jetty 10.x and 12.x on all our branches, it would be even nicer. We could provide several distributions of XWiki for the different Jetty versions, but that's a lot of work and support for us (we are already supporting other servlet engines, DBs, etc and the combination matrix is already bursting ;)). So, my understanding, is that at this point in time, there's no solution to have a WAR with a Thx @joakime ! PS: When I say "supported version" above it means:
|
@vmassol is this the Is it only these 2 properties that you need to configure, or is there more? |
@janbartel indeed, there are only 2 properties we need to configure. Is there another way to configure them? Thanks |
…orm (content size / keys) + Allows these common configurations to be set via `WEB-INF/web.xml` without the need for a `WEB-INF/jetty-web.xml` Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
I submitted PR #11274 as a proof of concept for a possible way to address this. |
Thanks @joakime ! Do you think it's better to do it this way rather than add support for a Also, imagine we needed to have different values for Jetty 10.x and Jetty 12.x. How would be able to write it? I don't know if it would be possible with Last point, it's quite nice to have everything related to jetty located in a single specific file like WDYT? Thanks a lot for working on this, really appreciated, and whatever solution you propose will be fine :) |
@vmassol all good points, and as a result I no longer like that PoC with context attributes. |
Generally I think that Meanwhile, we should also think of other better ways to do this. |
@gregw I would suggest an algorithm that closely matches what we are already doing with
So I would suggest we do the following for ee8/9/10 and beyond:
|
The environment needs to be there in the name too as key classes have different names. |
So the preferential search order would then be: 1 |
That would be awesome, thanks everyone! |
Note that items 6 and 7 are dups. |
…orm (content size / keys) * Allows these common configurations to be set via WEB-INF/web.xml without the need for a WEB-INF/jetty-web.xml
Thanks @janbartel ! I'll test it ASAP. |
@janbartel I'm having some problem testing, it seems that using The code at #7638 (comment) seems to show a usage of it in Note that the error I get is:
Any idea? Thx a lot |
Seems I'm missing a |
ok I think that |
@janbartel it seems my
I get:
Any idea? Thx |
@vmassol ahhh, I think you're going by the suggested names in this issue. When it came to implementation, we chose slightly different name pattern to match all our other naming conventions, which is |
Thx @janbartel It works! Moving on to the next problem :) |
All working now, thx again! |
Hello,
At XWiki, we have a WAR with a
jetty-web.xml
. We're trying to add support for Jetty 12 (now that it supports EE8 too) but we're facing the issue that<Configure class="org.eclipse.jetty.webapp.WebAppContext">
doesn't work in Jetty 12.To make it work we have to change it to
<Configure class="org.eclipse.jetty.ee8.webapp.WebAppContext">
.However if we do this then our users won't be able to deploy XWiki in Jetty 10 anymore (for example).
Would you have a solution for this that doesn't involve making 2 WARs?
Thank you
-Vincent, XWiki dev
The text was updated successfully, but these errors were encountered: