Conversation
gnodet
left a comment
There was a problem hiding this comment.
While I don't disagree with the change, I think this is not doable between rc-4 and ga. This is a major breaking change, so it should have been planned from the beginning when discussing 4.0, not at the last minute.
I'd defer that for 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. 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. |
| strings = { | ||
| "http://maven.apache.org/POM/4.0.0", | ||
| "http://maven.apache.org/POM/4.1.0", | ||
| "http://maven.apache.org/POM/4.0.0", |
| "http://maven.apache.org/POM/4.1.0", | ||
| "http://maven.apache.org/POM/4.0.0", | ||
| "https://maven.apache.org/POM/4.0.0", | ||
| "https://maven.apache.org/POM/4.1.0" |
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/UpgradeConstants.java
Show resolved
Hide resolved
|
INFO] There is 1 error reported by Checkstyle 9.3 with config/maven_checks_nocodestyle.xml ruleset. [ERROR] src/main/java/org/apache/maven/cling/invoker/mvnup/goals/ModelVersionUtils.java:[64,9] (coding) UnusedLocalVariable: Unused local variable 'modelVersionElement'. |
Namespaces and model versions are not the same thing and do not serve the same purpose.
This PR has two related effects:
modelVersionelementFixing 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