-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[MNG-8537] Keep Maven Namespace the same #10952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
@@ -417,7 +399,7 @@ void shouldHandleMissingModelVersion() throws Exception { | |||
@ValueSource( | |||
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate of 401?
@@ -417,7 +399,7 @@ void shouldHandleMissingModelVersion() throws Exception { | |||
@ValueSource( | |||
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", | |||
"https://maven.apache.org/POM/4.0.0", | |||
"https://maven.apache.org/POM/4.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is also 4.1
/** Maven 4.1.0 namespace URI */ | ||
public static final String MAVEN_4_1_0_NAMESPACE = "http://maven.apache.org/POM/4.1.0"; | ||
/** Maven namespace URI */ | ||
public static final String MAVEN_4_1_0_NAMESPACE = "http://maven.apache.org/POM/4.0.0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so no need for this const
Namespaces and model versions are not the same thing and do not serve the same purpose. This PR has two related effects:
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