rfscholte at apache.org
Sat Jul 8 18:11:17 UTC 2017
I'm talking about the concept of Versions in general, adding some examples.
Right now I'm working on the maven-javadoc-plugin which has a parsing
issue since b175, which is more in line with Runtime.Version. In the
future the plugin could switch to Runtime.Version, that why I had a look
this new class.
Providing getters for all parts of the version-string could block future
changes of the version scheme.
On Sat, 08 Jul 2017 19:44:11 +0200, Remi Forax <forax at univ-mlv.fr> wrote:
> Hi Robert,
> this is the JDK version as specified by JEP 223 , this is not an
> artifact version, this is the JDK (as a whole) version.
> The ModuleDescriptor.Version  is the module version, something like
> your artifact version.
> The JDK version is loosely related to a module version because they some
> version components like starting with 9.
> That's said, i'm not sure the JDK version is something that should be
> checked/compared in the code, after all people can build there own JDK
> with their own version.
> You can use the java.base version instead, there is a signing mechanism
> (the module hashes) that ensures that the jdk modules and the java.base
> module are compatible.
>   http://openjdk.java.net/jeps/223
> ----- Mail original -----
>> De: "Robert Scholte" <rfscholte at apache.org>
>> À: jpms-spec-experts at openjdk.java.net
>> Envoyé: Samedi 8 Juillet 2017 18:59:54
>> Objet: Runtime.Version
>> I'm kind of surprised by the number of methods of Runtime.Version:
>> Based on my experience with versions I would advice to reduce the number
>> of methods.
>> With Maven we had this interface:
>> However, in the end all those separate segments didn't add a thing and
>> actually causing unnecessary complex code in case we were doing other
>> implementations with ArtifactVersion. ArtifactVersion is quite an
>> important interface in our code, so there's no simple solution to
>> this mistake.
>> I'm really pleased that for Aether (which is now back at Maven as
>> Resolver) it is all reduced to this:
>> This is all we need: parsing + comparing (+ #toString()). If none of the
>> additional methods of Runtime.Version is used *yet*, you should consider
>> to remove them.
More information about the jpms-spec-observers