Closed NightOwl888 closed 2 years ago
The restriction is on MavenReference, as the error mentions.
Is it not the case that a dependency node requires a version?
Also, the dependencies are never "required in .NET". They are required if you attempt to use them, though.
If 'version' on a maven dependency coordinate isn't required, then yeah, we should remove the requirement. I sure thought it was though.
The POM defined above is the bare minimum that Maven allows.
groupId:artifactId:version
are all required fields (although, groupId and version do not need to be explicitly defined if they are inherited from a parent - more on inheritance later). The three fields act much like an address and timestamp in one. This marks a specific place in a repository, acting like a coordinate system for Maven projects
Looks like I was confused by the fact that some POM files use inheritance to derive the <version>
, thus being able to exclude the element in those cases. But at the end of the day, it is a required field.
As was reported in #2 and https://github.com/ikvm-revived/ikvm/issues/169, Maven doesn't always include dependencies that are "required" in .NET.
However, when adding these "extra" dependencies to a project, it is very difficult to work out what version of the dependency we are supposed to include. A POM project would simply exclude the
<version>
element and let Maven figure it out, but we can't do that because of validation requiring a version number onIkvmReference
.