-
Notifications
You must be signed in to change notification settings - Fork 394
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
Migrate to Jetty 12 #1447
Comments
If I recall correctly, we were pulling Jetty bundles, in addition to the bundles that Equinox provided, from Maven when we got this to work the last time. I think that the additional Jetty bundles were: To support different EE versions: there has been some extensive restructuring of Jetty from 10/11 to 12 (jetty/jetty.project#7638) so the corresponding classes are in other bundles. If we can get access to all the Jetty bundles I suspect that the rest will be pretty straightforward. |
For Orbit, I've created this p2 repository with all the jetty 12 bundles (as derived from their BOMs): https://download.eclipse.org/tools/orbit/simrel/maven-jetty/nightly/latest I've switched the MANIFEST.MF to use them: I was just now testing how well the Tycho build works locally with all my changes. I've already noted that strangely the first of these three don't exist: One thing that struck me as odd looking at this yesterday is that of these three, only the latter to exist:
Even here I have not found replacements for OSGiServerConstants/OSGiWebappConstants So for now I hard-code the String values instead. What I'm hoping to do in the next while is create a PR such that you can check that PR out and continue from that point of progress. |
So the PR is there. After you get this into your workspace use the underlined toolbar button (also available as Help -> Perform Setup Tasks), double click the Module Target task (the p2 task doesn't need to run so note it's unchecked). There will update the target platform using the latest update sites as underlined. Note that the only hand modified part of the *.target is the two versions for org.mortbay.jasper. You can add things to the target platform simply by adding them to a feature or to a MANIFEST.MF; even if that is an error at first, when you resolve the target platform using the above steps, those requirements will be taken into account and added to the target platform automatically... When you launch a Runtime Workspace just ignore the constraint errors and continue the launch. The IDE works but the web browser doesn't and nothing is logged when the apps launched: Again, don't be afraid to ask questions. |
I don't know if this oversight is a problem for migration: Note that 12.0.2 was just released now, so I will produce a build for it... |
Actually I'll hold off on the 12.0.2 build until I see the Platform adopt 12.0.2: |
@merks : I will look into this later today, so you may wake up to some questions. |
I have put some hours into this, most of them to get a SLF4J2 binding in place. :-) Here is a summary, from "the top of my head" The OSGI documentation for Jetty 10+ is a bit sparse, but the OSGI documentation for Jetty 9 was pretty good: https://eclipse.dev/jetty/documentation/jetty-9/index.html#framework-jetty-osgi and is still valid to some point. With the OSGI layer in place, Jetty will track OSGI services for Webapps, Contexts, and even Servers and configure and/or attach them to running servers. Some of the Jetty-osgi layer seem to be available in jetty-core/jetty-osgi . The OSGiServerConstants as well. I will look more into that tomorrow, perhaps all we need is available there. All this is ofcause possible to do without the Jetty-osgi layer and I have done parts of it before, since the company I am working for uses an embedded Jetty 10 with OSGI, but has moved away from the Jetty-osgi layer. However, there was a lot of pain to get it to work and we are not even using deployment descriptors. |
The Jetty project has started a PR to add OSGI artifacts for Jetty 12 ee8. |
I'm not sure how we can test this. Are there builds available somewhere? I can't find any information about where one might get Jetty beyond the release zips here: |
@merks there will be snapshots deployed but only when the PR will be merged.
|
I will build Jetty locally and use those bundles for testing. |
Tried to build that branch locally with:
These steps are currently not enough to build this branch of Jetty locally.
Since the change to 1.0.7-SNAPSHOT was made, I guess that change is necessary to build. But as it is now I can not test this locally. |
Forget what I just wrote, the build works with |
ah yes |
@merks Please confirm that this is due to the current mixed situation of the platform 2023-09 and the Jetty-version-topic. |
@claesrosell you can return to |
I'm in the same situation as Thomas ATM. |
I created a new issue #1451 for this. |
I just wanted to inform you that I have fallen ill and have not been able to put any time into this for the last couple of days. Hopefully, I will soon be better so I can try the new 12.0.3 build of Jetty which includes initial support of the OSGI layer for EE8. |
Having something that works in some capacity is a great and huge improvement over the blank window or stack traces window! I suppose we need the 12.0.3 release to be available to have this also working in the builds and on other developer machines? |
Can you try with adding some instructions such: hopefully, we should cut a release soon. |
Thank you both!! 🥇 |
I have something that is "working" now, but I cannot get it to build. It is the build of "org.eclipse.birt.chart.ui" that fails with:
@merks : Is the target platform automatically generated upon build by Maven/Tycho as well, or do I need to commit the automatically generated target-platform ? |
It must be committed. |
I have digged more into the build issue that I have and it seems like it is not available in version 4.0.3 of Tycho. Here is the error again, better formatted this time:
I think that Tycho is confused by the fact that org.eclipse.e4.core.di has Import-Package headers for packages that are exported from two different bundles that have the same Bundle-SymbolicName ("jakarta-annotation-api") but with different version numbers(1.3.5, 2.1.1, respectively). That is a guess though. With that said, un upgrade from Tycho 2.7.5 to 4.0.4 solved that problem, but introduced a new one. Maven complains about a cycle in the graph
disabling that test makes the build of the Jetty-12 stuff work. |
Maybe the mentioning of x-friends is confusing something into thinking there is dependency in the wrong direction:
Let's not forget about any follow up work we need to do after this is complete, i.e., to re-enable this test after we figure how to do that... |
The Jetty server and WebAppContext is now configured programmatically and without the OSGI layer --------- Co-authored-by: Ed Merks <[email protected]>
Thanks for your testing. Jetty 12.0.3 has been released. |
With Equinox and the Platform migrating to Jetty 12 for 4.30 / 2023-12 it appears that BIRT is forced to upgrade as well because of its use of eclipse.equinox.http.jetty which has migrated.
The text was updated successfully, but these errors were encountered: