Module naming restrictions
rafael.wth at gmail.com
Tue Apr 25 07:12:04 UTC 2017
I did another update of my libraries to support Java 9 and found out that
Byte Buddy cannot easily be used as an automatic module. It is published as
byte-buddy.jar to Maven Central where its automatic module name would be
byte.buddy. This does however not compile due to "byte" being a keyword in
Java. Here is what javac gives me:
src/module-info.java:2: error: <identifier> expected
I expect that this is not a common problem but not an uncommon one either.
Looking for artifacts named after Java keywords in Maven Central, you can
find quite a few.
I do not know if this is technically feasible but I suggest that module
names should not come with any restrictions due to the historic freedom in
naming which would just cause confusion if some projects had to be renamed
just to satisfy the module descriptors restrictions.
Best regards, Rafael
More information about the jigsaw-dev