I am working out a proof of concept to use the module version property and the version of a ‘requires’ in a useful manner. Details and a link to github can be found on:
https://devcreativity.wordpress.com/2017/12/29/semantic-versions-in-java-9-modules-as-a-safety-net/ However, I stumbled on behaviour I don’t completely understand: - printing out the module.getDescription().version() showed a non-empty value for the jdk modules, explicit modules which got the version through ‘jar --module-version’, and automatic modules like spring.core - as I understand the Requires.compiledVersion() gets a value when the dependency module has a version in module.getDescription().version() The latter is seen when requiring explicit modules, however requiring an automatic module does not fill in the compiledVersion? Why is that, even when the module.getDescription().version() shows a value (e.g. spring.core)? What is used for an automatic module such as spring.core to show 5.0.0.RELEASE as version? Thanks in advance for any helpful and insightful reply! Any thoughts, suggestions, remarks on my proof of concept itself are also more than welcome. Tom De Wolf