Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jakartaee-spec-project-leads] Automatic Module Names for Jakarta EE 9

On 1/29/20 11:45 PM, Bill Shannon wrote:
Assuming you want to create a module that can be used as an equivalent replacement for Jakarta Mail, it should be named jakarta.mail.  That's what clients of the module will request.

short version:
either (API jar file and API+impl bundle jar file) or (all available API+impl bundle jar files) should have the same module name to not enforce vendor lock-in; so in your case, David, it should be as Bill said: "jakarta.mail"


longer version:
to elaborate more on this, from my personal perspective and 3rd party app developer's point of view:

In my custom app, I don't want to be locked to particular implementation of any Jakarta API and the app has to use JPMS. I had no voice in defining requirements for the app, I just have to deal with it.

Looking at existing APIs, I can see there are two flavors:
1) standalone API jar for which there exists at least one standalone implementation.

=> in this case, I'm fine; I can "require standaloneAPI.jar" and that's it, since this kind of jar is supposed to be able to locate implementation on the *path using predefined mechanism and as long as I do not require API from the specific implementation explicitly, I'm not locked to it

2) standalone API jar for which there exists at least one API+impl bundle jar (there's probably exactly one for activation but there are definitely more implementations of jsonp or mail available)

=> if module-name of API jar and API+impl jar _is not the same_ I'm in trouble: - API jar and API+impl bundle contains same "jakarta.*" packages - not allowed to use both at the same time on JDK 11 - if I "require API.jar", I can compile things but at runtime, I either won't have impl (unless standalone impl.jar exists) or I will face the "API.jar" module not found when I try to use "API+impl.jar" - if I "require API+impl.jar" I cannot easily switch the implementation, unless it has the same module-name as the original API+impl.jar, so I'm basically locked to the "API+impl.jar" defined

Power developer could possibly come up with some solution by repackaging offending jars or with dynamic module loading based on ModuleLayers API but that looks like something too complicated to me. There might be other solutions I wasn't thinking about as well.

I'm by no means saying this is something to be resolved/done for Jakarta EE 9, I'm just trying to point to problematic situation which can be prevented by proper choice of the module name by those who want to define it now and who want to avoid changing the name in the future.

thanks,
--lukas


David Blevins wrote on 1/29/20 2:28 PM:
Related question, what module name should we use for Geronimo JavaMail?

On Wed, Jan 29, 2020 at 10:21 AM Anthony Vanelverdinghe <anthonyv.be@xxxxxxxxxxx <mailto:anthonyv.be@xxxxxxxxxxx>> wrote:

    Why is the Jakarta Mail implementation allowed to use a module
    name in the jakarta namespace? Isn't the "jakarta.*" namespace
    reserved for specifications?
    I always assumed it was, in which case the ".api" suffix doesn't
    add any value & should be dropped.

    Kind regards, Anthony

    On 29/01/2020 17:49, Kevin Sutter wrote:
    Lukas,
    We are only trying to establish a convention for the
    Specification (API) Projects.  The implementations might need to
    establish their own module naming conventions.

    For the specific case you referenced
    <https://github.com/eclipse-ee4j/mail/issues/409>, isn't that a
    quirk with Jakarta Mail?  Under normal conditions, there should
    be a clear separation between the API and the Implementation.

    ---------------------------------------------------
    Kevin Sutter
    STSM, MicroProfile and Jakarta EE architect @ IBM
    e-mail: sutter@xxxxxxxxxx <mailto:sutter@xxxxxxxxxx>     Twitter:
     @kwsutter
    phone: tl-553-3620 (office), 507-253-3620 (office)
    LinkedIn: https://www.linkedin.com/in/kevinwsutter



    From: Lukas Jungmann <lukas.jungmann@xxxxxxxxxx>
    <mailto:lukas.jungmann@xxxxxxxxxx>
    To: jakartaee-spec-project-leads@xxxxxxxxxxx
    <mailto:jakartaee-spec-project-leads@xxxxxxxxxxx>
    Date: 01/29/2020 09:59
    Subject: [EXTERNAL] Re: [jakartaee-spec-project-leads] Automatic
    Module Names for Jakarta EE 9
    Sent by: jakartaee-spec-project-leads-bounces@xxxxxxxxxxx
    <mailto:jakartaee-spec-project-leads-bounces@xxxxxxxxxxx>
    ------------------------------------------------------------------------



    On 1/29/20 3:43 PM, Kevin Sutter wrote:
    > Is it a requirement that all of the Projects use the OSGI
    > Bundle-SymbolicName?  (It probably is due to the use of the
    maven bundle
    > plugin, but I thought I would ask...)

    Yes; GF is based on OSGi so whatever gets there, needs to be OSGi
    bundle
    and "The Bundle-SymbolicName manifest header is a mandatory
    header."[1]

    >
    > Just to be clear with an example, I looked at Servlet:
    > <bundle.symbolicName>jakarta.servlet-api</bundle.symbolicName>
    >
    > Thus, your proposed Automatic Module name would be (given your
    proposed
    > rules)?
    > jakarta.servlet.api
    >
    > Are we good with this approach across the Jakarta EE Projects?

    no on my end as it may require implementation module to be called
    API in
    certain cases, ie
    https://github.com/eclipse-ee4j/mail/issues/409 has
    some details. JDK does not use "api" in their module names too.
    But if
    majority wants it this way...

    thanks,
    --lukas

    [1]:
    https://osgi.org/specification/osgi.core/7.0.0/framework.module.html#framework.module.bsn
    >
    > ---------------------------------------------------
    > Kevin Sutter
    > STSM, MicroProfile and Jakarta EE architect @ IBM
> e-mail: sutter@xxxxxxxxxx <mailto:sutter@xxxxxxxxxx> Twitter:  @kwsutter
    > phone: tl-553-3620 (office), 507-253-3620 (office)
    > LinkedIn: https://www.linkedin.com/in/kevinwsutter
    >
    >
    >
    > From: Mark Thomas <markt@xxxxxxxxxx> <mailto:markt@xxxxxxxxxx>
    > To: JakartaEE Spec Project Leadership discussions
    > <jakartaee-spec-project-leads@xxxxxxxxxxx>
    <mailto:jakartaee-spec-project-leads@xxxxxxxxxxx>
    > Date: 01/29/2020 06:40
    > Subject: [EXTERNAL] Re: [jakartaee-spec-project-leads]
    Automatic Module
    > Names for Jakarta EE 9
    > Sent by: jakartaee-spec-project-leads-bounces@xxxxxxxxxxx
    <mailto:jakartaee-spec-project-leads-bounces@xxxxxxxxxxx>
    >
    ------------------------------------------------------------------------
    >
    >
    >
    > Thanks for the links.
    >
    > My reading of this is that my proposal to:
    >
    > - Take the OSGi Bundle-SymbolicName
    > - Replace any "-" with "."
    > - Use that as the automatic module name
    >
    > is consistent with the requirement that the module names start with
    > "jakarta." and not inconsistent with any other Jakarta EE wide
    policy.
    >
    > I therefore intend to proceed with this approach in the projects in
    > which I am involved.
    >
    > Separately, I'd like to recommend this proposed approach for
    adoption
    > across Jakarta EE.
    >
    > Thanks,
    >
    > Mark
    >
    >
    > On 28/01/2020 18:13, Kevin Sutter wrote:
    >> Thanks for the pointer to the Issue. Here's the reference to
     the PMC
    >> minutes regarding Module Names:
    >> https://www.eclipse.org/ee4j/minutes/?date=2018-11-06#module-names
    >>
    >> This was the discussion previous to the Jakarta EE 8 release.
     It  has
    >> not been formally addressed for the Jakarta EE 9 release.  I
     still stand
    >> by the "jakarta." prefix, but we haven't declared the required
    >> definition of module names across all individual projects.
    >>
    >> ---------------------------------------------------
    >> Kevin Sutter
    >> STSM, MicroProfile and Jakarta EE architect @ IBM
>> e-mail: sutter@xxxxxxxxxx <mailto:sutter@xxxxxxxxxx> Twitter:  @kwsutter
    >> phone: tl-553-3620 (office), 507-253-3620 (office)
    >> LinkedIn: https://www.linkedin.com/in/kevinwsutter
    >>
    >>
    >>
    >> From:        Anthony Vanelverdinghe <anthonyv.be@xxxxxxxxxxx>
    <mailto:anthonyv.be@xxxxxxxxxxx>
    >> To:        JakartaEE Spec Project Leadership discussions
    >> <jakartaee-spec-project-leads@xxxxxxxxxxx>
    <mailto:jakartaee-spec-project-leads@xxxxxxxxxxx>, Mark Thomas
    <markt@xxxxxxxxxx> <mailto:markt@xxxxxxxxxx>
    >> Date:        01/28/2020 11:53
    >> Subject:        [EXTERNAL] Re: [jakartaee-spec-project-leads]
     Automatic
    >> Module Names for Jakarta EE 9
    >> Sent by: jakartaee-spec-project-leads-bounces@xxxxxxxxxxx
    <mailto:jakartaee-spec-project-leads-bounces@xxxxxxxxxxx>
    >>
    ------------------------------------------------------------------------
    >>
    >>
    >>
    >> Hi Mark
    >>
    >> There's [1], which says that module names must be "jakarta.*",
     so e.g.
    >> jakarta.el, jakarta.websocket, jakarta.servlet
    >> I've been unable to find the issued PMC statement though.
    >>
    >> [1]
    https://github.com/eclipse-ee4j/ee4j/issues/34#issuecomment-436605211
    >>
    >> Kind regards,
    >> Anthony
    >>
    >> On 28/01/2020 18:02, Mark Thomas wrote:
    >>> Hi,
    >>>
    >>> A number of projects I am involved in have open issues for
    JPMS  names to
    >>> be defined [1][2][3]. Using the JAR name is inherently
    unstable  and
    >>> triggers warnings in various build systems.
    >>>
    >>> Is there an official view on what project should be using? I
    looked  in
    >>> [4] but module names are explicitly excluded.
    >>>
    >>> Absent an official view, is there any objection to projects
    using:
    >>> - Take the OSGi Bundle-SymbolicName
    >>> - Replace any "-" with "."
    >>> - Use that as the automatic module name
    >>> ?
    >>>
    >>> Thanks,
    >>>
    >>> Mark
    >>>
    >>>
    >>> [1] https://github.com/eclipse-ee4j/el-ri/issues/46
    >>> [2] https://github.com/eclipse-ee4j/websocket-api/issues/260
    >>> [3] https://github.com/eclipse-ee4j/servlet-api/issues/201
    >>>
    >>> [4] https://wiki.eclipse.org/JakartaEE_Maven_Versioning_Rules
    >>>
    >>>
    >>> _______________________________________________
    >>> jakartaee-spec-project-leads mailing list
    >>> jakartaee-spec-project-leads@xxxxxxxxxxx
    <mailto:jakartaee-spec-project-leads@xxxxxxxxxxx>
    >>> To change your delivery options, retrieve your password, or
    unsubscribe  from this list, visit
    >>>
    https://www.eclipse.org/mailman/listinfo/jakartaee-spec-project-leads
    >> _______________________________________________
    >> jakartaee-spec-project-leads mailing list
    >> jakartaee-spec-project-leads@xxxxxxxxxxx
    <mailto:jakartaee-spec-project-leads@xxxxxxxxxxx>
    >> To change your delivery options, retrieve your password, or
    unsubscribe
    >> from this list, visit
    >>
    https://www.eclipse.org/mailman/listinfo/jakartaee-spec-project-leads
    >>
    >>
    >>
    >>
    >
    > _______________________________________________
    > jakartaee-spec-project-leads mailing list
    > jakartaee-spec-project-leads@xxxxxxxxxxx
    <mailto:jakartaee-spec-project-leads@xxxxxxxxxxx>
    > To change your delivery options, retrieve your password, or
    unsubscribe
    > from this list, visit
    >
    https://www.eclipse.org/mailman/listinfo/jakartaee-spec-project-leads
    >
    >
    >
    >
    >
    > _______________________________________________
    > jakartaee-spec-project-leads mailing list
    > jakartaee-spec-project-leads@xxxxxxxxxxx
    <mailto:jakartaee-spec-project-leads@xxxxxxxxxxx>
    > To change your delivery options, retrieve your password, or
    unsubscribe from this list, visit
    >
    https://www.eclipse.org/mailman/listinfo/jakartaee-spec-project-leads
    >
    _______________________________________________
    jakartaee-spec-project-leads mailing list
    jakartaee-spec-project-leads@xxxxxxxxxxx
    <mailto:jakartaee-spec-project-leads@xxxxxxxxxxx>
    To change your delivery options, retrieve your password, or
    unsubscribe from this list, visit
    https://www.eclipse.org/mailman/listinfo/jakartaee-spec-project-leads





    _______________________________________________
    jakartaee-spec-project-leads mailing list
    jakartaee-spec-project-leads@xxxxxxxxxxx  <mailto:jakartaee-spec-project-leads@xxxxxxxxxxx>
    To change your delivery options, retrieve your password, or unsubscribe from this list, visit
    https://www.eclipse.org/mailman/listinfo/jakartaee-spec-project-leads
    _______________________________________________
    jakartaee-spec-project-leads mailing list
    jakartaee-spec-project-leads@xxxxxxxxxxx
    <mailto:jakartaee-spec-project-leads@xxxxxxxxxxx>
    To change your delivery options, retrieve your password, or
    unsubscribe from this list, visit
    https://www.eclipse.org/mailman/listinfo/jakartaee-spec-project-leads

--
Sent from Gmail Mobile

_______________________________________________
jakartaee-spec-project-leads mailing list
jakartaee-spec-project-leads@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jakartaee-spec-project-leads


_______________________________________________
jakartaee-spec-project-leads mailing list
jakartaee-spec-project-leads@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jakartaee-spec-project-leads



Back to the top