Why are private packages created when converting a jar to a bundle #4942
Replies: 4 comments 4 replies
-
I’m on a phone so can’t look in the jar. Are you sure the artifact is not made available directly as an OSGi bundle? https://repo1.maven.org/maven2/org/apache/tomcat/tomcat-el-api/9.0.73/tomcat-el-api-9.0.73.jar |
Beta Was this translation helpful? Give feedback.
-
Hi,
This is a misunderstanding, your suggestion mortbay thankfully WORKS, but still I was wondering why these private packages were created with the tomcat version. I already posted this question on the discussion site.
Kind regards,
Günther Mahr
… Am 13.04.2025 um 11:47 schrieb Ed Merks ***@***.***>:
I’m on a phone so can’t look in the jar. Are you sure the artifact is not made available directly as an OSGi bundle?
https://repo1.maven.org/maven2/org/apache/tomcat/tomcat-el-api/9.0.73/tomcat-el-api-9.0.73.jar <https://repo1.maven.org/maven2/org/apache/tomcat/tomcat-el-api/9.0.73/tomcat-el-api-9.0.73.jar>
—
Reply to this email directly, view it on GitHub <#4942 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADVMGJFUJINGH7RZRVAUNHL2ZIXCHAVCNFSM6AAAAAB3A4E3KWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEOBRHAYDCNI>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Sorry for the confusion, I quoted the wrong jar. What I needed, was the package "org.apache.el.util": as you thanfully pointed out, it is contained in org.mortbay.jasper:apache-el:9.096, but I tried to get it from tomcat-jasper-el and then saw that two of the packages were marked a private:
Manifest-Version: 1.0
So, thanks to your hint, the practical question is solved, but the questions, why private packages are created, when using a Maven dependency in the target platform, remains. |
Beta Was this translation helpful? Give feedback.
-
Okay, thank you, Ed. I was indeed assuming that this manifest was created by Tycho. The only question remaining then would be, why does Maven Central create it like that: if the „normal“ jar file is used, all public classes are certainly available to the user, so why is the bundle version different? But you may tell me that we just don’t know….
Anyway, thanks for the explanation!
Kind regards,
Günther Mahr
… Am 13.04.2025 um 17:28 schrieb Ed Merks ***@***.***>:
I think you keep assuming that something (Maven/Tycho) is creating the content of the MANFIEST.MF but I keep trying to tell you that it comes that way from Maven Central. So again, download this jar and look in it:
https://repo1.maven.org/maven2/org/apache/tomcat/tomcat-jasper-el/9.0.73/tomcat-jasper-el-9.0.73.jar
It has exactly what you show above. So Tycho did not create this file and did not change this file. It's this way in Maven Central. You'd need to ask the provider of that artifact why they packaged it this way.
It is possible to wrap plain old jars as OSGi bundles using BND instructions but this only applies if the artifact is not already an OSGi bundle.
—
Reply to this email directly, view it on GitHub <#4942 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADVMGJBU57ZEVNBN33TYQRL2ZJ7BNAVCNFSM6AAAAAB3A4E3KWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEOBSGAZTKNI>.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
When using org.apache.tomcat : tomcat-el-api : 9.073 as a maven dependency in my target platform, the created bundle contains two private packages. As one of these packages - org.apache.el.util - was the one I needed, I could not use the bundle.
So why were these packages created as private?
Beta Was this translation helpful? Give feedback.
All reactions