You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Guillaume Nodet <gn...@apache.org> on 2025/07/22 12:47:05 UTC

[DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Hi all,

I'm writing to initiate a discussion about an important decision regarding
Maven 4.0's namespace strategy. We have two competing approaches
represented by different pull requests, and the *primary question is about
timing and acceptable breakage* for this release cycle.
Background

As we approach Maven 4.0 GA (currently at RC-4), we have two PRs that
represent different philosophies:

   - *PR #2475*: Create a new modelVersion 4.2.0 (my approach, targeting
   4.1.0/master)
   - *PR #10952*: Keep Maven Namespace the same (@elharo's approach)

The Core Issue: Timing vs. Technical Merit

*My position:* I don't disagree with @elharo's proposed change from a
technical standpoint. The benefits are:

   - Adheres to XML namespace best practices
   - Makes XML processing tooling easier by not having to convert between
   namespaces

*However*, this represents a *major breaking change*. While my PR targets
4.1.0 (master branch), since we already have a stable branch for 4.0.0, the
timing question remains critical for our overall versioning strategy.
My Proposal: Defer to Maven 5.0

Instead of rushing this change into 4.0, I propose we:

   1. *Continue with my approach for Maven 4.1.0* (new modelVersion 4.2.0,
   already targeting master)
   2. *Plan properly for Maven 5.0* with a brand new namespace that we
   would then consider stable
   3. *Design the Maven 5.0 namespace from the ground up* with long-term
   stability in mind

This approach would give us the benefits @elharo is seeking while allowing
proper planning, testing, and ecosystem preparation.
Key Questions for the Community

   1. *Timing*: Should we introduce a major breaking change in the 4.x
   series, or wait for 5.0?
   2. *Risk tolerance*: What level of ecosystem disruption is acceptable
   for a 4.x release?
   3. *Long-term vision*: Would a properly planned Maven 5.0 namespace
   overhaul better serve our goals?

I'm interested in hearing the community's thoughts on this timing vs.
technical merit trade-off.

Best regards,
Guillaume Nodet
------------------------------

*References:*
PR #2475: https://github.com/apache/maven/pull/2475
PR #10952: https://github.com/apache/maven/pull/10952

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Hervé Boutemy <hb...@apache.org>.
wow, it feels strange to have that discussion in 2025 after 20 years of practice :)

it's what we promote through Modello for years
  https://codehaus-plexus.github.io/modello/modello.html
and what we do for each and every descriptor we write

changing the practice for POM = the most sensitive place - may be risky

we have many other descriptors to challenge the change: Modello itself, site


next: how breaking is this?
I suppose the impact is mostly for IDEs or editors, isn'it?
I'd love to have feedback from tool maintainers

if we do that change on POM, I'd love that we do the change on every descriptor that Maven ships: settings, toolchains, extensions, ...
but let's discuss and test on others parts of Maven: archetype, build cache extension, site, assembly, ... we have many places to test

and let time to decide for Maven itself

On 2025/07/22 12:47:05 Guillaume Nodet wrote:
> Hi all,
> 
> I'm writing to initiate a discussion about an important decision regarding
> Maven 4.0's namespace strategy. We have two competing approaches
> represented by different pull requests, and the *primary question is about
> timing and acceptable breakage* for this release cycle.
> Background
> 
> As we approach Maven 4.0 GA (currently at RC-4), we have two PRs that
> represent different philosophies:
> 
>    - *PR #2475*: Create a new modelVersion 4.2.0 (my approach, targeting
>    4.1.0/master)
>    - *PR #10952*: Keep Maven Namespace the same (@elharo's approach)
> 
> The Core Issue: Timing vs. Technical Merit
> 
> *My position:* I don't disagree with @elharo's proposed change from a
> technical standpoint. The benefits are:
> 
>    - Adheres to XML namespace best practices
>    - Makes XML processing tooling easier by not having to convert between
>    namespaces
> 
> *However*, this represents a *major breaking change*. While my PR targets
> 4.1.0 (master branch), since we already have a stable branch for 4.0.0, the
> timing question remains critical for our overall versioning strategy.
> My Proposal: Defer to Maven 5.0
> 
> Instead of rushing this change into 4.0, I propose we:
> 
>    1. *Continue with my approach for Maven 4.1.0* (new modelVersion 4.2.0,
>    already targeting master)
>    2. *Plan properly for Maven 5.0* with a brand new namespace that we
>    would then consider stable
>    3. *Design the Maven 5.0 namespace from the ground up* with long-term
>    stability in mind
> 
> This approach would give us the benefits @elharo is seeking while allowing
> proper planning, testing, and ecosystem preparation.
> Key Questions for the Community
> 
>    1. *Timing*: Should we introduce a major breaking change in the 4.x
>    series, or wait for 5.0?
>    2. *Risk tolerance*: What level of ecosystem disruption is acceptable
>    for a 4.x release?
>    3. *Long-term vision*: Would a properly planned Maven 5.0 namespace
>    overhaul better serve our goals?
> 
> I'm interested in hearing the community's thoughts on this timing vs.
> technical merit trade-off.
> 
> Best regards,
> Guillaume Nodet
> ------------------------------
> 
> *References:*
> PR #2475: https://github.com/apache/maven/pull/2475
> PR #10952: https://github.com/apache/maven/pull/10952
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Gary Gregory <ga...@gmail.com>.
Maybe send to the user list?

Gary

On Tue, Jul 22, 2025, 08:47 Guillaume Nodet <gn...@apache.org> wrote:

> Hi all,
>
> I'm writing to initiate a discussion about an important decision regarding
> Maven 4.0's namespace strategy. We have two competing approaches
> represented by different pull requests, and the *primary question is about
> timing and acceptable breakage* for this release cycle.
> Background
>
> As we approach Maven 4.0 GA (currently at RC-4), we have two PRs that
> represent different philosophies:
>
>    - *PR #2475*: Create a new modelVersion 4.2.0 (my approach, targeting
>    4.1.0/master)
>    - *PR #10952*: Keep Maven Namespace the same (@elharo's approach)
>
> The Core Issue: Timing vs. Technical Merit
>
> *My position:* I don't disagree with @elharo's proposed change from a
> technical standpoint. The benefits are:
>
>    - Adheres to XML namespace best practices
>    - Makes XML processing tooling easier by not having to convert between
>    namespaces
>
> *However*, this represents a *major breaking change*. While my PR targets
> 4.1.0 (master branch), since we already have a stable branch for 4.0.0, the
> timing question remains critical for our overall versioning strategy.
> My Proposal: Defer to Maven 5.0
>
> Instead of rushing this change into 4.0, I propose we:
>
>    1. *Continue with my approach for Maven 4.1.0* (new modelVersion 4.2.0,
>    already targeting master)
>    2. *Plan properly for Maven 5.0* with a brand new namespace that we
>    would then consider stable
>    3. *Design the Maven 5.0 namespace from the ground up* with long-term
>    stability in mind
>
> This approach would give us the benefits @elharo is seeking while allowing
> proper planning, testing, and ecosystem preparation.
> Key Questions for the Community
>
>    1. *Timing*: Should we introduce a major breaking change in the 4.x
>    series, or wait for 5.0?
>    2. *Risk tolerance*: What level of ecosystem disruption is acceptable
>    for a 4.x release?
>    3. *Long-term vision*: Would a properly planned Maven 5.0 namespace
>    overhaul better serve our goals?
>
> I'm interested in hearing the community's thoughts on this timing vs.
> technical merit trade-off.
>
> Best regards,
> Guillaume Nodet
> ------------------------------
>
> *References:*
> PR #2475: https://github.com/apache/maven/pull/2475
> PR #10952: https://github.com/apache/maven/pull/10952
>

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Per Nyfelt <pe...@nordnet.se>.
Personal opinion (as a maintainer of several maven based oss projects,
including some maven plugins): I think elharos approach is preferable and
don't think we should wait until 5.0 to address this.

Regards,
Per

On Tue, 22 Jul 2025 at 14:48, Guillaume Nodet <gn...@apache.org> wrote:

> Hi all,
>
> I'm writing to initiate a discussion about an important decision regarding
> Maven 4.0's namespace strategy. We have two competing approaches
> represented by different pull requests, and the *primary question is about
> timing and acceptable breakage* for this release cycle.
> Background
>
> As we approach Maven 4.0 GA (currently at RC-4), we have two PRs that
> represent different philosophies:
>
>    - *PR #2475*: Create a new modelVersion 4.2.0 (my approach, targeting
>    4.1.0/master)
>    - *PR #10952*: Keep Maven Namespace the same (@elharo's approach)
>
> The Core Issue: Timing vs. Technical Merit
>
> *My position:* I don't disagree with @elharo's proposed change from a
> technical standpoint. The benefits are:
>
>    - Adheres to XML namespace best practices
>    - Makes XML processing tooling easier by not having to convert between
>    namespaces
>
> *However*, this represents a *major breaking change*. While my PR targets
> 4.1.0 (master branch), since we already have a stable branch for 4.0.0, the
> timing question remains critical for our overall versioning strategy.
> My Proposal: Defer to Maven 5.0
>
> Instead of rushing this change into 4.0, I propose we:
>
>    1. *Continue with my approach for Maven 4.1.0* (new modelVersion 4.2.0,
>    already targeting master)
>    2. *Plan properly for Maven 5.0* with a brand new namespace that we
>    would then consider stable
>    3. *Design the Maven 5.0 namespace from the ground up* with long-term
>    stability in mind
>
> This approach would give us the benefits @elharo is seeking while allowing
> proper planning, testing, and ecosystem preparation.
> Key Questions for the Community
>
>    1. *Timing*: Should we introduce a major breaking change in the 4.x
>    series, or wait for 5.0?
>    2. *Risk tolerance*: What level of ecosystem disruption is acceptable
>    for a 4.x release?
>    3. *Long-term vision*: Would a properly planned Maven 5.0 namespace
>    overhaul better serve our goals?
>
> I'm interested in hearing the community's thoughts on this timing vs.
> technical merit trade-off.
>
> Best regards,
> Guillaume Nodet
> ------------------------------
>
> *References:*
> PR #2475: https://github.com/apache/maven/pull/2475
> PR #10952: https://github.com/apache/maven/pull/10952
>

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Tamás Cservenák <ta...@cservenak.net>.
IMO definitively defer Elliotte change.

We already have breaking changes like resolver package rename deferred on
purpose. as Maven4 must provide Maven3 backward compatibility.

Also, what we currently have is already not using plexus parser anymore.

My 5 cents
T

On Tue, Jul 22, 2025, 14:47 Guillaume Nodet <gn...@apache.org> wrote:

> Hi all,
>
> I'm writing to initiate a discussion about an important decision regarding
> Maven 4.0's namespace strategy. We have two competing approaches
> represented by different pull requests, and the *primary question is about
> timing and acceptable breakage* for this release cycle.
> Background
>
> As we approach Maven 4.0 GA (currently at RC-4), we have two PRs that
> represent different philosophies:
>
>    - *PR #2475*: Create a new modelVersion 4.2.0 (my approach, targeting
>    4.1.0/master)
>    - *PR #10952*: Keep Maven Namespace the same (@elharo's approach)
>
> The Core Issue: Timing vs. Technical Merit
>
> *My position:* I don't disagree with @elharo's proposed change from a
> technical standpoint. The benefits are:
>
>    - Adheres to XML namespace best practices
>    - Makes XML processing tooling easier by not having to convert between
>    namespaces
>
> *However*, this represents a *major breaking change*. While my PR targets
> 4.1.0 (master branch), since we already have a stable branch for 4.0.0, the
> timing question remains critical for our overall versioning strategy.
> My Proposal: Defer to Maven 5.0
>
> Instead of rushing this change into 4.0, I propose we:
>
>    1. *Continue with my approach for Maven 4.1.0* (new modelVersion 4.2.0,
>    already targeting master)
>    2. *Plan properly for Maven 5.0* with a brand new namespace that we
>    would then consider stable
>    3. *Design the Maven 5.0 namespace from the ground up* with long-term
>    stability in mind
>
> This approach would give us the benefits @elharo is seeking while allowing
> proper planning, testing, and ecosystem preparation.
> Key Questions for the Community
>
>    1. *Timing*: Should we introduce a major breaking change in the 4.x
>    series, or wait for 5.0?
>    2. *Risk tolerance*: What level of ecosystem disruption is acceptable
>    for a 4.x release?
>    3. *Long-term vision*: Would a properly planned Maven 5.0 namespace
>    overhaul better serve our goals?
>
> I'm interested in hearing the community's thoughts on this timing vs.
> technical merit trade-off.
>
> Best regards,
> Guillaume Nodet
> ------------------------------
>
> *References:*
> PR #2475: https://github.com/apache/maven/pull/2475
> PR #10952: https://github.com/apache/maven/pull/10952
>

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Gary Gregory <ga...@gmail.com>.
From this user's perspective, a major release is the best time to do this,
and 4.0 is the next one. Once I bump a project to 4.0 I plan on telling
downstream devs that 4.0 is required, no interoperability with 3.x.

I expect that going from 3.x to 4.0 will not be 100% seamless, despite best
intentions here 😉

Might as well bite the bullet IMO.

Gary

On Wed, Jul 23, 2025, 09:37 Elliotte Rusty Harold <el...@ibiblio.org>
wrote:

> On Wed, Jul 23, 2025 at 1:07 PM Tamás Cservenák <ta...@cservenak.net>
> wrote:
> >
> > To me your message sounds you assume model parsing == model building.
> > Dependency trees and XML parsing? Analyzing what is in project? Just as
> > users can use xpath or other standard tech?
> >
> > This is totally unrelated and POMs alone are most often even incomplete
> as
> > they have parents, imports and interpolation and profile activations and
> so
> > on.
> >
>
> This is an important point. The Maven repository system is more than
> Maven. The pom.xml is not just for Maven. Most obviously it is also
> used by gradle, Ivy, bazel, and other build tools. POMs are also
> consumed by static analyzers who want to figure out what dependency
> trees look like, most commonly whether there are vulnerable or banned
> dependencies but also for things like dependency convergence and
> necessary updates. There are others, and there would be many more if
> the pom format were easier to consume and process.
>
> At one point a large part of my day job was writing software to
> analyze and understand the dependency graph of various projects. We
> ended up spending probably several hundred thousand dollars worth of
> engineer time because we couldn't use standard XML tools for this task
> precisely due to the namespace problems. Google could afford to work
> around that, but a lot of organizations can't.
>
> I wish the repository system and pom format were not so tightly
> coupled to the Maven build tool, but that ship sailed long ago.
> Ideally the decision about when and whether to revise the pom.xml
> format would not be made not only by Apache Maven developers but
> instead include all the stakeholders: Gradle, Sonatype, Google,
> Oracle, and more. So far none of them have been heard from. We just
> have a very small group of active developers of one build tool making
> decisions for everyone. What we can do now is avoid making the problem
> even worse by introducing additional namespace URIs beyond what we
> already have.
>
> --
> Elliotte Rusty Harold
> elharo@ibiblio.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Le jeu. 24 juil. 2025 à 17:11, Guillaume Nodet <gn...@apache.org> a écrit :

> I don't get what you're saying Romain.
>
> I think building a project from sources without using Maven is a bad idea,
>

It is more consuming the pom without maven nor resolver, this is very
common and has some good reasons.
My point was that for these tools you can always use maven to create the
consumer pom when you do build from source so we do not break the
compatibility in terms of format, we just break the fact you can't read the
pom.xml from the project itself but this was broken way earlier when
polyglot had been a thing.
So at the end my point was that there is no relevant issue and we are good.


> it kinda means reinventing maven.
> Processing the build POM without relying on Maven libraries is also a bad
> idea for the same reason.
> Even reading the consumer POM and rebuilding the dependency tree without
> Maven is a bad idea.
>

But there is no real alternative in several cases and it is done a lot.
Agree prestaging the info with dependency plugin or alike can be a better
idea but is not always possible and sometimes you want other info - like
the plugins we dropped which is an issue in consumer pom ;).


>
> We need to make maven versatile enough to allow those usages.  It has
> already improved a lot with the new
> API which can already be used outside the Maven runtime to build effective
> model, resolve dependencies, etc..
>

How do I use maven from a node or rust app without doing an exec and
reusing native transport which has some advanced configuration (proxy,
ciphers, certs etc)?
If you are java we can debate it - but ultimately it will end with the same
issues, but maven is consumed by way more data and bringing maven is often
an issue, even for java apps, just cause of its stack or arch.
There are even apps  in container not able to write files so maven is not
an option.

So I think we are good and we provided mitigation mechanism (except for
plugins). No need to push more until we totally drop guava and friends plus
make resolver reactive where maybe we can go deeper in java integrations
but today it is satisfying IMHO.


>
> Guillaume
>
> Le jeu. 24 juil. 2025 à 16:43, Romain Manni-Bucau <rm...@gmail.com>
> a
> écrit :
>
> > No, when building you have the consumer pom locally too and anyway if we
> > say this is an issue we just revert everything and stay on 4.0.0 which is
> > very unlikely for all the reason we are discussing maven 4 so not sure we
> > have the choice to be frank.
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://x.com/rmannibucau> | .NET Blog
> > <https://dotnetbirdie.github.io/> | Blog <https://rmannibucau.github.io/
> >
> > | Old
> > Blog <http://rmannibucau.wordpress.com> | Github
> > <https://github.com/rmannibucau> | LinkedIn
> > <https://www.linkedin.com/in/rmannibucau> | Book
> > <
> >
> https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064
> > >
> >
> >
> > Le jeu. 24 juil. 2025 à 16:38, Sylwester Lachiewicz <
> slachiewicz@gmail.com
> > >
> > a écrit :
> >
> > > If I understand correctly - consumer pom is for consumers that accept
> > > binary artefacts. So do security reasons, if someone decides to build
> it
> > > internally from sources - this will not work and still needs to accept
> > > different build pom styles.
> > > We are aiming for build reproducibility anyway.
> > >
> > > Sylwester
> > >
> > > czw., 24 lip 2025, 16:12 użytkownik Romain Manni-Bucau <
> > > rmannibucau@gmail.com> napisał:
> > >
> > > > Not sure it changes anything, you can still build from source, get
> the
> > > > consumer pom and parse it.
> > > > What we should encourage for sure is to NOT do it for build pom
> within
> > > the
> > > > project since now we can change it anytime for new features
> (hopefully
> > > not
> > > > too often but we enabled it cause it was an issue).
> > > > Also enables projects to use whatever language/syntax they want.
> > > > So the only pivot format you have is the consumer pom and it doesn't
> > > > require a remote repository so all good for everybody I think.
> > > >
> > > > Romain Manni-Bucau
> > > > @rmannibucau <https://x.com/rmannibucau> | .NET Blog
> > > > <https://dotnetbirdie.github.io/> | Blog <
> > https://rmannibucau.github.io/
> > > >
> > > > | Old
> > > > Blog <http://rmannibucau.wordpress.com> | Github
> > > > <https://github.com/rmannibucau> | LinkedIn
> > > > <https://www.linkedin.com/in/rmannibucau> | Book
> > > > <
> > > >
> > >
> >
> https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064
> > > > >
> > > >
> > > >
> > > > Le jeu. 24 juil. 2025 à 15:50, Gary Gregory <ga...@gmail.com>
> a
> > > > écrit :
> > > >
> > > > > On Thu, Jul 24, 2025, 09:36 Elliotte Rusty Harold <
> > elharo@ibiblio.org>
> > > > > wrote:
> > > > >
> > > > > > It helps that the consumer pom still uses the old namespace, but
> > > > > > that's still not everything. Tools still need to analyze and
> > > > > > understand the build pom, not just the consumer pom. For
> instance,
> > > > > > organizations that are as paranoid about security as Google (and
> > with
> > > > > > good reason) build everything from source, and do not trust
> opaque
> > > > > > binary jars. Again, organizations that  large can afford to work
> > > > > > around multiple namespaces, but I would like to make this more
> > > > > > accessible for smaller developers that also want to build tools
> > that
> > > > > > try to comprehend the build structure.
> > > > > >
> > > > > > The more I dig into this the more I worry that this is hiding
> some
> > > > > > other questionable practices where until now no one has asked the
> > > > > > simple question, "Why are we doing it like this?" Two in
> particular
> > > > > > are starting to concern me:
> > > > > >
> > > > > > 1. Model versions are inferred from the namespace, enabling
> > conflicts
> > > > > > that wouldn't otherwise exist. A general sense of code hygiene
> > > > > > suggests that there should be exactly one element defining the
> > model
> > > > > > version, and if there are two they shouldn't be allowed to
> disagree
> > > > > > with each other. Otherwise, devs are in for some nasty debugging
> > > > > > sessions where they think they've set something only to see
> > different
> > > > > > behavior. It's needlessly complex.
> > > > > >
> > > > > > 2. It's not just a 4.0 and 4.1 namespace. Large parts of Maven
> code
> > > > > > appear to allow any namespace at all. E.g.
> > > > > > http://docbook.org/ns/docbook This one might confuse tools in
> both
> > > > > > directions: the ones looking for a pom and the ones looking for
> > > > > > whatever the namespace purports to be. I'm not completely sure
> what
> > > > > > the implications are here — what tools it would break or holes it
> > > > > > might open — but it's a big world, and attackers looking to
> > > compromise
> > > > > > systems are often more devious than me. And again we don't
> actually
> > > > > > gain anything useful by allowing multiple namespaces so locking
> > this
> > > > > > down feels prudent.
> > > > > >
> > > > > > Bottom line: I'm not hearing any technical reasons why we need or
> > > > > > should have two namespaces for what amount to the same elements.
> > The
> > > > > > primary objection to keeping the namespace is timing. Folks are
> > > tired,
> > > > > > and want to ship. I sympathize with that. However, I fall on the
> > side
> > > > > > of the line that would prefer to see getting this right now, even
> > at
> > > > > > the cost of delaying 4.0, rather than living with a needlessly
> > > complex
> > > > > > format for the remaining decades it's likely to be in the world.
> > > > > >
> > > > >
> > > > > Nice message! Thank you for the explainer. I feel this can be sold
> as
> > > > > hardening, it's not just a design issue.
> > > > >
> > > > > From this user's POV, I'd rather see 4.0 get this right as I expect
> > to
> > > do
> > > > > migration tweaks in a major release. 5.0 feels like a million years
> > > away.
> > > > > Changing this in a further 4.x feels like an unexpected breaking
> > > change.
> > > > >
> > > > > HTH,
> > > > > Gary
> > > > >
> > > > >
> > > > > > On Wed, Jul 23, 2025 at 6:38 PM Guillaume Nodet <
> gnodet@apache.org
> > >
> > > > > wrote:
> > > > > > >
> > > > > > > I think you missed an important feature of Maven 4: the
> consumer
> > > POM.
> > > > > > >
> > > > > > > In Maven 4, the consumer POM is what is deployed for the POM
> > > > > > accompanying a
> > > > > > > jar.
> > > > > > > That POM has a  http://maven.apache.org/POM/4.0.0  +
> > modelVersion
> > > =
> > > > > > 4.0.0
> > > > > > > so that it can be consumed  by Maven 3 and other tools, gradle,
> > > ivy,
> > > > > > etc...
> > > > > > > This POM is rewritten from the build POM which can have a
> > different
> > > > > model
> > > > > > > version,
> > > > > > > namespace, or language (i.e. not XML).
> > > > > > > So if your concern is about what is deployed as POM, then you
> > don't
> > > > > have
> > > > > > to
> > > > > > > worry about it.
> > > > > > >
> > > > > > > Le mer. 23 juil. 2025 à 15:37, Elliotte Rusty Harold <
> > > > > elharo@ibiblio.org>
> > > > > > a
> > > > > > > écrit :
> > > > > > >
> > > > > > > > On Wed, Jul 23, 2025 at 1:07 PM Tamás Cservenák <
> > > > tamas@cservenak.net
> > > > > >
> > > > > > > > wrote:
> > > > > > > > >
> > > > > > > > > To me your message sounds you assume model parsing == model
> > > > > building.
> > > > > > > > > Dependency trees and XML parsing? Analyzing what is in
> > project?
> > > > > Just
> > > > > > as
> > > > > > > > > users can use xpath or other standard tech?
> > > > > > > > >
> > > > > > > > > This is totally unrelated and POMs alone are most often
> even
> > > > > > incomplete
> > > > > > > > as
> > > > > > > > > they have parents, imports and interpolation and profile
> > > > > activations
> > > > > > and
> > > > > > > > so
> > > > > > > > > on.
> > > > > > > > >
> > > > > > > >
> > > > > > > > This is an important point. The Maven repository system is
> more
> > > > than
> > > > > > > > Maven. The pom.xml is not just for Maven. Most obviously it
> is
> > > also
> > > > > > > > used by gradle, Ivy, bazel, and other build tools. POMs are
> > also
> > > > > > > > consumed by static analyzers who want to figure out what
> > > dependency
> > > > > > > > trees look like, most commonly whether there are vulnerable
> or
> > > > banned
> > > > > > > > dependencies but also for things like dependency convergence
> > and
> > > > > > > > necessary updates. There are others, and there would be many
> > more
> > > > if
> > > > > > > > the pom format were easier to consume and process.
> > > > > > > >
> > > > > > > > At one point a large part of my day job was writing software
> to
> > > > > > > > analyze and understand the dependency graph of various
> > projects.
> > > We
> > > > > > > > ended up spending probably several hundred thousand dollars
> > worth
> > > > of
> > > > > > > > engineer time because we couldn't use standard XML tools for
> > this
> > > > > task
> > > > > > > > precisely due to the namespace problems. Google could afford
> to
> > > > work
> > > > > > > > around that, but a lot of organizations can't.
> > > > > > > >
> > > > > > >
> > > > > > > From the pom.xml, you have no simple way to get the dependency
> > > tree.
> > > > > > > Computing this tree is what the resolver does, and that's
> > > definitely
> > > > > not
> > > > > > a
> > > > > > > trivial task. We've simplified the consumer POM a bit in Maven
> 4
> > by
> > > > > > > flattening the POMs, so it's a bit easier to actually compute
> the
> > > > > > effective
> > > > > > > POM because you don't have to flatten the hierarchy.  But
> trying
> > to
> > > > > > > compute the dependency tree without Maven will very probably
> lead
> > > to
> > > > > > > a different tree than what Maven expects.
> > > > > > > Other build tools tend to use Maven Resolver to actually
> compute
> > > the
> > > > > > > dependency tree AFAIK.  Which is also why we want Maven to be
> > more
> > > > > > > reusable, and that's what the Maven 4 API will provide with a
> > > single
> > > > > API
> > > > > > > to access all Maven features, either internally or externally.
> > > > > > >
> > > > > > >
> > > > > > > > I wish the repository system and pom format were not so
> tightly
> > > > > > > > coupled to the Maven build tool, but that ship sailed long
> ago.
> > > > > > > > Ideally the decision about when and whether to revise the
> > pom.xml
> > > > > > > > format would not be made not only by Apache Maven developers
> > but
> > > > > > > > instead include all the stakeholders: Gradle, Sonatype,
> Google,
> > > > > > > > Oracle, and more. So far none of them have been heard from.
> We
> > > just
> > > > > > > > have a very small group of active developers of one build
> tool
> > > > making
> > > > > > > > decisions for everyone. What we can do now is avoid making
> the
> > > > > problem
> > > > > > > > even worse by introducing additional namespace URIs beyond
> what
> > > we
> > > > > > > > already have.
> > > > > > > >
> > > > > > >
> > > > > > > Again, that's the consumer side.  We did split the consumer and
> > the
> > > > > build
> > > > > > > POM. So, yes, the Maven community is deciding how the BUILD POM
> > is
> > > > > > > evolving, and I think that's fine.  I don't see why other
> people
> > > > would
> > > > > > have
> > > > > > > to say about which feature we want to add in a particular
> > version.
> > > > > > > That does not affect other consumers from Maven Central at all.
> > > > > > >
> > > > > > >
> > > > > > > > --
> > > > > > > > Elliotte Rusty Harold
> > > > > > > > elharo@ibiblio.org
> > > > > > > >
> > > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > > > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > ------------------------
> > > > > > > Guillaume Nodet
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Elliotte Rusty Harold
> > > > > > elharo@ibiblio.org
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
>
> --
> ------------------------
> Guillaume Nodet
>

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Guillaume Nodet <gn...@apache.org>.
I don't get what you're saying Romain.

I think building a project from sources without using Maven is a bad idea,
it kinda means reinventing maven.
Processing the build POM without relying on Maven libraries is also a bad
idea for the same reason.
Even reading the consumer POM and rebuilding the dependency tree without
Maven is a bad idea.

We need to make maven versatile enough to allow those usages.  It has
already improved a lot with the new
API which can already be used outside the Maven runtime to build effective
model, resolve dependencies, etc..

Guillaume

Le jeu. 24 juil. 2025 à 16:43, Romain Manni-Bucau <rm...@gmail.com> a
écrit :

> No, when building you have the consumer pom locally too and anyway if we
> say this is an issue we just revert everything and stay on 4.0.0 which is
> very unlikely for all the reason we are discussing maven 4 so not sure we
> have the choice to be frank.
>
> Romain Manni-Bucau
> @rmannibucau <https://x.com/rmannibucau> | .NET Blog
> <https://dotnetbirdie.github.io/> | Blog <https://rmannibucau.github.io/>
> | Old
> Blog <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> | LinkedIn
> <https://www.linkedin.com/in/rmannibucau> | Book
> <
> https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064
> >
>
>
> Le jeu. 24 juil. 2025 à 16:38, Sylwester Lachiewicz <slachiewicz@gmail.com
> >
> a écrit :
>
> > If I understand correctly - consumer pom is for consumers that accept
> > binary artefacts. So do security reasons, if someone decides to build it
> > internally from sources - this will not work and still needs to accept
> > different build pom styles.
> > We are aiming for build reproducibility anyway.
> >
> > Sylwester
> >
> > czw., 24 lip 2025, 16:12 użytkownik Romain Manni-Bucau <
> > rmannibucau@gmail.com> napisał:
> >
> > > Not sure it changes anything, you can still build from source, get the
> > > consumer pom and parse it.
> > > What we should encourage for sure is to NOT do it for build pom within
> > the
> > > project since now we can change it anytime for new features (hopefully
> > not
> > > too often but we enabled it cause it was an issue).
> > > Also enables projects to use whatever language/syntax they want.
> > > So the only pivot format you have is the consumer pom and it doesn't
> > > require a remote repository so all good for everybody I think.
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://x.com/rmannibucau> | .NET Blog
> > > <https://dotnetbirdie.github.io/> | Blog <
> https://rmannibucau.github.io/
> > >
> > > | Old
> > > Blog <http://rmannibucau.wordpress.com> | Github
> > > <https://github.com/rmannibucau> | LinkedIn
> > > <https://www.linkedin.com/in/rmannibucau> | Book
> > > <
> > >
> >
> https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064
> > > >
> > >
> > >
> > > Le jeu. 24 juil. 2025 à 15:50, Gary Gregory <ga...@gmail.com> a
> > > écrit :
> > >
> > > > On Thu, Jul 24, 2025, 09:36 Elliotte Rusty Harold <
> elharo@ibiblio.org>
> > > > wrote:
> > > >
> > > > > It helps that the consumer pom still uses the old namespace, but
> > > > > that's still not everything. Tools still need to analyze and
> > > > > understand the build pom, not just the consumer pom. For instance,
> > > > > organizations that are as paranoid about security as Google (and
> with
> > > > > good reason) build everything from source, and do not trust opaque
> > > > > binary jars. Again, organizations that  large can afford to work
> > > > > around multiple namespaces, but I would like to make this more
> > > > > accessible for smaller developers that also want to build tools
> that
> > > > > try to comprehend the build structure.
> > > > >
> > > > > The more I dig into this the more I worry that this is hiding some
> > > > > other questionable practices where until now no one has asked the
> > > > > simple question, "Why are we doing it like this?" Two in particular
> > > > > are starting to concern me:
> > > > >
> > > > > 1. Model versions are inferred from the namespace, enabling
> conflicts
> > > > > that wouldn't otherwise exist. A general sense of code hygiene
> > > > > suggests that there should be exactly one element defining the
> model
> > > > > version, and if there are two they shouldn't be allowed to disagree
> > > > > with each other. Otherwise, devs are in for some nasty debugging
> > > > > sessions where they think they've set something only to see
> different
> > > > > behavior. It's needlessly complex.
> > > > >
> > > > > 2. It's not just a 4.0 and 4.1 namespace. Large parts of Maven code
> > > > > appear to allow any namespace at all. E.g.
> > > > > http://docbook.org/ns/docbook This one might confuse tools in both
> > > > > directions: the ones looking for a pom and the ones looking for
> > > > > whatever the namespace purports to be. I'm not completely sure what
> > > > > the implications are here — what tools it would break or holes it
> > > > > might open — but it's a big world, and attackers looking to
> > compromise
> > > > > systems are often more devious than me. And again we don't actually
> > > > > gain anything useful by allowing multiple namespaces so locking
> this
> > > > > down feels prudent.
> > > > >
> > > > > Bottom line: I'm not hearing any technical reasons why we need or
> > > > > should have two namespaces for what amount to the same elements.
> The
> > > > > primary objection to keeping the namespace is timing. Folks are
> > tired,
> > > > > and want to ship. I sympathize with that. However, I fall on the
> side
> > > > > of the line that would prefer to see getting this right now, even
> at
> > > > > the cost of delaying 4.0, rather than living with a needlessly
> > complex
> > > > > format for the remaining decades it's likely to be in the world.
> > > > >
> > > >
> > > > Nice message! Thank you for the explainer. I feel this can be sold as
> > > > hardening, it's not just a design issue.
> > > >
> > > > From this user's POV, I'd rather see 4.0 get this right as I expect
> to
> > do
> > > > migration tweaks in a major release. 5.0 feels like a million years
> > away.
> > > > Changing this in a further 4.x feels like an unexpected breaking
> > change.
> > > >
> > > > HTH,
> > > > Gary
> > > >
> > > >
> > > > > On Wed, Jul 23, 2025 at 6:38 PM Guillaume Nodet <gnodet@apache.org
> >
> > > > wrote:
> > > > > >
> > > > > > I think you missed an important feature of Maven 4: the consumer
> > POM.
> > > > > >
> > > > > > In Maven 4, the consumer POM is what is deployed for the POM
> > > > > accompanying a
> > > > > > jar.
> > > > > > That POM has a  http://maven.apache.org/POM/4.0.0  +
> modelVersion
> > =
> > > > > 4.0.0
> > > > > > so that it can be consumed  by Maven 3 and other tools, gradle,
> > ivy,
> > > > > etc...
> > > > > > This POM is rewritten from the build POM which can have a
> different
> > > > model
> > > > > > version,
> > > > > > namespace, or language (i.e. not XML).
> > > > > > So if your concern is about what is deployed as POM, then you
> don't
> > > > have
> > > > > to
> > > > > > worry about it.
> > > > > >
> > > > > > Le mer. 23 juil. 2025 à 15:37, Elliotte Rusty Harold <
> > > > elharo@ibiblio.org>
> > > > > a
> > > > > > écrit :
> > > > > >
> > > > > > > On Wed, Jul 23, 2025 at 1:07 PM Tamás Cservenák <
> > > tamas@cservenak.net
> > > > >
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > To me your message sounds you assume model parsing == model
> > > > building.
> > > > > > > > Dependency trees and XML parsing? Analyzing what is in
> project?
> > > > Just
> > > > > as
> > > > > > > > users can use xpath or other standard tech?
> > > > > > > >
> > > > > > > > This is totally unrelated and POMs alone are most often even
> > > > > incomplete
> > > > > > > as
> > > > > > > > they have parents, imports and interpolation and profile
> > > > activations
> > > > > and
> > > > > > > so
> > > > > > > > on.
> > > > > > > >
> > > > > > >
> > > > > > > This is an important point. The Maven repository system is more
> > > than
> > > > > > > Maven. The pom.xml is not just for Maven. Most obviously it is
> > also
> > > > > > > used by gradle, Ivy, bazel, and other build tools. POMs are
> also
> > > > > > > consumed by static analyzers who want to figure out what
> > dependency
> > > > > > > trees look like, most commonly whether there are vulnerable or
> > > banned
> > > > > > > dependencies but also for things like dependency convergence
> and
> > > > > > > necessary updates. There are others, and there would be many
> more
> > > if
> > > > > > > the pom format were easier to consume and process.
> > > > > > >
> > > > > > > At one point a large part of my day job was writing software to
> > > > > > > analyze and understand the dependency graph of various
> projects.
> > We
> > > > > > > ended up spending probably several hundred thousand dollars
> worth
> > > of
> > > > > > > engineer time because we couldn't use standard XML tools for
> this
> > > > task
> > > > > > > precisely due to the namespace problems. Google could afford to
> > > work
> > > > > > > around that, but a lot of organizations can't.
> > > > > > >
> > > > > >
> > > > > > From the pom.xml, you have no simple way to get the dependency
> > tree.
> > > > > > Computing this tree is what the resolver does, and that's
> > definitely
> > > > not
> > > > > a
> > > > > > trivial task. We've simplified the consumer POM a bit in Maven 4
> by
> > > > > > flattening the POMs, so it's a bit easier to actually compute the
> > > > > effective
> > > > > > POM because you don't have to flatten the hierarchy.  But trying
> to
> > > > > > compute the dependency tree without Maven will very probably lead
> > to
> > > > > > a different tree than what Maven expects.
> > > > > > Other build tools tend to use Maven Resolver to actually compute
> > the
> > > > > > dependency tree AFAIK.  Which is also why we want Maven to be
> more
> > > > > > reusable, and that's what the Maven 4 API will provide with a
> > single
> > > > API
> > > > > > to access all Maven features, either internally or externally.
> > > > > >
> > > > > >
> > > > > > > I wish the repository system and pom format were not so tightly
> > > > > > > coupled to the Maven build tool, but that ship sailed long ago.
> > > > > > > Ideally the decision about when and whether to revise the
> pom.xml
> > > > > > > format would not be made not only by Apache Maven developers
> but
> > > > > > > instead include all the stakeholders: Gradle, Sonatype, Google,
> > > > > > > Oracle, and more. So far none of them have been heard from. We
> > just
> > > > > > > have a very small group of active developers of one build tool
> > > making
> > > > > > > decisions for everyone. What we can do now is avoid making the
> > > > problem
> > > > > > > even worse by introducing additional namespace URIs beyond what
> > we
> > > > > > > already have.
> > > > > > >
> > > > > >
> > > > > > Again, that's the consumer side.  We did split the consumer and
> the
> > > > build
> > > > > > POM. So, yes, the Maven community is deciding how the BUILD POM
> is
> > > > > > evolving, and I think that's fine.  I don't see why other people
> > > would
> > > > > have
> > > > > > to say about which feature we want to add in a particular
> version.
> > > > > > That does not affect other consumers from Maven Central at all.
> > > > > >
> > > > > >
> > > > > > > --
> > > > > > > Elliotte Rusty Harold
> > > > > > > elharo@ibiblio.org
> > > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > ------------------------
> > > > > > Guillaume Nodet
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Elliotte Rusty Harold
> > > > > elharo@ibiblio.org
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > >
> >
>


-- 
------------------------
Guillaume Nodet

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Romain Manni-Bucau <rm...@gmail.com>.
No, when building you have the consumer pom locally too and anyway if we
say this is an issue we just revert everything and stay on 4.0.0 which is
very unlikely for all the reason we are discussing maven 4 so not sure we
have the choice to be frank.

Romain Manni-Bucau
@rmannibucau <https://x.com/rmannibucau> | .NET Blog
<https://dotnetbirdie.github.io/> | Blog <https://rmannibucau.github.io/> | Old
Blog <http://rmannibucau.wordpress.com> | Github
<https://github.com/rmannibucau> | LinkedIn
<https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064>


Le jeu. 24 juil. 2025 à 16:38, Sylwester Lachiewicz <sl...@gmail.com>
a écrit :

> If I understand correctly - consumer pom is for consumers that accept
> binary artefacts. So do security reasons, if someone decides to build it
> internally from sources - this will not work and still needs to accept
> different build pom styles.
> We are aiming for build reproducibility anyway.
>
> Sylwester
>
> czw., 24 lip 2025, 16:12 użytkownik Romain Manni-Bucau <
> rmannibucau@gmail.com> napisał:
>
> > Not sure it changes anything, you can still build from source, get the
> > consumer pom and parse it.
> > What we should encourage for sure is to NOT do it for build pom within
> the
> > project since now we can change it anytime for new features (hopefully
> not
> > too often but we enabled it cause it was an issue).
> > Also enables projects to use whatever language/syntax they want.
> > So the only pivot format you have is the consumer pom and it doesn't
> > require a remote repository so all good for everybody I think.
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://x.com/rmannibucau> | .NET Blog
> > <https://dotnetbirdie.github.io/> | Blog <https://rmannibucau.github.io/
> >
> > | Old
> > Blog <http://rmannibucau.wordpress.com> | Github
> > <https://github.com/rmannibucau> | LinkedIn
> > <https://www.linkedin.com/in/rmannibucau> | Book
> > <
> >
> https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064
> > >
> >
> >
> > Le jeu. 24 juil. 2025 à 15:50, Gary Gregory <ga...@gmail.com> a
> > écrit :
> >
> > > On Thu, Jul 24, 2025, 09:36 Elliotte Rusty Harold <el...@ibiblio.org>
> > > wrote:
> > >
> > > > It helps that the consumer pom still uses the old namespace, but
> > > > that's still not everything. Tools still need to analyze and
> > > > understand the build pom, not just the consumer pom. For instance,
> > > > organizations that are as paranoid about security as Google (and with
> > > > good reason) build everything from source, and do not trust opaque
> > > > binary jars. Again, organizations that  large can afford to work
> > > > around multiple namespaces, but I would like to make this more
> > > > accessible for smaller developers that also want to build tools that
> > > > try to comprehend the build structure.
> > > >
> > > > The more I dig into this the more I worry that this is hiding some
> > > > other questionable practices where until now no one has asked the
> > > > simple question, "Why are we doing it like this?" Two in particular
> > > > are starting to concern me:
> > > >
> > > > 1. Model versions are inferred from the namespace, enabling conflicts
> > > > that wouldn't otherwise exist. A general sense of code hygiene
> > > > suggests that there should be exactly one element defining the model
> > > > version, and if there are two they shouldn't be allowed to disagree
> > > > with each other. Otherwise, devs are in for some nasty debugging
> > > > sessions where they think they've set something only to see different
> > > > behavior. It's needlessly complex.
> > > >
> > > > 2. It's not just a 4.0 and 4.1 namespace. Large parts of Maven code
> > > > appear to allow any namespace at all. E.g.
> > > > http://docbook.org/ns/docbook This one might confuse tools in both
> > > > directions: the ones looking for a pom and the ones looking for
> > > > whatever the namespace purports to be. I'm not completely sure what
> > > > the implications are here — what tools it would break or holes it
> > > > might open — but it's a big world, and attackers looking to
> compromise
> > > > systems are often more devious than me. And again we don't actually
> > > > gain anything useful by allowing multiple namespaces so locking this
> > > > down feels prudent.
> > > >
> > > > Bottom line: I'm not hearing any technical reasons why we need or
> > > > should have two namespaces for what amount to the same elements. The
> > > > primary objection to keeping the namespace is timing. Folks are
> tired,
> > > > and want to ship. I sympathize with that. However, I fall on the side
> > > > of the line that would prefer to see getting this right now, even at
> > > > the cost of delaying 4.0, rather than living with a needlessly
> complex
> > > > format for the remaining decades it's likely to be in the world.
> > > >
> > >
> > > Nice message! Thank you for the explainer. I feel this can be sold as
> > > hardening, it's not just a design issue.
> > >
> > > From this user's POV, I'd rather see 4.0 get this right as I expect to
> do
> > > migration tweaks in a major release. 5.0 feels like a million years
> away.
> > > Changing this in a further 4.x feels like an unexpected breaking
> change.
> > >
> > > HTH,
> > > Gary
> > >
> > >
> > > > On Wed, Jul 23, 2025 at 6:38 PM Guillaume Nodet <gn...@apache.org>
> > > wrote:
> > > > >
> > > > > I think you missed an important feature of Maven 4: the consumer
> POM.
> > > > >
> > > > > In Maven 4, the consumer POM is what is deployed for the POM
> > > > accompanying a
> > > > > jar.
> > > > > That POM has a  http://maven.apache.org/POM/4.0.0  + modelVersion
> =
> > > > 4.0.0
> > > > > so that it can be consumed  by Maven 3 and other tools, gradle,
> ivy,
> > > > etc...
> > > > > This POM is rewritten from the build POM which can have a different
> > > model
> > > > > version,
> > > > > namespace, or language (i.e. not XML).
> > > > > So if your concern is about what is deployed as POM, then you don't
> > > have
> > > > to
> > > > > worry about it.
> > > > >
> > > > > Le mer. 23 juil. 2025 à 15:37, Elliotte Rusty Harold <
> > > elharo@ibiblio.org>
> > > > a
> > > > > écrit :
> > > > >
> > > > > > On Wed, Jul 23, 2025 at 1:07 PM Tamás Cservenák <
> > tamas@cservenak.net
> > > >
> > > > > > wrote:
> > > > > > >
> > > > > > > To me your message sounds you assume model parsing == model
> > > building.
> > > > > > > Dependency trees and XML parsing? Analyzing what is in project?
> > > Just
> > > > as
> > > > > > > users can use xpath or other standard tech?
> > > > > > >
> > > > > > > This is totally unrelated and POMs alone are most often even
> > > > incomplete
> > > > > > as
> > > > > > > they have parents, imports and interpolation and profile
> > > activations
> > > > and
> > > > > > so
> > > > > > > on.
> > > > > > >
> > > > > >
> > > > > > This is an important point. The Maven repository system is more
> > than
> > > > > > Maven. The pom.xml is not just for Maven. Most obviously it is
> also
> > > > > > used by gradle, Ivy, bazel, and other build tools. POMs are also
> > > > > > consumed by static analyzers who want to figure out what
> dependency
> > > > > > trees look like, most commonly whether there are vulnerable or
> > banned
> > > > > > dependencies but also for things like dependency convergence and
> > > > > > necessary updates. There are others, and there would be many more
> > if
> > > > > > the pom format were easier to consume and process.
> > > > > >
> > > > > > At one point a large part of my day job was writing software to
> > > > > > analyze and understand the dependency graph of various projects.
> We
> > > > > > ended up spending probably several hundred thousand dollars worth
> > of
> > > > > > engineer time because we couldn't use standard XML tools for this
> > > task
> > > > > > precisely due to the namespace problems. Google could afford to
> > work
> > > > > > around that, but a lot of organizations can't.
> > > > > >
> > > > >
> > > > > From the pom.xml, you have no simple way to get the dependency
> tree.
> > > > > Computing this tree is what the resolver does, and that's
> definitely
> > > not
> > > > a
> > > > > trivial task. We've simplified the consumer POM a bit in Maven 4 by
> > > > > flattening the POMs, so it's a bit easier to actually compute the
> > > > effective
> > > > > POM because you don't have to flatten the hierarchy.  But trying to
> > > > > compute the dependency tree without Maven will very probably lead
> to
> > > > > a different tree than what Maven expects.
> > > > > Other build tools tend to use Maven Resolver to actually compute
> the
> > > > > dependency tree AFAIK.  Which is also why we want Maven to be more
> > > > > reusable, and that's what the Maven 4 API will provide with a
> single
> > > API
> > > > > to access all Maven features, either internally or externally.
> > > > >
> > > > >
> > > > > > I wish the repository system and pom format were not so tightly
> > > > > > coupled to the Maven build tool, but that ship sailed long ago.
> > > > > > Ideally the decision about when and whether to revise the pom.xml
> > > > > > format would not be made not only by Apache Maven developers but
> > > > > > instead include all the stakeholders: Gradle, Sonatype, Google,
> > > > > > Oracle, and more. So far none of them have been heard from. We
> just
> > > > > > have a very small group of active developers of one build tool
> > making
> > > > > > decisions for everyone. What we can do now is avoid making the
> > > problem
> > > > > > even worse by introducing additional namespace URIs beyond what
> we
> > > > > > already have.
> > > > > >
> > > > >
> > > > > Again, that's the consumer side.  We did split the consumer and the
> > > build
> > > > > POM. So, yes, the Maven community is deciding how the BUILD POM is
> > > > > evolving, and I think that's fine.  I don't see why other people
> > would
> > > > have
> > > > > to say about which feature we want to add in a particular version.
> > > > > That does not affect other consumers from Maven Central at all.
> > > > >
> > > > >
> > > > > > --
> > > > > > Elliotte Rusty Harold
> > > > > > elharo@ibiblio.org
> > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > ------------------------
> > > > > Guillaume Nodet
> > > >
> > > >
> > > >
> > > > --
> > > > Elliotte Rusty Harold
> > > > elharo@ibiblio.org
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > >
> > > >
> > >
> >
>

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Sylwester Lachiewicz <sl...@gmail.com>.
If I understand correctly - consumer pom is for consumers that accept
binary artefacts. So do security reasons, if someone decides to build it
internally from sources - this will not work and still needs to accept
different build pom styles.
We are aiming for build reproducibility anyway.

Sylwester

czw., 24 lip 2025, 16:12 użytkownik Romain Manni-Bucau <
rmannibucau@gmail.com> napisał:

> Not sure it changes anything, you can still build from source, get the
> consumer pom and parse it.
> What we should encourage for sure is to NOT do it for build pom within the
> project since now we can change it anytime for new features (hopefully not
> too often but we enabled it cause it was an issue).
> Also enables projects to use whatever language/syntax they want.
> So the only pivot format you have is the consumer pom and it doesn't
> require a remote repository so all good for everybody I think.
>
> Romain Manni-Bucau
> @rmannibucau <https://x.com/rmannibucau> | .NET Blog
> <https://dotnetbirdie.github.io/> | Blog <https://rmannibucau.github.io/>
> | Old
> Blog <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> | LinkedIn
> <https://www.linkedin.com/in/rmannibucau> | Book
> <
> https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064
> >
>
>
> Le jeu. 24 juil. 2025 à 15:50, Gary Gregory <ga...@gmail.com> a
> écrit :
>
> > On Thu, Jul 24, 2025, 09:36 Elliotte Rusty Harold <el...@ibiblio.org>
> > wrote:
> >
> > > It helps that the consumer pom still uses the old namespace, but
> > > that's still not everything. Tools still need to analyze and
> > > understand the build pom, not just the consumer pom. For instance,
> > > organizations that are as paranoid about security as Google (and with
> > > good reason) build everything from source, and do not trust opaque
> > > binary jars. Again, organizations that  large can afford to work
> > > around multiple namespaces, but I would like to make this more
> > > accessible for smaller developers that also want to build tools that
> > > try to comprehend the build structure.
> > >
> > > The more I dig into this the more I worry that this is hiding some
> > > other questionable practices where until now no one has asked the
> > > simple question, "Why are we doing it like this?" Two in particular
> > > are starting to concern me:
> > >
> > > 1. Model versions are inferred from the namespace, enabling conflicts
> > > that wouldn't otherwise exist. A general sense of code hygiene
> > > suggests that there should be exactly one element defining the model
> > > version, and if there are two they shouldn't be allowed to disagree
> > > with each other. Otherwise, devs are in for some nasty debugging
> > > sessions where they think they've set something only to see different
> > > behavior. It's needlessly complex.
> > >
> > > 2. It's not just a 4.0 and 4.1 namespace. Large parts of Maven code
> > > appear to allow any namespace at all. E.g.
> > > http://docbook.org/ns/docbook This one might confuse tools in both
> > > directions: the ones looking for a pom and the ones looking for
> > > whatever the namespace purports to be. I'm not completely sure what
> > > the implications are here — what tools it would break or holes it
> > > might open — but it's a big world, and attackers looking to compromise
> > > systems are often more devious than me. And again we don't actually
> > > gain anything useful by allowing multiple namespaces so locking this
> > > down feels prudent.
> > >
> > > Bottom line: I'm not hearing any technical reasons why we need or
> > > should have two namespaces for what amount to the same elements. The
> > > primary objection to keeping the namespace is timing. Folks are tired,
> > > and want to ship. I sympathize with that. However, I fall on the side
> > > of the line that would prefer to see getting this right now, even at
> > > the cost of delaying 4.0, rather than living with a needlessly complex
> > > format for the remaining decades it's likely to be in the world.
> > >
> >
> > Nice message! Thank you for the explainer. I feel this can be sold as
> > hardening, it's not just a design issue.
> >
> > From this user's POV, I'd rather see 4.0 get this right as I expect to do
> > migration tweaks in a major release. 5.0 feels like a million years away.
> > Changing this in a further 4.x feels like an unexpected breaking change.
> >
> > HTH,
> > Gary
> >
> >
> > > On Wed, Jul 23, 2025 at 6:38 PM Guillaume Nodet <gn...@apache.org>
> > wrote:
> > > >
> > > > I think you missed an important feature of Maven 4: the consumer POM.
> > > >
> > > > In Maven 4, the consumer POM is what is deployed for the POM
> > > accompanying a
> > > > jar.
> > > > That POM has a  http://maven.apache.org/POM/4.0.0  + modelVersion =
> > > 4.0.0
> > > > so that it can be consumed  by Maven 3 and other tools, gradle, ivy,
> > > etc...
> > > > This POM is rewritten from the build POM which can have a different
> > model
> > > > version,
> > > > namespace, or language (i.e. not XML).
> > > > So if your concern is about what is deployed as POM, then you don't
> > have
> > > to
> > > > worry about it.
> > > >
> > > > Le mer. 23 juil. 2025 à 15:37, Elliotte Rusty Harold <
> > elharo@ibiblio.org>
> > > a
> > > > écrit :
> > > >
> > > > > On Wed, Jul 23, 2025 at 1:07 PM Tamás Cservenák <
> tamas@cservenak.net
> > >
> > > > > wrote:
> > > > > >
> > > > > > To me your message sounds you assume model parsing == model
> > building.
> > > > > > Dependency trees and XML parsing? Analyzing what is in project?
> > Just
> > > as
> > > > > > users can use xpath or other standard tech?
> > > > > >
> > > > > > This is totally unrelated and POMs alone are most often even
> > > incomplete
> > > > > as
> > > > > > they have parents, imports and interpolation and profile
> > activations
> > > and
> > > > > so
> > > > > > on.
> > > > > >
> > > > >
> > > > > This is an important point. The Maven repository system is more
> than
> > > > > Maven. The pom.xml is not just for Maven. Most obviously it is also
> > > > > used by gradle, Ivy, bazel, and other build tools. POMs are also
> > > > > consumed by static analyzers who want to figure out what dependency
> > > > > trees look like, most commonly whether there are vulnerable or
> banned
> > > > > dependencies but also for things like dependency convergence and
> > > > > necessary updates. There are others, and there would be many more
> if
> > > > > the pom format were easier to consume and process.
> > > > >
> > > > > At one point a large part of my day job was writing software to
> > > > > analyze and understand the dependency graph of various projects. We
> > > > > ended up spending probably several hundred thousand dollars worth
> of
> > > > > engineer time because we couldn't use standard XML tools for this
> > task
> > > > > precisely due to the namespace problems. Google could afford to
> work
> > > > > around that, but a lot of organizations can't.
> > > > >
> > > >
> > > > From the pom.xml, you have no simple way to get the dependency tree.
> > > > Computing this tree is what the resolver does, and that's definitely
> > not
> > > a
> > > > trivial task. We've simplified the consumer POM a bit in Maven 4 by
> > > > flattening the POMs, so it's a bit easier to actually compute the
> > > effective
> > > > POM because you don't have to flatten the hierarchy.  But trying to
> > > > compute the dependency tree without Maven will very probably lead to
> > > > a different tree than what Maven expects.
> > > > Other build tools tend to use Maven Resolver to actually compute the
> > > > dependency tree AFAIK.  Which is also why we want Maven to be more
> > > > reusable, and that's what the Maven 4 API will provide with a single
> > API
> > > > to access all Maven features, either internally or externally.
> > > >
> > > >
> > > > > I wish the repository system and pom format were not so tightly
> > > > > coupled to the Maven build tool, but that ship sailed long ago.
> > > > > Ideally the decision about when and whether to revise the pom.xml
> > > > > format would not be made not only by Apache Maven developers but
> > > > > instead include all the stakeholders: Gradle, Sonatype, Google,
> > > > > Oracle, and more. So far none of them have been heard from. We just
> > > > > have a very small group of active developers of one build tool
> making
> > > > > decisions for everyone. What we can do now is avoid making the
> > problem
> > > > > even worse by introducing additional namespace URIs beyond what we
> > > > > already have.
> > > > >
> > > >
> > > > Again, that's the consumer side.  We did split the consumer and the
> > build
> > > > POM. So, yes, the Maven community is deciding how the BUILD POM is
> > > > evolving, and I think that's fine.  I don't see why other people
> would
> > > have
> > > > to say about which feature we want to add in a particular version.
> > > > That does not affect other consumers from Maven Central at all.
> > > >
> > > >
> > > > > --
> > > > > Elliotte Rusty Harold
> > > > > elharo@ibiblio.org
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > > >
> > > > >
> > > >
> > > > --
> > > > ------------------------
> > > > Guillaume Nodet
> > >
> > >
> > >
> > > --
> > > Elliotte Rusty Harold
> > > elharo@ibiblio.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
> >
>

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Not sure it changes anything, you can still build from source, get the
consumer pom and parse it.
What we should encourage for sure is to NOT do it for build pom within the
project since now we can change it anytime for new features (hopefully not
too often but we enabled it cause it was an issue).
Also enables projects to use whatever language/syntax they want.
So the only pivot format you have is the consumer pom and it doesn't
require a remote repository so all good for everybody I think.

Romain Manni-Bucau
@rmannibucau <https://x.com/rmannibucau> | .NET Blog
<https://dotnetbirdie.github.io/> | Blog <https://rmannibucau.github.io/> | Old
Blog <http://rmannibucau.wordpress.com> | Github
<https://github.com/rmannibucau> | LinkedIn
<https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064>


Le jeu. 24 juil. 2025 à 15:50, Gary Gregory <ga...@gmail.com> a
écrit :

> On Thu, Jul 24, 2025, 09:36 Elliotte Rusty Harold <el...@ibiblio.org>
> wrote:
>
> > It helps that the consumer pom still uses the old namespace, but
> > that's still not everything. Tools still need to analyze and
> > understand the build pom, not just the consumer pom. For instance,
> > organizations that are as paranoid about security as Google (and with
> > good reason) build everything from source, and do not trust opaque
> > binary jars. Again, organizations that  large can afford to work
> > around multiple namespaces, but I would like to make this more
> > accessible for smaller developers that also want to build tools that
> > try to comprehend the build structure.
> >
> > The more I dig into this the more I worry that this is hiding some
> > other questionable practices where until now no one has asked the
> > simple question, "Why are we doing it like this?" Two in particular
> > are starting to concern me:
> >
> > 1. Model versions are inferred from the namespace, enabling conflicts
> > that wouldn't otherwise exist. A general sense of code hygiene
> > suggests that there should be exactly one element defining the model
> > version, and if there are two they shouldn't be allowed to disagree
> > with each other. Otherwise, devs are in for some nasty debugging
> > sessions where they think they've set something only to see different
> > behavior. It's needlessly complex.
> >
> > 2. It's not just a 4.0 and 4.1 namespace. Large parts of Maven code
> > appear to allow any namespace at all. E.g.
> > http://docbook.org/ns/docbook This one might confuse tools in both
> > directions: the ones looking for a pom and the ones looking for
> > whatever the namespace purports to be. I'm not completely sure what
> > the implications are here — what tools it would break or holes it
> > might open — but it's a big world, and attackers looking to compromise
> > systems are often more devious than me. And again we don't actually
> > gain anything useful by allowing multiple namespaces so locking this
> > down feels prudent.
> >
> > Bottom line: I'm not hearing any technical reasons why we need or
> > should have two namespaces for what amount to the same elements. The
> > primary objection to keeping the namespace is timing. Folks are tired,
> > and want to ship. I sympathize with that. However, I fall on the side
> > of the line that would prefer to see getting this right now, even at
> > the cost of delaying 4.0, rather than living with a needlessly complex
> > format for the remaining decades it's likely to be in the world.
> >
>
> Nice message! Thank you for the explainer. I feel this can be sold as
> hardening, it's not just a design issue.
>
> From this user's POV, I'd rather see 4.0 get this right as I expect to do
> migration tweaks in a major release. 5.0 feels like a million years away.
> Changing this in a further 4.x feels like an unexpected breaking change.
>
> HTH,
> Gary
>
>
> > On Wed, Jul 23, 2025 at 6:38 PM Guillaume Nodet <gn...@apache.org>
> wrote:
> > >
> > > I think you missed an important feature of Maven 4: the consumer POM.
> > >
> > > In Maven 4, the consumer POM is what is deployed for the POM
> > accompanying a
> > > jar.
> > > That POM has a  http://maven.apache.org/POM/4.0.0  + modelVersion =
> > 4.0.0
> > > so that it can be consumed  by Maven 3 and other tools, gradle, ivy,
> > etc...
> > > This POM is rewritten from the build POM which can have a different
> model
> > > version,
> > > namespace, or language (i.e. not XML).
> > > So if your concern is about what is deployed as POM, then you don't
> have
> > to
> > > worry about it.
> > >
> > > Le mer. 23 juil. 2025 à 15:37, Elliotte Rusty Harold <
> elharo@ibiblio.org>
> > a
> > > écrit :
> > >
> > > > On Wed, Jul 23, 2025 at 1:07 PM Tamás Cservenák <tamas@cservenak.net
> >
> > > > wrote:
> > > > >
> > > > > To me your message sounds you assume model parsing == model
> building.
> > > > > Dependency trees and XML parsing? Analyzing what is in project?
> Just
> > as
> > > > > users can use xpath or other standard tech?
> > > > >
> > > > > This is totally unrelated and POMs alone are most often even
> > incomplete
> > > > as
> > > > > they have parents, imports and interpolation and profile
> activations
> > and
> > > > so
> > > > > on.
> > > > >
> > > >
> > > > This is an important point. The Maven repository system is more than
> > > > Maven. The pom.xml is not just for Maven. Most obviously it is also
> > > > used by gradle, Ivy, bazel, and other build tools. POMs are also
> > > > consumed by static analyzers who want to figure out what dependency
> > > > trees look like, most commonly whether there are vulnerable or banned
> > > > dependencies but also for things like dependency convergence and
> > > > necessary updates. There are others, and there would be many more if
> > > > the pom format were easier to consume and process.
> > > >
> > > > At one point a large part of my day job was writing software to
> > > > analyze and understand the dependency graph of various projects. We
> > > > ended up spending probably several hundred thousand dollars worth of
> > > > engineer time because we couldn't use standard XML tools for this
> task
> > > > precisely due to the namespace problems. Google could afford to work
> > > > around that, but a lot of organizations can't.
> > > >
> > >
> > > From the pom.xml, you have no simple way to get the dependency tree.
> > > Computing this tree is what the resolver does, and that's definitely
> not
> > a
> > > trivial task. We've simplified the consumer POM a bit in Maven 4 by
> > > flattening the POMs, so it's a bit easier to actually compute the
> > effective
> > > POM because you don't have to flatten the hierarchy.  But trying to
> > > compute the dependency tree without Maven will very probably lead to
> > > a different tree than what Maven expects.
> > > Other build tools tend to use Maven Resolver to actually compute the
> > > dependency tree AFAIK.  Which is also why we want Maven to be more
> > > reusable, and that's what the Maven 4 API will provide with a single
> API
> > > to access all Maven features, either internally or externally.
> > >
> > >
> > > > I wish the repository system and pom format were not so tightly
> > > > coupled to the Maven build tool, but that ship sailed long ago.
> > > > Ideally the decision about when and whether to revise the pom.xml
> > > > format would not be made not only by Apache Maven developers but
> > > > instead include all the stakeholders: Gradle, Sonatype, Google,
> > > > Oracle, and more. So far none of them have been heard from. We just
> > > > have a very small group of active developers of one build tool making
> > > > decisions for everyone. What we can do now is avoid making the
> problem
> > > > even worse by introducing additional namespace URIs beyond what we
> > > > already have.
> > > >
> > >
> > > Again, that's the consumer side.  We did split the consumer and the
> build
> > > POM. So, yes, the Maven community is deciding how the BUILD POM is
> > > evolving, and I think that's fine.  I don't see why other people would
> > have
> > > to say about which feature we want to add in a particular version.
> > > That does not affect other consumers from Maven Central at all.
> > >
> > >
> > > > --
> > > > Elliotte Rusty Harold
> > > > elharo@ibiblio.org
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: dev-help@maven.apache.org
> > > >
> > > >
> > >
> > > --
> > > ------------------------
> > > Guillaume Nodet
> >
> >
> >
> > --
> > Elliotte Rusty Harold
> > elharo@ibiblio.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Gary Gregory <ga...@gmail.com>.
On Thu, Jul 24, 2025, 09:36 Elliotte Rusty Harold <el...@ibiblio.org>
wrote:

> It helps that the consumer pom still uses the old namespace, but
> that's still not everything. Tools still need to analyze and
> understand the build pom, not just the consumer pom. For instance,
> organizations that are as paranoid about security as Google (and with
> good reason) build everything from source, and do not trust opaque
> binary jars. Again, organizations that  large can afford to work
> around multiple namespaces, but I would like to make this more
> accessible for smaller developers that also want to build tools that
> try to comprehend the build structure.
>
> The more I dig into this the more I worry that this is hiding some
> other questionable practices where until now no one has asked the
> simple question, "Why are we doing it like this?" Two in particular
> are starting to concern me:
>
> 1. Model versions are inferred from the namespace, enabling conflicts
> that wouldn't otherwise exist. A general sense of code hygiene
> suggests that there should be exactly one element defining the model
> version, and if there are two they shouldn't be allowed to disagree
> with each other. Otherwise, devs are in for some nasty debugging
> sessions where they think they've set something only to see different
> behavior. It's needlessly complex.
>
> 2. It's not just a 4.0 and 4.1 namespace. Large parts of Maven code
> appear to allow any namespace at all. E.g.
> http://docbook.org/ns/docbook This one might confuse tools in both
> directions: the ones looking for a pom and the ones looking for
> whatever the namespace purports to be. I'm not completely sure what
> the implications are here — what tools it would break or holes it
> might open — but it's a big world, and attackers looking to compromise
> systems are often more devious than me. And again we don't actually
> gain anything useful by allowing multiple namespaces so locking this
> down feels prudent.
>
> Bottom line: I'm not hearing any technical reasons why we need or
> should have two namespaces for what amount to the same elements. The
> primary objection to keeping the namespace is timing. Folks are tired,
> and want to ship. I sympathize with that. However, I fall on the side
> of the line that would prefer to see getting this right now, even at
> the cost of delaying 4.0, rather than living with a needlessly complex
> format for the remaining decades it's likely to be in the world.
>

Nice message! Thank you for the explainer. I feel this can be sold as
hardening, it's not just a design issue.

From this user's POV, I'd rather see 4.0 get this right as I expect to do
migration tweaks in a major release. 5.0 feels like a million years away.
Changing this in a further 4.x feels like an unexpected breaking change.

HTH,
Gary


> On Wed, Jul 23, 2025 at 6:38 PM Guillaume Nodet <gn...@apache.org> wrote:
> >
> > I think you missed an important feature of Maven 4: the consumer POM.
> >
> > In Maven 4, the consumer POM is what is deployed for the POM
> accompanying a
> > jar.
> > That POM has a  http://maven.apache.org/POM/4.0.0  + modelVersion =
> 4.0.0
> > so that it can be consumed  by Maven 3 and other tools, gradle, ivy,
> etc...
> > This POM is rewritten from the build POM which can have a different model
> > version,
> > namespace, or language (i.e. not XML).
> > So if your concern is about what is deployed as POM, then you don't have
> to
> > worry about it.
> >
> > Le mer. 23 juil. 2025 à 15:37, Elliotte Rusty Harold <el...@ibiblio.org>
> a
> > écrit :
> >
> > > On Wed, Jul 23, 2025 at 1:07 PM Tamás Cservenák <ta...@cservenak.net>
> > > wrote:
> > > >
> > > > To me your message sounds you assume model parsing == model building.
> > > > Dependency trees and XML parsing? Analyzing what is in project? Just
> as
> > > > users can use xpath or other standard tech?
> > > >
> > > > This is totally unrelated and POMs alone are most often even
> incomplete
> > > as
> > > > they have parents, imports and interpolation and profile activations
> and
> > > so
> > > > on.
> > > >
> > >
> > > This is an important point. The Maven repository system is more than
> > > Maven. The pom.xml is not just for Maven. Most obviously it is also
> > > used by gradle, Ivy, bazel, and other build tools. POMs are also
> > > consumed by static analyzers who want to figure out what dependency
> > > trees look like, most commonly whether there are vulnerable or banned
> > > dependencies but also for things like dependency convergence and
> > > necessary updates. There are others, and there would be many more if
> > > the pom format were easier to consume and process.
> > >
> > > At one point a large part of my day job was writing software to
> > > analyze and understand the dependency graph of various projects. We
> > > ended up spending probably several hundred thousand dollars worth of
> > > engineer time because we couldn't use standard XML tools for this task
> > > precisely due to the namespace problems. Google could afford to work
> > > around that, but a lot of organizations can't.
> > >
> >
> > From the pom.xml, you have no simple way to get the dependency tree.
> > Computing this tree is what the resolver does, and that's definitely not
> a
> > trivial task. We've simplified the consumer POM a bit in Maven 4 by
> > flattening the POMs, so it's a bit easier to actually compute the
> effective
> > POM because you don't have to flatten the hierarchy.  But trying to
> > compute the dependency tree without Maven will very probably lead to
> > a different tree than what Maven expects.
> > Other build tools tend to use Maven Resolver to actually compute the
> > dependency tree AFAIK.  Which is also why we want Maven to be more
> > reusable, and that's what the Maven 4 API will provide with a single API
> > to access all Maven features, either internally or externally.
> >
> >
> > > I wish the repository system and pom format were not so tightly
> > > coupled to the Maven build tool, but that ship sailed long ago.
> > > Ideally the decision about when and whether to revise the pom.xml
> > > format would not be made not only by Apache Maven developers but
> > > instead include all the stakeholders: Gradle, Sonatype, Google,
> > > Oracle, and more. So far none of them have been heard from. We just
> > > have a very small group of active developers of one build tool making
> > > decisions for everyone. What we can do now is avoid making the problem
> > > even worse by introducing additional namespace URIs beyond what we
> > > already have.
> > >
> >
> > Again, that's the consumer side.  We did split the consumer and the build
> > POM. So, yes, the Maven community is deciding how the BUILD POM is
> > evolving, and I think that's fine.  I don't see why other people would
> have
> > to say about which feature we want to add in a particular version.
> > That does not affect other consumers from Maven Central at all.
> >
> >
> > > --
> > > Elliotte Rusty Harold
> > > elharo@ibiblio.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
> >
> > --
> > ------------------------
> > Guillaume Nodet
>
>
>
> --
> Elliotte Rusty Harold
> elharo@ibiblio.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Elliotte Rusty Harold <el...@ibiblio.org>.
It helps that the consumer pom still uses the old namespace, but
that's still not everything. Tools still need to analyze and
understand the build pom, not just the consumer pom. For instance,
organizations that are as paranoid about security as Google (and with
good reason) build everything from source, and do not trust opaque
binary jars. Again, organizations that  large can afford to work
around multiple namespaces, but I would like to make this more
accessible for smaller developers that also want to build tools that
try to comprehend the build structure.

The more I dig into this the more I worry that this is hiding some
other questionable practices where until now no one has asked the
simple question, "Why are we doing it like this?" Two in particular
are starting to concern me:

1. Model versions are inferred from the namespace, enabling conflicts
that wouldn't otherwise exist. A general sense of code hygiene
suggests that there should be exactly one element defining the model
version, and if there are two they shouldn't be allowed to disagree
with each other. Otherwise, devs are in for some nasty debugging
sessions where they think they've set something only to see different
behavior. It's needlessly complex.

2. It's not just a 4.0 and 4.1 namespace. Large parts of Maven code
appear to allow any namespace at all. E.g.
http://docbook.org/ns/docbook This one might confuse tools in both
directions: the ones looking for a pom and the ones looking for
whatever the namespace purports to be. I'm not completely sure what
the implications are here — what tools it would break or holes it
might open — but it's a big world, and attackers looking to compromise
systems are often more devious than me. And again we don't actually
gain anything useful by allowing multiple namespaces so locking this
down feels prudent.

Bottom line: I'm not hearing any technical reasons why we need or
should have two namespaces for what amount to the same elements. The
primary objection to keeping the namespace is timing. Folks are tired,
and want to ship. I sympathize with that. However, I fall on the side
of the line that would prefer to see getting this right now, even at
the cost of delaying 4.0, rather than living with a needlessly complex
format for the remaining decades it's likely to be in the world.

On Wed, Jul 23, 2025 at 6:38 PM Guillaume Nodet <gn...@apache.org> wrote:
>
> I think you missed an important feature of Maven 4: the consumer POM.
>
> In Maven 4, the consumer POM is what is deployed for the POM accompanying a
> jar.
> That POM has a  http://maven.apache.org/POM/4.0.0  + modelVersion = 4.0.0
> so that it can be consumed  by Maven 3 and other tools, gradle, ivy, etc...
> This POM is rewritten from the build POM which can have a different model
> version,
> namespace, or language (i.e. not XML).
> So if your concern is about what is deployed as POM, then you don't have to
> worry about it.
>
> Le mer. 23 juil. 2025 à 15:37, Elliotte Rusty Harold <el...@ibiblio.org> a
> écrit :
>
> > On Wed, Jul 23, 2025 at 1:07 PM Tamás Cservenák <ta...@cservenak.net>
> > wrote:
> > >
> > > To me your message sounds you assume model parsing == model building.
> > > Dependency trees and XML parsing? Analyzing what is in project? Just as
> > > users can use xpath or other standard tech?
> > >
> > > This is totally unrelated and POMs alone are most often even incomplete
> > as
> > > they have parents, imports and interpolation and profile activations and
> > so
> > > on.
> > >
> >
> > This is an important point. The Maven repository system is more than
> > Maven. The pom.xml is not just for Maven. Most obviously it is also
> > used by gradle, Ivy, bazel, and other build tools. POMs are also
> > consumed by static analyzers who want to figure out what dependency
> > trees look like, most commonly whether there are vulnerable or banned
> > dependencies but also for things like dependency convergence and
> > necessary updates. There are others, and there would be many more if
> > the pom format were easier to consume and process.
> >
> > At one point a large part of my day job was writing software to
> > analyze and understand the dependency graph of various projects. We
> > ended up spending probably several hundred thousand dollars worth of
> > engineer time because we couldn't use standard XML tools for this task
> > precisely due to the namespace problems. Google could afford to work
> > around that, but a lot of organizations can't.
> >
>
> From the pom.xml, you have no simple way to get the dependency tree.
> Computing this tree is what the resolver does, and that's definitely not a
> trivial task. We've simplified the consumer POM a bit in Maven 4 by
> flattening the POMs, so it's a bit easier to actually compute the effective
> POM because you don't have to flatten the hierarchy.  But trying to
> compute the dependency tree without Maven will very probably lead to
> a different tree than what Maven expects.
> Other build tools tend to use Maven Resolver to actually compute the
> dependency tree AFAIK.  Which is also why we want Maven to be more
> reusable, and that's what the Maven 4 API will provide with a single API
> to access all Maven features, either internally or externally.
>
>
> > I wish the repository system and pom format were not so tightly
> > coupled to the Maven build tool, but that ship sailed long ago.
> > Ideally the decision about when and whether to revise the pom.xml
> > format would not be made not only by Apache Maven developers but
> > instead include all the stakeholders: Gradle, Sonatype, Google,
> > Oracle, and more. So far none of them have been heard from. We just
> > have a very small group of active developers of one build tool making
> > decisions for everyone. What we can do now is avoid making the problem
> > even worse by introducing additional namespace URIs beyond what we
> > already have.
> >
>
> Again, that's the consumer side.  We did split the consumer and the build
> POM. So, yes, the Maven community is deciding how the BUILD POM is
> evolving, and I think that's fine.  I don't see why other people would have
> to say about which feature we want to add in a particular version.
> That does not affect other consumers from Maven Central at all.
>
>
> > --
> > Elliotte Rusty Harold
> > elharo@ibiblio.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>
> --
> ------------------------
> Guillaume Nodet



-- 
Elliotte Rusty Harold
elharo@ibiblio.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Guillaume Nodet <gn...@apache.org>.
I think you missed an important feature of Maven 4: the consumer POM.

In Maven 4, the consumer POM is what is deployed for the POM accompanying a
jar.
That POM has a  http://maven.apache.org/POM/4.0.0  + modelVersion = 4.0.0
so that it can be consumed  by Maven 3 and other tools, gradle, ivy, etc...
This POM is rewritten from the build POM which can have a different model
version,
namespace, or language (i.e. not XML).
So if your concern is about what is deployed as POM, then you don't have to
worry about it.

Le mer. 23 juil. 2025 à 15:37, Elliotte Rusty Harold <el...@ibiblio.org> a
écrit :

> On Wed, Jul 23, 2025 at 1:07 PM Tamás Cservenák <ta...@cservenak.net>
> wrote:
> >
> > To me your message sounds you assume model parsing == model building.
> > Dependency trees and XML parsing? Analyzing what is in project? Just as
> > users can use xpath or other standard tech?
> >
> > This is totally unrelated and POMs alone are most often even incomplete
> as
> > they have parents, imports and interpolation and profile activations and
> so
> > on.
> >
>
> This is an important point. The Maven repository system is more than
> Maven. The pom.xml is not just for Maven. Most obviously it is also
> used by gradle, Ivy, bazel, and other build tools. POMs are also
> consumed by static analyzers who want to figure out what dependency
> trees look like, most commonly whether there are vulnerable or banned
> dependencies but also for things like dependency convergence and
> necessary updates. There are others, and there would be many more if
> the pom format were easier to consume and process.
>
> At one point a large part of my day job was writing software to
> analyze and understand the dependency graph of various projects. We
> ended up spending probably several hundred thousand dollars worth of
> engineer time because we couldn't use standard XML tools for this task
> precisely due to the namespace problems. Google could afford to work
> around that, but a lot of organizations can't.
>

From the pom.xml, you have no simple way to get the dependency tree.
Computing this tree is what the resolver does, and that's definitely not a
trivial task. We've simplified the consumer POM a bit in Maven 4 by
flattening the POMs, so it's a bit easier to actually compute the effective
POM because you don't have to flatten the hierarchy.  But trying to
compute the dependency tree without Maven will very probably lead to
a different tree than what Maven expects.
Other build tools tend to use Maven Resolver to actually compute the
dependency tree AFAIK.  Which is also why we want Maven to be more
reusable, and that's what the Maven 4 API will provide with a single API
to access all Maven features, either internally or externally.


> I wish the repository system and pom format were not so tightly
> coupled to the Maven build tool, but that ship sailed long ago.
> Ideally the decision about when and whether to revise the pom.xml
> format would not be made not only by Apache Maven developers but
> instead include all the stakeholders: Gradle, Sonatype, Google,
> Oracle, and more. So far none of them have been heard from. We just
> have a very small group of active developers of one build tool making
> decisions for everyone. What we can do now is avoid making the problem
> even worse by introducing additional namespace URIs beyond what we
> already have.
>

Again, that's the consumer side.  We did split the consumer and the build
POM. So, yes, the Maven community is deciding how the BUILD POM is
evolving, and I think that's fine.  I don't see why other people would have
to say about which feature we want to add in a particular version.
That does not affect other consumers from Maven Central at all.


> --
> Elliotte Rusty Harold
> elharo@ibiblio.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

-- 
------------------------
Guillaume Nodet

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Tamás Cservenák <ta...@cservenak.net>.
Bingo, i forgot that: Elliotte is mixing this one as well. I am still
unsure what he talks about, but if he talks about Maven Central, all this
discussion is futile.



On Wed, Jul 23, 2025, 16:12 Romain Manni-Bucau <rm...@gmail.com>
wrote:

> I'm not sure I grasp all the discussion so maybe i'll say something off but
> for me deployment model should stay 4.0.0 for that exact reason (we have
> too much consumer out there and if we are moving namespaces at need it will
> break too often IMHO).
> For the build itself I'm tempted to move to whatever fits maven when needed
> so 5.0.0 it ok now while we still publish 4.0.0.
>
> Romain Manni-Bucau
> @rmannibucau <https://x.com/rmannibucau> | .NET Blog
> <https://dotnetbirdie.github.io/> | Blog <https://rmannibucau.github.io/>
> | Old
> Blog <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> | LinkedIn
> <https://www.linkedin.com/in/rmannibucau> | Book
> <
> https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064
> >
>
>
> Le mer. 23 juil. 2025 à 15:38, Elliotte Rusty Harold <el...@ibiblio.org>
> a
> écrit :
>
> > On Wed, Jul 23, 2025 at 1:07 PM Tamás Cservenák <ta...@cservenak.net>
> > wrote:
> > >
> > > To me your message sounds you assume model parsing == model building.
> > > Dependency trees and XML parsing? Analyzing what is in project? Just as
> > > users can use xpath or other standard tech?
> > >
> > > This is totally unrelated and POMs alone are most often even incomplete
> > as
> > > they have parents, imports and interpolation and profile activations
> and
> > so
> > > on.
> > >
> >
> > This is an important point. The Maven repository system is more than
> > Maven. The pom.xml is not just for Maven. Most obviously it is also
> > used by gradle, Ivy, bazel, and other build tools. POMs are also
> > consumed by static analyzers who want to figure out what dependency
> > trees look like, most commonly whether there are vulnerable or banned
> > dependencies but also for things like dependency convergence and
> > necessary updates. There are others, and there would be many more if
> > the pom format were easier to consume and process.
> >
> > At one point a large part of my day job was writing software to
> > analyze and understand the dependency graph of various projects. We
> > ended up spending probably several hundred thousand dollars worth of
> > engineer time because we couldn't use standard XML tools for this task
> > precisely due to the namespace problems. Google could afford to work
> > around that, but a lot of organizations can't.
> >
> > I wish the repository system and pom format were not so tightly
> > coupled to the Maven build tool, but that ship sailed long ago.
> > Ideally the decision about when and whether to revise the pom.xml
> > format would not be made not only by Apache Maven developers but
> > instead include all the stakeholders: Gradle, Sonatype, Google,
> > Oracle, and more. So far none of them have been heard from. We just
> > have a very small group of active developers of one build tool making
> > decisions for everyone. What we can do now is avoid making the problem
> > even worse by introducing additional namespace URIs beyond what we
> > already have.
> >
> > --
> > Elliotte Rusty Harold
> > elharo@ibiblio.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
>

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I'm not sure I grasp all the discussion so maybe i'll say something off but
for me deployment model should stay 4.0.0 for that exact reason (we have
too much consumer out there and if we are moving namespaces at need it will
break too often IMHO).
For the build itself I'm tempted to move to whatever fits maven when needed
so 5.0.0 it ok now while we still publish 4.0.0.

Romain Manni-Bucau
@rmannibucau <https://x.com/rmannibucau> | .NET Blog
<https://dotnetbirdie.github.io/> | Blog <https://rmannibucau.github.io/> | Old
Blog <http://rmannibucau.wordpress.com> | Github
<https://github.com/rmannibucau> | LinkedIn
<https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/en-us/product/java-ee-8-high-performance-9781788473064>


Le mer. 23 juil. 2025 à 15:38, Elliotte Rusty Harold <el...@ibiblio.org> a
écrit :

> On Wed, Jul 23, 2025 at 1:07 PM Tamás Cservenák <ta...@cservenak.net>
> wrote:
> >
> > To me your message sounds you assume model parsing == model building.
> > Dependency trees and XML parsing? Analyzing what is in project? Just as
> > users can use xpath or other standard tech?
> >
> > This is totally unrelated and POMs alone are most often even incomplete
> as
> > they have parents, imports and interpolation and profile activations and
> so
> > on.
> >
>
> This is an important point. The Maven repository system is more than
> Maven. The pom.xml is not just for Maven. Most obviously it is also
> used by gradle, Ivy, bazel, and other build tools. POMs are also
> consumed by static analyzers who want to figure out what dependency
> trees look like, most commonly whether there are vulnerable or banned
> dependencies but also for things like dependency convergence and
> necessary updates. There are others, and there would be many more if
> the pom format were easier to consume and process.
>
> At one point a large part of my day job was writing software to
> analyze and understand the dependency graph of various projects. We
> ended up spending probably several hundred thousand dollars worth of
> engineer time because we couldn't use standard XML tools for this task
> precisely due to the namespace problems. Google could afford to work
> around that, but a lot of organizations can't.
>
> I wish the repository system and pom format were not so tightly
> coupled to the Maven build tool, but that ship sailed long ago.
> Ideally the decision about when and whether to revise the pom.xml
> format would not be made not only by Apache Maven developers but
> instead include all the stakeholders: Gradle, Sonatype, Google,
> Oracle, and more. So far none of them have been heard from. We just
> have a very small group of active developers of one build tool making
> decisions for everyone. What we can do now is avoid making the problem
> even worse by introducing additional namespace URIs beyond what we
> already have.
>
> --
> Elliotte Rusty Harold
> elharo@ibiblio.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Elliotte Rusty Harold <el...@ibiblio.org>.
On Wed, Jul 23, 2025 at 1:07 PM Tamás Cservenák <ta...@cservenak.net> wrote:
>
> To me your message sounds you assume model parsing == model building.
> Dependency trees and XML parsing? Analyzing what is in project? Just as
> users can use xpath or other standard tech?
>
> This is totally unrelated and POMs alone are most often even incomplete as
> they have parents, imports and interpolation and profile activations and so
> on.
>

This is an important point. The Maven repository system is more than
Maven. The pom.xml is not just for Maven. Most obviously it is also
used by gradle, Ivy, bazel, and other build tools. POMs are also
consumed by static analyzers who want to figure out what dependency
trees look like, most commonly whether there are vulnerable or banned
dependencies but also for things like dependency convergence and
necessary updates. There are others, and there would be many more if
the pom format were easier to consume and process.

At one point a large part of my day job was writing software to
analyze and understand the dependency graph of various projects. We
ended up spending probably several hundred thousand dollars worth of
engineer time because we couldn't use standard XML tools for this task
precisely due to the namespace problems. Google could afford to work
around that, but a lot of organizations can't.

I wish the repository system and pom format were not so tightly
coupled to the Maven build tool, but that ship sailed long ago.
Ideally the decision about when and whether to revise the pom.xml
format would not be made not only by Apache Maven developers but
instead include all the stakeholders: Gradle, Sonatype, Google,
Oracle, and more. So far none of them have been heard from. We just
have a very small group of active developers of one build tool making
decisions for everyone. What we can do now is avoid making the problem
even worse by introducing additional namespace URIs beyond what we
already have.

-- 
Elliotte Rusty Harold
elharo@ibiblio.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Tamás Cservenák <ta...@cservenak.net>.
To me your message sounds you assume model parsing == model building.
Dependency trees and XML parsing? Analyzing what is in project? Just as
users can use xpath or other standard tech?

This is totally unrelated and POMs alone are most often even incomplete as
they have parents, imports and interpolation and profile activations and so
on.

Unsure how would you deliver all these with standard xml stack.

Thanks
T



On Wed, Jul 23, 2025, 12:46 Elliotte Rusty Harold <el...@ibiblio.org>
wrote:

> The problem with deferring the change is that the longer we wait the
> harder this becomes. Perhaps it becomes impossible. Today we are at a
> possibly unique point where Maven has effectively one namespace and
> one modelVersion in production, aside from extremely old artifacts
> that very few projects are using in production any more. We can keep
> the namespace the same and revise the model version. Once there are
> multiple namespaces in active use, it won't be possible to unify on a
> single namespace.
>
> Once we do have a single namespace, developers can use standard XML
> tools like XSLT, XQuery, XPath, XInclude, DOM, and more to process POM
> files. It is so much easier to use these than to try to rely on
> Maven's own parsing code. This is particularly useful for any sort of
> analytics like tracking what's in your project's dependency tree. Yes,
> we'll still have the issue with old POMs that don't declare any
> namespace, but at least the newer modelVersion 4.1.0 POMs will be
> tractable. Don't get too hung up on exactly what the namespace URI is.
> It's really just an opaque string. It's unfortunate that the 4.0.0 in
> the namespace URI doesn't match Maven or model versions, and really
> that' it's in the namespace at all, but that's not something we can or
> should fix now. At the end of the day it's just a string, and as long
> as the string is constant over time, it's all good.
>
> As well as the benefits of having a single well-defined namespace, we
> also get the benefits of decoupling namespace from modelVersion. As
> is, the namespace changes from one modelVerskon to the next. The
> namespace is tied to the modelVersion, and the modelVersion can be
> inferred from the namespace. There's code in the project that does
> exactly this. In which case, why do we have both? This just introduces
> a new class of confusing errors where the namespace doesn't match the
> modelVersion. Our code gets simpler if a namespace is a namespace and
> a modelVersion is a modelVersion, and we can change one without
> changing the other.
>
>
> On Tue, Jul 22, 2025 at 12:47 PM Guillaume Nodet <gn...@apache.org>
> wrote:
> >
> > Hi all,
> >
> > I'm writing to initiate a discussion about an important decision
> regarding
> > Maven 4.0's namespace strategy. We have two competing approaches
> > represented by different pull requests, and the *primary question is
> about
> > timing and acceptable breakage* for this release cycle.
> > Background
> >
> > As we approach Maven 4.0 GA (currently at RC-4), we have two PRs that
> > represent different philosophies:
> >
> >    - *PR #2475*: Create a new modelVersion 4.2.0 (my approach, targeting
> >    4.1.0/master)
> >    - *PR #10952*: Keep Maven Namespace the same (@elharo's approach)
> >
> > The Core Issue: Timing vs. Technical Merit
> >
> > *My position:* I don't disagree with @elharo's proposed change from a
> > technical standpoint. The benefits are:
> >
> >    - Adheres to XML namespace best practices
> >    - Makes XML processing tooling easier by not having to convert between
> >    namespaces
> >
> > *However*, this represents a *major breaking change*. While my PR targets
> > 4.1.0 (master branch), since we already have a stable branch for 4.0.0,
> the
> > timing question remains critical for our overall versioning strategy.
> > My Proposal: Defer to Maven 5.0
> >
> > Instead of rushing this change into 4.0, I propose we:
> >
> >    1. *Continue with my approach for Maven 4.1.0* (new modelVersion
> 4.2.0,
> >    already targeting master)
> >    2. *Plan properly for Maven 5.0* with a brand new namespace that we
> >    would then consider stable
> >    3. *Design the Maven 5.0 namespace from the ground up* with long-term
> >    stability in mind
> >
> > This approach would give us the benefits @elharo is seeking while
> allowing
> > proper planning, testing, and ecosystem preparation.
> > Key Questions for the Community
> >
> >    1. *Timing*: Should we introduce a major breaking change in the 4.x
> >    series, or wait for 5.0?
> >    2. *Risk tolerance*: What level of ecosystem disruption is acceptable
> >    for a 4.x release?
> >    3. *Long-term vision*: Would a properly planned Maven 5.0 namespace
> >    overhaul better serve our goals?
> >
> > I'm interested in hearing the community's thoughts on this timing vs.
> > technical merit trade-off.
> >
> > Best regards,
> > Guillaume Nodet
> > ------------------------------
> >
> > *References:*
> > PR #2475: https://github.com/apache/maven/pull/2475
> > PR #10952: https://github.com/apache/maven/pull/10952
>
>
>
> --
> Elliotte Rusty Harold
> elharo@ibiblio.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Elliotte Rusty Harold <el...@ibiblio.org>.
The problem with deferring the change is that the longer we wait the
harder this becomes. Perhaps it becomes impossible. Today we are at a
possibly unique point where Maven has effectively one namespace and
one modelVersion in production, aside from extremely old artifacts
that very few projects are using in production any more. We can keep
the namespace the same and revise the model version. Once there are
multiple namespaces in active use, it won't be possible to unify on a
single namespace.

Once we do have a single namespace, developers can use standard XML
tools like XSLT, XQuery, XPath, XInclude, DOM, and more to process POM
files. It is so much easier to use these than to try to rely on
Maven's own parsing code. This is particularly useful for any sort of
analytics like tracking what's in your project's dependency tree. Yes,
we'll still have the issue with old POMs that don't declare any
namespace, but at least the newer modelVersion 4.1.0 POMs will be
tractable. Don't get too hung up on exactly what the namespace URI is.
It's really just an opaque string. It's unfortunate that the 4.0.0 in
the namespace URI doesn't match Maven or model versions, and really
that' it's in the namespace at all, but that's not something we can or
should fix now. At the end of the day it's just a string, and as long
as the string is constant over time, it's all good.

As well as the benefits of having a single well-defined namespace, we
also get the benefits of decoupling namespace from modelVersion. As
is, the namespace changes from one modelVerskon to the next. The
namespace is tied to the modelVersion, and the modelVersion can be
inferred from the namespace. There's code in the project that does
exactly this. In which case, why do we have both? This just introduces
a new class of confusing errors where the namespace doesn't match the
modelVersion. Our code gets simpler if a namespace is a namespace and
a modelVersion is a modelVersion, and we can change one without
changing the other.


On Tue, Jul 22, 2025 at 12:47 PM Guillaume Nodet <gn...@apache.org> wrote:
>
> Hi all,
>
> I'm writing to initiate a discussion about an important decision regarding
> Maven 4.0's namespace strategy. We have two competing approaches
> represented by different pull requests, and the *primary question is about
> timing and acceptable breakage* for this release cycle.
> Background
>
> As we approach Maven 4.0 GA (currently at RC-4), we have two PRs that
> represent different philosophies:
>
>    - *PR #2475*: Create a new modelVersion 4.2.0 (my approach, targeting
>    4.1.0/master)
>    - *PR #10952*: Keep Maven Namespace the same (@elharo's approach)
>
> The Core Issue: Timing vs. Technical Merit
>
> *My position:* I don't disagree with @elharo's proposed change from a
> technical standpoint. The benefits are:
>
>    - Adheres to XML namespace best practices
>    - Makes XML processing tooling easier by not having to convert between
>    namespaces
>
> *However*, this represents a *major breaking change*. While my PR targets
> 4.1.0 (master branch), since we already have a stable branch for 4.0.0, the
> timing question remains critical for our overall versioning strategy.
> My Proposal: Defer to Maven 5.0
>
> Instead of rushing this change into 4.0, I propose we:
>
>    1. *Continue with my approach for Maven 4.1.0* (new modelVersion 4.2.0,
>    already targeting master)
>    2. *Plan properly for Maven 5.0* with a brand new namespace that we
>    would then consider stable
>    3. *Design the Maven 5.0 namespace from the ground up* with long-term
>    stability in mind
>
> This approach would give us the benefits @elharo is seeking while allowing
> proper planning, testing, and ecosystem preparation.
> Key Questions for the Community
>
>    1. *Timing*: Should we introduce a major breaking change in the 4.x
>    series, or wait for 5.0?
>    2. *Risk tolerance*: What level of ecosystem disruption is acceptable
>    for a 4.x release?
>    3. *Long-term vision*: Would a properly planned Maven 5.0 namespace
>    overhaul better serve our goals?
>
> I'm interested in hearing the community's thoughts on this timing vs.
> technical merit trade-off.
>
> Best regards,
> Guillaume Nodet
> ------------------------------
>
> *References:*
> PR #2475: https://github.com/apache/maven/pull/2475
> PR #10952: https://github.com/apache/maven/pull/10952



-- 
Elliotte Rusty Harold
elharo@ibiblio.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [DISCUSS] Maven 4.0 Namespace Strategy - Breaking Change Timing Discussion

Posted by Martin Desruisseaux <ma...@geomatys.com.INVALID>.
Hello

I have no strong expertise in that area, so my question is probably 
naive. If the XML namespace should not follow the model version, should 
"http://maven.apache.org/POM/4.0.0" by changed to 
"http://maven.apache.org/POM" for making that clear? If yes, since it 
would be a breaking change anyway, would it make things worst if the 
namespace is temporarily changed to "http://maven.apache.org/POM/4.1.0" 
or "http://maven.apache.org/POM/4.2.0" in order to give us enough time 
for designing carefully a more final model in Maven 5?

     Martin


Le 2025-07-22 à 14 h 47, Guillaume Nodet a écrit :

> I'm writing to initiate a discussion about an important decision regarding
> Maven 4.0's namespace strategy. We have two competing approaches
> represented by different pull requests, and the *primary question is about
> timing and acceptable breakage* for this release cycle.
> Background
>
> As we approach Maven 4.0 GA (currently at RC-4), we have two PRs that
> represent different philosophies:
>
>     - *PR #2475*: Create a new modelVersion 4.2.0 (my approach, targeting 4.1.0/master)
>     - *PR #10952*: Keep Maven Namespace the same (@elharo's approach)
>
> The Core Issue: Timing vs. Technical Merit
>
> *My position:* I don't disagree with @elharo's proposed change from a
> technical standpoint. The benefits are:
>
>     - Adheres to XML namespace best practices
>     - Makes XML processing tooling easier by not having to convert between namespaces
>
> *However*, this represents a *major breaking change*. While my PR targets
> 4.1.0 (master branch), since we already have a stable branch for 4.0.0, the
> timing question remains critical for our overall versioning strategy.
> My Proposal: Defer to Maven 5.0
>
> Instead of rushing this change into 4.0, I propose we:
>
>     1. *Continue with my approach for Maven 4.1.0* (new modelVersion 4.2.0, already targeting master)
>     2. *Plan properly for Maven 5.0* with a brand new namespace that we would then consider stable
>     3. *Design the Maven 5.0 namespace from the ground up* with long-term stability in mind
>
> This approach would give us the benefits @elharo is seeking while allowing
> proper planning, testing, and ecosystem preparation.
> Key Questions for the Community
>
>     1. *Timing*: Should we introduce a major breaking change in the 4.x series, or wait for 5.0?
>     2. *Risk tolerance*: What level of ecosystem disruption is acceptable for a 4.x release?
>     3. *Long-term vision*: Would a properly planned Maven 5.0 namespace overhaul better serve our goals?
>
> I'm interested in hearing the community's thoughts on this timing vs. technical merit trade-off.
>
> Best regards,
> Guillaume Nodet