-
Notifications
You must be signed in to change notification settings - Fork 115
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
Replace aether-okhttp-connector with Maven's wagon-http #1513
Conversation
Manual testing worked fine. Now let's see how those pesky unit tests will do |
The build failed with the following message:
You probably have to enforce a new qualifier version in the feature like in https://github.com/eclipse-m2e/m2e-core/pull/1370/files#diff-75c2153a38dd2bbf3e3e2e587713e98a5f10f214e65544620fc6f13eb70fce19 |
f17c552
to
8078c09
Compare
This increases the size of m2e.maven.runtime from 7.8MB to 8.6MB (without signatures). |
@fbricon I have pushed another commit that excludes the httpcomponents from the m2e.maven.runtime bundle and just imports the packages. |
I had a similar problem and cleaned it multiple times. In the end, only a restart fixed it. :/ |
@fbricon I finally managed to fix the mistake in #1370 and completed the upgrade to Maven 3.9.4. The version-bumps therefore should not be necessary anymore. Do you plan to finish this any-time soon? I plan to release m2e 2.4.0 in the beginning of next week just in time for SimRel 2023-09 RC1. Therefore I would find it saver to merge this after the release so that there is more time for testing, since this is a relatively fundamental change in the maven.runtime, even if this is ready before. |
I'll give it another try tomorrow, but will keep wagon in the runtime, to stay consistent with Maven itself. |
Maven switched to HTTP Native for resolver recently and ditched Wagon Resolver: https://maven.apache.org/docs/3.9.0/release-notes.html. Is there any reason why m2e should still leverage Wagon? |
a78a04e
to
4c5a911
Compare
I've removed the httpcomponents imports from the TP, as the Eclipse update site no longer provides httpclient but httpclient5 ( with different package names), so I'm letting Maven Runtime taking the responsibility of embedding the jars. I kept wagon-http in, as it's easier to migrate some tests (the infamous HttpxWagon), but I checked overall dependency resolution uses maven-resolver-transport-http, as it takes precedence over wagon since 3.9 |
2811acb
to
5d34190
Compare
Why is lemminx.tests the only plugin showing test failures with:
What makes is a special snowflake? Plenty of other tests, extending AbstractMavenProjectTestCase, in other plugins pass |
Not really an idea. They probably start a language server, but the stack-trace does not involve that. So no clue. |
The log at https://ci.eclipse.org/m2e/job/m2e/job/PR-1513/19/artifact/org.eclipse.m2e.editor.lemminx.tests/target/work/data/.metadata/.log seems to indicate that there are circular references. |
a3d49c9
to
c40aee7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fbricon in a second commit I removed the Apache commons-lang3/codec from the embedded jars and instead added them to the target-platform, which saves almost one MB in unzipped state.
The list of jars in m2e.maven.runtime now looks much more like in a standard maven distribution, which I think is good.
Given that all tests pass I would be fine with this change as it is.
Nevertheless I think this replacement should be mentioned in the Release-notes because for m2e-connectors this could be a breaking change, if they relayed on okhttp.
@HannesWell I updated the release notes |
I believe the Remote search definitely doesn't work, but I see no errors in the lemminx logs |
Thanks, it great to have such elaborative notes.
I thought about that as well and indeed LemMinX depends on takari okhttp: I think that needs to be migrated first to the new resolver released first and then m2e needs to be updated to the new LemMinX in this PR too? |
379cd79
to
9d93dcd
Compare
Maven 3.9.5 is currently on vote, therefore it would be cheap in terms of version bumps to finish this before the next m2e release (probably in time for SimRel 2023-12). |
FWIW, lemminx-maven now uses Maven 3.9.5 as API in snapshots (without any change it its code since 3.9.4) |
But as far as I can tell it also uses the okhttp API provided by m2e. Or are the following already fixed/obsolete? |
Nothing changed in lemminx-maven per se. But maybe now with newer Maven, PR eclipse-lemminx/lemminx-maven#509 can be made to work? |
2c6f1fd
to
9e10df1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fbricon since lemminx-maven 0.11 is now available since #1599 I rebased this PR, resolved the conflicts and squashed the commits.
I also tried locally to reference the httpclient
and httpcore
jars as dependencies instead of embedding them, but discarded that since they are only provided by Orbit and the osgi bundle has commons-codec embedded but in an older version that has CVEs, which is why maven-resolver-transport-http
has a more recent dependency on it to replace the jar although the code does not need it: https://github.com/apache/maven-resolver/pull/320/files
But for httpclient-4 the dependency is not updated due to missing Java 1.6 support:
apache/httpcomponents-client#411
If the build passes I'm fine with this change.
What do you or the others think?
If this should land for the december SimRel I want to land this soon to make (a fixed) M3 contribution for m2e before the 2.5 release.
tests are borked.
|
Probably the imports have to be adjusted. Besides that are you fine with it as it is? |
If you've manually tested that everything still works, including the XML editor, then yes |
4b432c5
to
cb04374
Compare
Co-authored-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
cb04374
to
006ddda
Compare
I have tested it a bit in a debugged Eclipse and didn't noticed any issue. Testing everything is of course impossible, but since the build is also green I don't expect severe issues. Any way I think the best test is to use it. |
Fixes #1510
Change-Id: Ic76a241f29a2a37f63d9f4c9b5829067248c9767
Signed-off-by: Fred Bricon fbricon@gmail.com