You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Ryan Schmitt <rs...@apache.org> on 2025/12/28 12:59:53 UTC

Alternate POM syntaxes?

I'm looking for more information on this Maven 4 feature, which I
understand to be an official SPI for POM file parsers, to allow the use of
formats other than XML. I have some thoughts on this feature, but I'd first
like to read any prior design discussions; I wasn't immediately able to
find any relevant threads in the archives for this list.

Re: Alternate POM syntaxes?

Posted by Guillaume Nodet <gn...@apache.org>.
The SPI basically allows plugging support for additional POM by
implementing the org.apache.maven.api.spi.ModelParser
<https://maven.apache.org/ref/4.0.0-rc-5/api/maven-api-spi/apidocs/org/apache/maven/api/spi/ModelParser.html>
interface.
A simple project has been written that leverages this new SPI:
https://github.com/maveniverse/mason

It should be fairly easy to write a new enhanced XML parser using this SPI.

>
> On Sun, Dec 28, 2025 at 2:00 PM Ryan Schmitt <rs...@apache.org> wrote:
>
> > I'm looking for more information on this Maven 4 feature, which I
> > understand to be an official SPI for POM file parsers, to allow the use
of
> > formats other than XML. I have some thoughts on this feature, but I'd
first
> > like to read any prior design discussions; I wasn't immediately able to
> > find any relevant threads in the archives for this list.
> >



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

Re: Alternate POM syntaxes?

Posted by Sergey Chernov <se...@gmail.com>.
Hey, Ryan.

Are you aware of this project for maven 3.3+?
https://github.com/takari/polyglot-maven


On Sun, Dec 28, 2025 at 2:00 PM Ryan Schmitt <rs...@apache.org> wrote:

> I'm looking for more information on this Maven 4 feature, which I
> understand to be an official SPI for POM file parsers, to allow the use of
> formats other than XML. I have some thoughts on this feature, but I'd first
> like to read any prior design discussions; I wasn't immediately able to
> find any relevant threads in the archives for this list.
>

Re: Alternate POM syntaxes?

Posted by Ryan Schmitt <rs...@apache.org>.
(Please reply-all, as I'm not currently subscribed to the list)

I'm familiar with `polyglot-maven` as the prior art here, but I'm concerned
about extensible syntax as a first-class feature.

I know I'm really late to this, but I think that Maven POM syntax should
_not_ be extensible; instead, there should be first-class support for a
single, modern build POM syntax. This would be a much better move for the
overall ecosystem: tech writers, IDEs, LSPs, `mvnup`, and third-party
tooling (OpenRewrite, Dependabot, AI coding agents, starship, etc) would
all know what they need to support, much like when Gradle added support for
the Kotlin DSL.

Having too many syntax options, whether first-party or third-party, is a
recipe for confusion and fragmentation, as I've repeatedly seen with Log4j2
configuration. Third-party syntaxes in particular are likely to suffer from
poor design choices and quality issues that could be avoided through the
additional scrutiny that an official successor syntax would undergo.

Having an SPI as part of 4.0 doesn't foreclose the possibility of an
official successor syntax, but I would hope that that's the ultimate end
goal here.

On Sun, Dec 28, 2025 at 4:59 AM Ryan Schmitt <rs...@apache.org> wrote:

> I'm looking for more information on this Maven 4 feature, which I
> understand to be an official SPI for POM file parsers, to allow the use of
> formats other than XML. I have some thoughts on this feature, but I'd first
> like to read any prior design discussions; I wasn't immediately able to
> find any relevant threads in the archives for this list.
>