Module declarations

Stephane Epardaud stef at epardaud.fr
Tue Oct 6 12:16:26 UTC 2015


FTR I think putting it in a module descriptor (as part of the language
like package descriptors are already), is the right place. It does
belong to the definition of the source code (like package imports in
Java files), and I only wish we would also put versions there (though I
understand why Java is afraid of that). At the very least being part of
the language will allow us to put user-defined annotations on module
imports, perhaps even a @Version("1.2") annotation ;)

Of course, the problem with not allowing versions in there is that it
requires duplication and sync of dependencies descriptions between the
language and the build system. Allowing more information to be in the
module descriptor (either by allowing versions, even if optional, or by
allowing user-defined annotations on module imports, which could include
versions) means that even a minimal Maven or Gradle (or other) build
tool would know how to build the module OOTB.



More information about the jpms-spec-observers mailing list