Jaxrs-api: Jakarta release has wrong OSGi Bundle-SymbolicName

Created on 6 Dec 2018  路  6Comments  路  Source: eclipse-ee4j/jaxrs-api

Jakarta release of this API has wrong value of OSGi Bundle-SymbolicName in MANIFEST.MF.
Current value is _javax.ws.rs-api_ but expected value could be _jakarta.ws.rs-api_ .

GlassFish 5.1 bug

All 6 comments

I am not sure there is a consensus about Bundle-SymbolicName. So far, from all the jakarta APIs in Eclipse Glassfish, only JSON-B API has jakarta prefixed Bundle-SymbolicName. For instance, _jakarta.mail.jar_ has com.sun.mail.jakarta.mail.
@rfelcman Can you support your statement with some written evidence it should be jakarta prefixed?

_jakarta.mail.jar_ is not good example. It's implementation. jakarta.mail-api is better. There is Bundle-SymbolicName: jakarta.mail-api.
In the list bellow You can see Jakarta projects (APIs) used in EclipseLink and there is inconsistency in Bundle Symbolic Names:

  • jakarta.activation-api - OK
  • jakarta.annotation-api - OK
  • jakarta.json-api - OK
  • jakarta.mail-api - OK
  • jakarta.persistence-api - OK
  • jakarta.xml.bind-api - OK
  • jakarta.xml.soap-api - OK
  • jakarta.xml.ws-api - OK
  • javax.ejb-api
  • javax.interceptor-api
  • javax.resource-api
  • javax.servlet-api
  • javax.transaction-api
  • javax.ws.rs-api

We'd like solve this inconsistency to keep there similar Maven artifactId, file name and Bundle-SymbolicName.

We decided to keep the old name for now. See these comments. AFAIK there isn't any official recommendation by the PMC for this. So I don't think that we should change anything. At least at the moment.

sample.zip is slightly modified version of existing test project in Tycho

  • unzip sample project
  • dependency on jakarta.ws.rs:jakarta.ws.rs-api:2.1.3 is defined in the root (parent) pom.xml
  • usage of this dependency is expressed through Import-Package: javax.ws.rs in bundle/META-INF/MANIFEST.MF
  • feature/feature.xml defines dependency on the plugin (= OSGi bundle identified by bundle-symbolicname) providing javax.ws.rs package - I'd expect to use jakarta.ws.rs-api as the plugin ID here so it corresponds to what I have in pom.xml but since this must be bundle-symbolicname, I have to use javax.ws.rs-api here instead, using 'jakarta.ws.rs-api' fails with:
Cannot resolve project dependencies:
  Software being installed: tycho309.feature.feature.group 0.0.1.qualifier
  Missing requirement: tycho309.feature.feature.group 0.0.1.qualifier requires 'org.eclipse.equinox.p2.iu; jakarta.ws.rs-api 0.0.0' but it could not be found

  • run mvn install in the root folder
  • ls site/target/site/plugins/ => javax.ws.rs-api_2.1.3.jar - I do have dependency on jakarta.ws.rs-api in pom.xml, I do not want to redistribute it on the web as javax.ws.rs-api_2.1.3.jar
  • ls p2repo/target/repository/plugins/ => javax.ws.rs-api_2.1.3.jar - I don't want to redistribute this to my clients as javax.ws.rs-api_2.1.3.jar

Change in Bundle-SymbolicName will guarantee that:

  • one is able to refer jakarta.ws.rs-api artifact using jakarta.ws.rs-api string also in OSGi world
  • artifact will be redistributed to consumers as jakarta.ws.rs-api and not as javax.ws.rs-api

Example of the public p2 repository: https://download.eclipse.org/tools/orbit/downloads/drops/R20181128170323/
Few notes on artifactId == Bundle-SymbolicName expectations:

@jansupol Please check the staged 2.1.4: Can we close this issue?

Yes, we can close this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sdaschner picture sdaschner  路  5Comments

nimo23 picture nimo23  路  9Comments

glassfishrobot picture glassfishrobot  路  13Comments

jslsolucoes picture jslsolucoes  路  8Comments

derekm picture derekm  路  12Comments