Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [websocket-dev] module-info

IMHO option 1) is the most correct option. Keeping the split packages will just cause problems long term if projects end up depending on both jars (which is easy to do with transitive dependencies).

Stuart

On Thu, 18 Nov 2021 at 02:39, Mark Thomas <markt@xxxxxxxxxx> wrote:
Hi all,

We have a platform requirement to provide module-info.class for our JARs.

We have two JARs

jakarta.websocket-api.jar
- contains the jakarta.websocket package
- contains the jakarta.websocket.server package
- JPMS module name: jakarta.websocket


jakarta.websocket-client-api.jar
- contains the jakarta.websocket package
- JPMS module name: jakarta.websocket.client


The difficulty is the overlapping packages. You aren't meant to do that
in JPMS. jakarta.websocket-api.jar also has an unnecessary, optional
Maven dependency on jakarta.websocket-client-api.jar


I can think of a couple of options.

1. Remove the jakarta.websocket package from jakarta.websocket-api.jar
and add a "proper" dependency on jakarta.websocket-client-api.jar.

As far as I can tell, the only reason this hasn't been done before was
to have a single JAR with no dependencies for the 'server' API. I can
see the benefit in that at the time, but in an increasingly modular
world that creates as many problems, if not more, than it solves.


2. Refactor the build so the jakarta.websocket sources are copied into /
used by the jakarta.websocket-api build (for compilation, Javadoc, etc.)

This should produce a result very similar to what we have now.


3. Some other Maven magic (I'm no Maven expert) to solve this.
Suggestions welcome.


Thoughts on what we should do, alternative solutions etc. welcome.

I am currently leaning towards option 1 but could be easily persuaded to
change my mind.

Mark
_______________________________________________
websocket-dev mailing list
websocket-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/websocket-dev


Back to the top