Change module & package name
overheadhunter opened this issue · 3 comments
As mentioned in my PR review, I would suggest that you choose a module and package name that fulfil these requirements:
- use a reverse domain name package name for a domain that is under your control ✔️
- use a root package name that will never be used by any other module ✖️
- [bonus: use a module name that matches the begin of your root package] ✖️
Should you ever want to publish another module for some linux lib binding, you can not use org.purejava.linux.*
any longer. This name is now forever taken by this library. Otherwise library consumers would run into a split package problem, preventing them from using your libs in a modular app.
Therefore I suggest to change the names to e.g.
module org.purejava.libappindicator.full {
requires org.slf4j;
exports org.purejava.libappindicator; // technically still a problem if you include "full" and "minimal" jars at the same time!
}
On second thought I would use the same module name for all build variants. It is the dependency manager's job to make sure you don't include full
and minimal
at the same time.
Either use a version suffix (1.2.0-minimal
) or a <classifier>
.
Hey @overheadhunter, thank you very much for bringing this up again!
As you might have noticed, this is the first time I defined Java module and package names and so do not have any experience in this.
Thanks for the hints and the example on how to do it right. I'll change the names as suggested.