Skip to content
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

Don't Specify Wildcard Package OSGi Version for MicroProfile Rest Client #5237

Conversation

Pandrex247
Copy link
Contributor

Not sure if this is the current "HEAD" branch or not - I'm trying to patch Jersey 3.1.

The OSGi package versions for MicroProfile Rest Client don't conform to the project version.
In the Rest Client 3.0 API jar, the packages are exported as such:

  • org.eclipse.microprofile.rest.client;version="2.0"
  • org.eclipse.microprofile.rest.client.annotation;version="1.1.1"
  • org.eclipse.microprofile.rest.client.ext;version="2.0"
  • org.eclipse.microprofile.rest.client.inject;version="2.0"
  • org.eclipse.microprofile.rest.client.spi;version="1.1.1"

And Jersey with its current configuration imports the following:

  • org.eclipse.microprofile.rest.client;version="[3.0,4)"
  • org.eclipse.microprofile.rest.client.annotation;version="[3.0,4)"
  • org.eclipse.microprofile.rest.client.ext;version="[3.0,4)"
  • org.eclipse.microprofile.rest.client.inject;version="[3.0,4)"
  • org.eclipse.microprofile.rest.client.spi;version="[3.0,4)"

This change should make it so the imports are as follows:

  • org.eclipse.microprofile.rest.client;version="[2.0,3)"
  • org.eclipse.microprofile.rest.client.annotation;version="[1.1,2)"
  • org.eclipse.microprofile.rest.client.ext;version="[2.0,3)"
  • org.eclipse.microprofile.rest.client.inject;version="[2.0,3)"
  • org.eclipse.microprofile.rest.client.spi;version="[1.1,2)"

Signed-off-by: Andrew Pielage pandrex247@hotmail.com

Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
Signed-off-by: Andrew Pielage <pandrex247@hotmail.com>
@jansupol
Copy link
Contributor

This should have been fixed in the rest client API I believe. But until then, you are right the felix plugin should set the version the API provides. It is doing so when the line is removed (as you did in the PR). But, If they ever fix that in the MP Rest Client API, the module won't work with it.

So I would rather set org.eclipse.microprofile.rest.client.*;version="[2.0,4)", what do you think?

@pdudits
Copy link
Contributor

pdudits commented Jan 24, 2023

Last time I was questioning that in 2019 in eclipse/microprofile-rest-client#177. I understood they want to retain per-package semantic version, so we should consider that a feature of the API.

@Pandrex247
Copy link
Contributor Author

For reference, when they released Rest Client 3.0 for Jakarta EE they made the effort to increment all of the package versions with major or minor increments to the above so it's not an accident that they are what they are - it seems that they wish to continue versioning packages separately.

Reference Commit

Copy link
Contributor

@jansupol jansupol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package-versioning sounds like extra confusion for the customers, but I agree with letting the versioning be setup automatically by the Felix plugin

@jansupol jansupol merged commit 65f3a72 into eclipse-ee4j:3.1 Jan 25, 2023
@senivam senivam added this to the 3.1.1 milestone Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants