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

Fixes #201 - Java JPMS modules. #204

Merged
merged 2 commits into from
Sep 18, 2018
Merged

Fixes #201 - Java JPMS modules. #204

merged 2 commits into from
Sep 18, 2018

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented Sep 6, 2018

Added Automatic-Module-Name: javax.servlet.api to the MANIFEST.

Signed-off-by: Simone Bordet simone.bordet@gmail.com

Added Automatic-Module-Name: javax.servlet.api to the MANIFEST.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Copy link
Contributor

@markt-asf markt-asf left a comment

Choose a reason for hiding this comment

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

LGTM

@ggam
Copy link
Contributor

ggam commented Sep 6, 2018

My understanding is that the module name should be java.servlet. See JSON-P for example: https://github.com/eclipse-ee4j/jsonp/blob/master/api/src/main/jdk9/module-info.java

@markt-asf
Copy link
Contributor

Should be on what basis? This name was chosen to align (as closely as possible) to the OSGI bundle name of "javax.servlet-api". (See #201)

@sbordet
Copy link
Contributor Author

sbordet commented Sep 6, 2018

I don't have a personal preference, for me both are valid. About the link with OSGi, it's true that the symbolic name resemble the module name, but that's about it (and they are different anyway).

I'd be happy to update the PR if we reach a consensus on a different module name.

It will be important that they are consistent though.

We don't want the Servlet module to be the only one that has .api if the others don't.

E.g. what is the proposed module name for CDI, JSP, JPA, etc.?

@ggam
Copy link
Contributor

ggam commented Sep 6, 2018

I can't find an official document, but I recall there was some discussion about this during Java EE 8 development, and the Oracle recommendation was to use "java" instead of "javax" for module names. The reason is that there's no need to distinguish "core" vs "extension" modules anymore, which was the reason to add the "x" suffix. All Java SE modules, even the ones with "javax" packages, are named "java.*".

In addition to this, and given that package names must be unique between modules, the general recommendation is to use the top level package as the module name.

The last published versions of JSON-P, JSON-B, JAX-RS, JPA and I think JTA and JAXB already adopted this convention.

@sbordet
Copy link
Contributor Author

sbordet commented Sep 6, 2018

@jodastephen wrote this comment in favor of javax.servlet.

@jodastephen do you recall if there was a discussion about module names starting with javax rather than just java?

@jodastephen
Copy link

I believe I've seen something official that says JCP spec modules should use java.xxx module naming (as they are special, and distinct from my more general naming recommendations). I can't find the link though...

@bshannon
Copy link
Contributor

bshannon commented Sep 7, 2018

It should be java.servlet.

(Really, it should be decided by the Jakarta EE Specification Committee
as a part of Jakarta EE 9, but hopefully they would agree that it should
be java.servlet. Definitely not javax.servlet.)

Updated Automatic-Module-Name to "java.servlet" after discussion.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet
Copy link
Contributor Author

sbordet commented Sep 7, 2018

I have updated the PR to java.servlet.

@markt-asf markt-asf merged commit 07041da into jakartaee:master Sep 18, 2018
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.

5 participants