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

Allow multiple implementations of ws.rs #121

Merged
merged 1 commit into from
Dec 11, 2019
Merged

Allow multiple implementations of ws.rs #121

merged 1 commit into from
Dec 11, 2019

Conversation

GedMarc
Copy link
Contributor

@GedMarc GedMarc commented Nov 17, 2019

No description provided.

//Allow multiple implementations of ws.rs
requires static javax.ws.rs.api;
requires static java.ws.rs;
requires static jakarta.ws.rs.api;
Copy link
Member

Choose a reason for hiding this comment

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

Are all 3 of these required? It would seem first and third were synonyms or... ?

Copy link
Member

Choose a reason for hiding this comment

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

@GedMarc was hoping to clear this up, before releasing 2.10.2. So... are those all really needed? (wrt 1st and 3rd entries)

@GedMarc
Copy link
Contributor Author

GedMarc commented Dec 11, 2019

@cowtowncoder This one looks correct,

@cowtowncoder
Copy link
Member

@GedMarc Ok but I am still not clear why change is needed? Change to add static, sure, but why are all 3 needed? Or what exactly does this do?

@GedMarc
Copy link
Contributor Author

GedMarc commented Dec 11, 2019

So there's a few releases of the library, which includes

  • where filename was added with a Automatic-Module-Name
  • where automatic module name changes
  • where module-info name differs from automatic-module-name
  • where a different version of the module may release with a new name in module-info (hibernate you **fffff)

A nice example I like to use is servlet, where 2.5 is java.servlet, 3 is java.servlet-api and 4 is javax.servlet-api.

To support all the different module naming, even though its the same library, you specify static to mark that it may be provided as any of these.
It forces the client to specify, which version and name that library is using.

JaxRS has the first two as you know between two different automatic-module-names,
Jakarta released theirs - https://github.com/eclipse-ee4j/jaxrs-api/blob/master/jaxrs-api/src/main/java/module-info.java

which looking at right now - actually have to add another one in case the latest is used xD
jakarta.ws.rs

I hope I've made sense!

@cowtowncoder
Copy link
Member

@GedMarc Ok... makes some sense, I am just struggling with conceptually thinking that everything in module-info is basically "and" (i.e. all of those must be provided). But seems like this is not the case.

Anyway, since you trust these are needed I'll trust you & merge this. Just wanted to double-check. :)

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.

2 participants