[MNG-8537] Keep Maven Namespace the same
Namespaces and model versions are not the same thing and do not serve the same purpose. This PR has two related effects:
- The namespace for all pom.xml files is now http://maven.apache.org/POM/4.0.0
- Namespaces are not used to infer model versions. That's the job of the modelVersion element
Fixing this opens up Maven to the large and valuable XML toolchain. It makes it much easier for developers to analyze, store, and manipulate pom.xml files from a variety of languages without depending on complex Maven APIs and tooling. It decouples the poms from the Java source code. It is no longer necessary to use Maven libraries to process poms.
On the Maven side, it removes a roadblock to using standard XML parsers like Xerces instead of maintaining a separate custom XML parser. The more we can fit into the standard toolchains, the easier development becomes.
fixes #10692
I've been pushing this for a long time, and the longer we wait the harder it gets to do. I'm not sure it can be done in 5.0
I've been pushing this for a long time, and the longer we wait the harder it gets to do. I'm not sure it can be done in 5.0
A few months, I know (January IIRC), but 4.0 was already on track since a long time IIRC (we just released RC-2).
Would you bring that to dev list ? we'll need to involve the whole community to choose between those two options. My point is that we already created a stabilisation branch for 4.0.0, while master is now targeting 4.1.0 already. This would also break any POMs that have been already been deployed on central with a 4.1.0 namespace.
Fwiw, the PR is incomplete. At first glance, the DefaultModelBuilder and ConsumerPomArtifactTransformer would require some modifications (and tests, since they should somehow fail with your changes but they're not).
Nothing should be deployed with the 4.0 namespace as it hasn't been released yet. If something is, I can live with that breakage. Of course, once 4.0 is released, it becomes far more damaging to change it.
FYI, a quick check of my inbox shows I've been raising red flags on this since at least 2019.