Le samedi 14 mars 2026, 22:22:37 CET Elliotte Rusty Harold a écrit :
> On Sat, Mar 14, 2026 at 4:23 PM Hervé Boutemy <[email protected]> wrote:
> > I don't get the question
> > 
> > we are talking about what namespace should we define for
> > https://maven.apache.org/ref/4.0.0-rc-5/api/maven-api-model/maven.html
> > which is the new schema https://maven.apache.org/xsd/maven-4.1.0.xsd
> > = Maven 4.0.0 build POM
> 
> Schema != namespaces
> 
> Vocabularies are not expected to change the namespace because the
> schema changes. Most elements in the new schema are exactly the same
> as in the old one. A groupId is still a groupId. A dependency is still
> a dependency. A project is still a project. And so on. Adding some new
> elements to the pom.xml does not in itself change the meaning of the
> old elements. And modules and other new elements can happily exist in
> the old namespace.
> 
> > IIUC, logic promoted by Elliote is that there is one unique namespace
> > whatever the version of schema, tools detect the xsd to adapt to new
> > schema version, not to "versioned" namespace
> 
> No, tools do not detect the XSD. Overdependence on XSDs is another
> common antipattern in XML. Tools should look at the modelVersion
> element:
> 
> <modelVersion>4.0.0</modelVersion>

ohhhh:
<modelVersion>4.0.0</modelVersion>
(and 4.1.0 for Maven 4.0.x, independently from the xsd and/or the namespace)

ok, this is the aspect I did not get until now that it is written explicitely

IIUC, in our doc = the XML sample on top of
https://maven.apache.org/ref/3.9.14/maven-model/maven.html

and modelVersion description
https://maven.apache.org/ref/3.9.14/maven-model/maven.html#class_project

we should be more explicit that
WE EXPECT <modelVersion>4.0.0</modelVersion> AND NO OTHER VALUE

isn't it?

> 
> > so there is no notion of "extending existing namespace": there is one
> > unique namepsace, with multiple schema versions
> 
> Remember, the namespace URI, a.k.a. namespace name, is a property of
> an element or attribute, not of a schema. This is probably easier to
> grok if you ignore schemas completely. They are not necessary for
> processing, and have little impact on anything.

this is the type of theory that does not help rehashing over years and that 
forced me to just stop even trying to read the same sentences that felt like 
just not-actionable ranting


If I try to look at another case where we have some equivalent namespace 
topic: settings.xml
https://maven.apache.org/ref/3.9.14/maven-settings/settings.html

in that case, no modelVersion fiel, but changing namespace value is not a 
problem?
why?


And what about Maven repository metadata?
https://maven.apache.org/ref/3.9.14/maven-repository-metadata/repository-metadata.html
this one has a modelVersion attribute to the root element...




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to