ok, now back to action:
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

shouldn't we be more explicit in modelVersion description that
"Maven 3 expects <modelVersion>4.0.0</modelVersion> and no other value"?
(PR to come if feedback positive)


BTW, is there a default value?
I just tested with Maven 3.9 removing modelVersion from a pom.xml:
$ mvn clean
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'modelVersion' is missing. @ line 3, column 202

and trying with 3.0.0 value:
[FATAL] 'modelVersion' of '3.0.0' is older than the versions supported by this 
version of Maven: [4.0.0].

while with Maven 4.0.0-RC5
[ERROR]     'modelVersion' of '3.0.0' is older than the versions supported by 
this version of Maven: [4.0.0, 4.1.0].

but when I remove the modelVersion element, Maven 4.0.0-RC5 does not fail: this 
is not consistent.
perhaps it is part of https://github.com/apache/maven/pull/10952
I did not have time to study in details yet

On 2026/03/15 11:22:34 Elliotte Rusty Harold wrote:
> On Sun, Mar 15, 2026 at 9:10 AM Hervé Boutemy <[email protected]> wrote:
> 
> > > > so there is no notion of "extending existing namespace": there is one
> > > > unique namepsace, with multiple schema versions
> 
> Yes. This might help: namespaces are names. They are not vocabularies.
> A namespace does not define the names that have that namespace.
> 
> It's similar to last names of people. The name "Boutemy" or "Harold"
> in no way limits what additional people or first names might exist in
> the future that are associated with that last name. Nor does it define
> or list what first names exist are associated with that last name
> today. Similarly a namespace does not define, list, control, or limit
> what names appear in that namespace. A namespace is **not** a schema.
> It does not identify a schema. A single namespace might have no schema
> at all or many schema written in many different schema languages.
> 
> > 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?
> 
> Changing the namespace value is a problem. In this case I just haven't
> had a need to think or work much with settings.xml files. If someone
> did, this would cause issues. Just because no one happened to notice a
> mistake made in one place, doesn't mean it isn't a mistake, and
> certainly doesn't mean it isn't a much more problematic mistake in a
> more central place.
> 
> > 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...
> 
> If it's an attribute, use the attribute. No big deal.
> 
> -- 
> Elliotte Rusty Harold
> [email protected]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 

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

Reply via email to