-
Notifications
You must be signed in to change notification settings - Fork 137
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
FELIX-6708 upgrade bnd to 7.0.0 #322
base: master
Are you sure you want to change the base?
Conversation
To be able to handle Multi-Release jars as dependencies in an OSGi bundle. This prevents exceptions like: ``` build 24-May-2024 18:40:01 [ERROR] Bundle com.abc:jersey-bundle:bundle:55.0-SNAPSHOT : Classes found in the wrong directory: {META-INF/versions/21/org/glassfish/jersey/innate/VirtualThreadSupport$NonLoomishExecutors.class=org.glassfish.jersey.innate.VirtualThreadSupport$NonLoomishExecutors, META-INF/versions/21/org/glassfish/jersey/innate/virtual/LoomishExecutors.class=org.glassfish.jersey.innate.virtual.LoomishExecutors, META-INF/versions/21/org/glassfish/jersey/innate/VirtualThreadSupport$Java21LoomishExecutors.class=org.glassfish.jersey.innate.VirtualThreadSupport$Java21LoomishExecutors, META-INF/versions/21/org/glassfish/jersey/innate/VirtualThreadSupport.class=org.glassfish.jersey.innate.VirtualThreadSupport} ```
Update to java 17 as thats required by bnd
Revert unneeded change
Probably this code can be removed now as well, as bnd can handle it. felix-dev/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java Line 2236 in 6bb228d
It suppresses the errors as warnings via
It didn’t cover java 21. Still, it would be nice to move to 7.0.0 as it claims to support multi release jars properly. |
Two integration tests fail still, but one of these also failed on 6.3.1.
|
@hboutemy @rotty3000 any feedback on this pr, as you both worked on upgrading bnd last time it was upgraded. |
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.
LGTM
What do you think about the failing Integration tests? |
@paulrutter do this to fix the test: diff --git a/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/pom.xml b/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/pom.xml
index 3a15568ced..2eedf2350c 100644
--- a/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/pom.xml
+++ b/tools/maven-bundle-plugin/src/it/no-test-scoped-imports/pom.xml
@@ -53,6 +53,11 @@ under the License.
<artifactId>maven-bundle-plugin</artifactId>
<version>@project.version@</version>
<extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <_noimportjava>true</_noimportjava>
+ </instructions>
+ </configuration>
</plugin>
</plugins>
</build> |
In fact, @paulrutter if you want to preserve the original behaviour of maven-bundle-plugin not to import ref: https://bnd.bndtools.org/instructions/noimportjava.html |
I think java packages should simply be always imported, I don't see a reason to disable that, especially as its the default for bnd. |
whatever you prefer! 🤷🏻 |
Great, i will adjust the PR and rerun the tests with that instruction. |
+ <configuration> + <instructions> + <_noimportjava>true</_noimportjava> + </instructions> + </configuration>
The only IT still failing was also failing with bnd 6.3.1.
|
I think we should update the major version when we release this, due to the minimum jvm version updated to 17. |
bnd major update > felix major update regardless of java version (but plugin minium java version must be set to 17 then) |
…proper manifest is created with bnd 7.0.0
I did not get this failure when I locally ran the IT tests on your branch yesterday. Could someone else maybe confirm? |
Maybe it's platform related? I'm running on a Windows 11 based machine. |
.. and I'm running on Ubuntu Linux. Bnd has often had weird windows issues because it's the least tests platform. |
If you don't see the failing test, then i'd say we're good to go. |
Perhaps you can confirm that |
I printed the return value of
|
.. just a hunch. There are any number of issues it might be. but I just ran again and didn't see that failure. It would be nice if someone else confirmed one way or the other. Barring that, I think you could merge. |
I don't have the power to merge though ;) |
@tjwatson @cziegeler any feedback on this PR? |
@cziegeler i have been running with 7.0.0 for a whole release cycle now and haven't run into any issues. Is there a chance this can be merged and released? |
So we for everyone using felix-bundle-plugin to use java17. Would update the felix.Framework to java17? |
Since it would be a major version upgrade for the plugin (6.0.0?), i don't see a problem with requiring 17. |
I agree that updating to bnd 7 and requiring java 17 for the tool chain is probably not a huge problem. However, I'm too far away from the bundle-plugin code to make a call here. |
@rotty3000 maybe? |
man... I've not looked at this for such a long time I would be remise to make a recommendation such out of date info. Perhaps @jbonofre would have better insight? |
@paulrutter since this plugin is justr a wrapper around bnd why not using bnd-maven-plugin? |
I looked at So ideally, i would like to have an updated |
Sad to say but bnd-maven plugin even misses some features of felix-maven-plugin, beside that +1 from me to simply upgrade (with or without major version increment) it all looks fine and sane and should has no impact to the rest of felix. |
Who could give the final go for this to get merged and released? Would be a shame to leave it on the shelve unused, but maybe I'm just too impatient 😉 |
See https://issues.apache.org/jira/browse/FELIX-6708 and bndtools/bnd#2227 (comment)
To be able to handle Multi-Release jars as dependencies in an OSGi bundle.
This prevents exceptions like: