tag:blogger.com,1999:blog-741750605858169835.post6571985753175480471..comments2024-01-24T14:53:02.919+00:00Comments on Stephen Colebourne's blog: Java SE 9 - JPMS automatic modulesStephen Colebournehttp://www.blogger.com/profile/01454237967846880639noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-741750605858169835.post-7020773700812945202018-01-28T23:50:24.936+00:002018-01-28T23:50:24.936+00:00The convention now is to name modules after the ba...The convention now is to name modules after the base package in the jar file. If an incorrect name escapes into the wild, it is possible to create a dummy jar file that has the wrong name and does a `requires transitive` to the right one.Stephen Colebournehttps://www.blogger.com/profile/01454237967846880639noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-54193016523075004282018-01-24T23:36:21.420+00:002018-01-24T23:36:21.420+00:00Any update on this or was Java9 released with this...Any update on this or was Java9 released with this issue present? Reading the Jigsaw docs it is not clear to me.Anonymoushttps://www.blogger.com/profile/16296887898320495521noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-82186340388708887072017-12-05T14:18:18.910+00:002017-12-05T14:18:18.910+00:00How about renaming the artifact to reflect the req...How about renaming the artifact to reflect the required name ?<br />For example, the guava.jar file could be renamed com-google-common.jar which would generate module com.google.common.<br />Gaƫtanhttps://www.blogger.com/profile/12693010452742401070noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-52232895573986056282017-05-14T10:02:19.622+01:002017-05-14T10:02:19.622+01:00Yes. Really it is the case that all open source pr...Yes. Really it is the case that all open source projects should follow the rule, and only a few private projects should break the rule.<br /><br />There is also a potential Maven task here - generating shim modules on the fly: http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-May/012607.htmlStephen Colebournehttps://www.blogger.com/profile/01454237967846880639noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-8280589524845534432017-05-14T08:59:56.096+01:002017-05-14T08:59:56.096+01:00While your suggestion seems sensible, I think the ...While your suggestion seems sensible, I think the `Automatic-Module-Name` header is much better because you don't need all that fuss with compiling module-info.java. Changing MANIFEST.MF is very easy and you don't even need to hava a JDK 9 for that.Gibbonshttps://www.blogger.com/profile/09675190422288434698noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-88696549058168544112017-05-10T03:06:37.054+01:002017-05-10T03:06:37.054+01:00I think the concerns related to naming automatic m...I think the concerns related to naming automatic modules (relying on JAR file names) are very valid and, although it sounds like a simple path, it should not be taken. Using MANIFEST.MF is a viable option, I am wondering if the change in the library is required anyway, could it be done using the "special" module declaration, f.e. in case of guava, adding the following module-info.java:<br /><br />auto module com.google.common {<br />}<br /><br />Surely 'auto' is not part of the spec, but could be a special modifier to outline the automatic module, kind of fast track. Just an idea.Andriy Redkohttps://www.blogger.com/profile/16473725484333171169noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-69781451154763020262017-05-09T14:57:44.739+01:002017-05-09T14:57:44.739+01:00The maven enforcer plugin might be a good place to...The maven enforcer plugin might be a good place to put that rule.Matthew Hallhttps://www.blogger.com/profile/15193859932143053469noreply@blogger.comtag:blogger.com,1999:blog-741750605858169835.post-91333031257399652432017-05-09T09:24:16.708+01:002017-05-09T09:24:16.708+01:00Sounds we need a way to fail-fast a build that vio...Sounds we need a way to fail-fast a build that violates the rule "Do not release to Maven Central a modular jar file that depends on an automatic module, unless the automatic module has an "Automatic-Module-Name" MANIFEST.MF entry."Geoffrey De Smethttps://www.blogger.com/profile/14668727421421215806noreply@blogger.com