Reputation: 3
I recently upgraded from Windows 8.1 to Windows 10.
And I installed Maven on my machine. When I checked the version of Maven by running mvn --version
it showed Windows 8.1.
I installed maven on windows 10 only.
What is happening here? Why is Maven unable to get current OS version?
Upvotes: 0
Views: 365
Reputation: 150208
Windows OS reports version codes that have to be translated to the name of a particular Windows release given by Microsoft's marketing team. For example, it will return 6.0 for Windows Vista and 6.3 for Windows 8.1
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx
The API does indeed return 10.0 for Windows 10, but Maven's code to translate the version number to the marketing name likely did not expect such consistency. Maven will likely be updated at some point in the future to correctly display Windows 10.
Upvotes: 1