-
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
Deploying on Jetty 12 using context XML files will only work when a .properties file with the EE details is also present #10158
Comments
You have a project wanting |
An interesting wrinkle in this report is that the OP only has an XML deployable, no war or exploded directory in the |
Thanks for the note - I am happy to remove that part when it is confusing. Apologies. |
Indeed, the (almost) same context XML file has been working for many previous Jetty versions (actually, all the way to Jetty 6.x) |
Opened PR #10209 to show that this is possible, but with the added knowledge that when you have an XML focused deployable, you need to tell the system what environment it belongs to. In other words, your eventual
The And (crucially) the needed file
From there, your XML will deploy in the appropriate environment (eg: ee8 / ee9 / ee10). |
@alitokmen thanks for following us from 6 to 12! Can you deploy your XML now with the extra info here? I wonder if we need to work on (edit: s/better/an/) error message if no provider deploys something in webapps? |
The core in ScanningAppProvider.createApp() is handling the environment selection currently. When it cannot find a webap, or a webapp dir, or a default environment isn't specified, then that app gets ignored (currently logged at DEBUG level). Proposal for 12.0.1 release.
|
…o the .xml file for Jetty 12.x installed local deployments
Thank you for your close attention and hints, and thank you for keeping on giving me (and many others) excellent reasons to continue since Jetty 6 🥇 My feedback:
With the #1 hint functioning, I am happy to check in codehaus-cargo/cargo@e550652 on Codehaus Cargo for it to support Jetty 12.x further. Warm regards - and thanks again for your help! |
We cannot rely on the <Configure class="org.otherfoundation.rest.jetty.AuditWebAppContext"> That's why there should probably be a fallback to having the |
I've been toying with the idea of a Eg: package org.eclipse.jetty.ee10.webapp;
@JettyEnv("ee10")
@ManagedObject("Web Application ContextHandler")
public class WebAppContext extends ServletContextHandler implements WebAppClassLoader.Context, Deployable |
Thank you very much, @joakime As the updates are going beyond the scope of my initial inquiry, we can either close this ticket or I can provide a different initial description, when it helps with the overall tracking and transparency |
In the short term, let's improve our documentation for deployment. Let's open other issues for a) better ways to detect environment; b) what to do if no matching provider is found. |
The documentation contains details about the properties files - https://eclipse.dev/jetty/documentation/jetty-12/operations-guide/index.html#og-deploy-jetty The DEBUG about a missing environment is now a WARN due to PR #10321, which is merged. Closing as completed. |
Updated the documentation; a better fix is coming with #10411. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Jetty version(s)
Jetty 12 (beta 3)
Java version/vendor
(use: java -version)
openjdk version "17.0.7" 2023-04-18
OpenJDK Runtime Environment (build 17.0.7+7-Ubuntu-0ubuntu122.04.2)
OpenJDK 64-Bit Server VM (build 17.0.7+7-Ubuntu-0ubuntu122.04.2, mixed mode, sharing)
OS type/version
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
Description
When I follow the steps in https://eclipse.dev/jetty/documentation/jetty-12/operations-guide/index.html#og-deploy-jetty the presence of the Jetty context XML file has no impact - Nothing gets deployed at all.
The (almost) same context XML file has been working for many previous Jetty versions (actually, all the way to Jetty 6.x), I hence believe this is a regression.
How to reproduce?
webapps/simple-war.xml
with contents:Other observations - The same with the WAR file copied over
Copying over the WAR file works:
cp /home/hyper-v/cargo/core/samples/java/target/deployables-jakarta-ee/simple-war.war webapps/
The text was updated successfully, but these errors were encountered: