well, adding custom elements, makes it cannot pass xsd, right?
or we shall allow any element name? but that would kill typo check, like if
somebody wrongly said, <dependencys>, and spend a whole day finding what be
wrong.
or is there some way to allow some...prefix?or allow-all-namespace like
<custom:property1> or something?

Gary Gregory <garydgreg...@gmail.com> 于2025年2月10日周一 20:57写道:

> I agree FWIW, this is a problem XML standards solved decades ago. Comments
> should be considered invisible, in fact many parsers don't surface them.
> Between processing instructions and namespaces, a tool should have all it
> needs IMO.
>
> Gary
>
> On Mon, Feb 10, 2025, 07:45 Elliotte Rusty Harold <elh...@ibiblio.org>
> wrote:
>
> > On Mon, Feb 10, 2025 at 10:02 AM Xeno Amess <xenoam...@gmail.com> wrote:
> > >
> > > > Sometimes comments are used to embed additional machine-readable
> > metadata.
> > > yes and considering somebody would like to use this for a maven
> extension
> > > or something...
> >
> > Yes, that's a pretty common antipattern. Embedding other markup
> > formats inside XML is baroque, confusing, and tool hostile. The better
> > approach is to add additional XML markup to the document. In this
> > specific instance that means Maven would stop erroring if it sees
> > elements it doesn't recognize. That is, it asks the question "Do I
> > have everything I need to build this project?" instead of "Do I
> > understand every element in this pom?"
> >
> > A slightly less radical approach would be to ignore elements not in
> > Maven's own namespace.
> >
> > --
> > Elliotte Rusty Harold
> > elh...@ibiblio.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> > For additional commands, e-mail: dev-h...@maven.apache.org
> >
> >
>

Reply via email to