-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
[m2e] Avoid runtime errors due to API changes between 1.x and 2.x #5429
Conversation
Several types in M2E have been updated to use Lists rather than arrays. We have to implement the extra interface methods (where needed) and use reflective calls to avoid linking to a method which may not exist. All of this code is ugly, and should be removed once we can use a base of M2E 2.x. Signed-off-by: Tim Ward <[email protected]>
I believe that this fixes #5409 |
Some types (notably ArtifactKey) have become record types in M2E 2.x - we need to cope transparently with this API change until we increase our base to M2E 2.x. As always, this is ugly code and it should be removed once we can use a base of M2E 2.x Signed-off-by: Tim Ward <[email protected]>
I believe that the two commits above make everything work again. It's pretty horrible, and I look forward to being able to remove these hacks once Bndtools 7.0.0 uses M2E v2.x as a base. |
thx @timothyjward |
I'm hoping that this means it works for you? You can build locally with |
this means just thank you for taking it. and placing the method there where the error happened. I will build it later and report |
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.
Once this is verified and merged, I will cherry-pick the commits to next for 6.4.0.
When running in M2E 2.x the delegates to the array version of the mavenProjectChanged method, however as this is declared by the 1.x interface the JVM fails to link the method call. We therefore re-declare the method in the Abstract class to give the linker something to link to. Signed-off-by: Tim Ward <[email protected]>
with 2022-9 I do not see bundles in the bndrun view. but the error is not longer there
|
It sounds like an improvement then. I found another place that needed a repeat of an abstract method to satisfy the linker in c8ea019 - if that wasn't the commit you build then it may be worth trying. Otherwise I'm not sure how else to fix this. |
i build after c8ea019 |
I think that this is ready to merge. I can't guarantee that all the M2E integration is working, but it does appear substantially improved. I am able to build/resolve/run my test workspace in both old and new versions of Eclipse. |
jep this should be merged! |
Several types in M2E have been updated to use Lists rather than arrays. We have to implement the extra interface methods (where needed) and use reflective calls to avoid linking to a method which may not exist. All of this code is ugly, and should be removed once we can use a base of M2E 2.x.
Signed-off-by: Tim Ward [email protected]