Closed garretwilson closed 1 year ago
I just want to come back and say thought that this plugin is amazing. Thank you so much for creating it!! Please consider this ticket as an attempt to make something really good even better. The most important thing is that the plugin works, and it works like a charm.
Yeah, I agree it's a bit weird. It's for historical reasons. This plugin was initially released back in the day when Node v0.10.x
(I think) was the latest and greatest. Back then, they had the habit of prefixing all Node versions with v
. It was even stranger that npm
doesn't follow the same naming convention with the v
prefix.
You can see the v
prefix thing going on in their CDN: https://nodejs.org/dist/
The same v
prefix is not in the npm CDN https://registry.npmjs.org/npm/-/
The way this plugin works, is that it builds the download URL dynamically based on <nodeVersion>
. Therefore, it was a deliberate choice to explicitly use the v
prefix in the pom.xml
file. The reason is that if this plugin were to always add the v
for you in the URL, that could cause problems in the future, if Node.js ever decided to remove their v
from their version names. Looks like they never did, though, at least not yet! Again, this decision was made many years ago when Node was at 0.10.something. Most people were using JAWR for bundling. Grunt was bleeding edge, TypeScript was still 0.x.something. Well, anyways, here we are! That's the story of the v.
This is a small issue, but if I indicate the Node version like this:
I get a warning:
It is true that if there is no context, prefixing something with a
v
is the convention for indicating that it is a version. For example tagging a Git repository commit withv1.2.3
is preferable to1.2.3
, because you don't necessarily know what1.2.3
means.But here the name of the element is
<nodeVersion>
, and the name of the setting isnodeVersion
. There is no ambiguity about what1.2.3
means, and indicatingv1.2.3
as the value is redundant, as the setting name already indicates "version". Furthermore this is not the standard practice for maven dependency version indication; normally one does not indicatevā¦
in the value.Again this is a little thing, but it's a thing nevertheless. š