maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Green (JIRA)" <>
Subject [jira] [Commented] (MNG-5926) Allow for comment elements inside POM
Date Wed, 07 Dec 2016 09:01:58 GMT


James Green commented on MNG-5926:

bq. Isn't it a problem of the tool that it is using the Java representation instead of the
XML file itself?

Absolutely not.

By providing formal schema within the XML you are supplying the POM author the correct modelling
elements to use. If he (as it today) simply uses {{<!-- because ... -->}} there is no
reason for an XML parser (even one that knows about the POM model) to display this comment
and worst still the author has no foreknowledge as to where to place that comment - within
the <dependency> or immediately above it, for instance? Imagine also a future version
of Maven that accepts JSON or YAML formatted POMs.

The XML comments are exactly that - XML comments, *not* POM model comments.

I am asking for a formal means to record human knowledge against elements of the POM. It is
not mandatory to fill these in, but it can reduce long-cost project cost immeasurably.

> Allow for comment elements inside POM
> -------------------------------------
>                 Key: MNG-5926
>                 URL:
>             Project: Maven
>          Issue Type: Improvement
>          Components: POM
>            Reporter: James Green
>            Priority: Trivial
>             Fix For: Issues to be reviewed for 4.x
> I have spent hours tracking down why something exists as it does within a company POM.
On multiple occasions.
> All because there is no obvious documentation for things like dependencies. Yes, we could
use XML comments but these will not show in the results of any documentation tools.
> What I am asking for is a <comment> element to be permitted within a <dependency>,
<exclusion>, and probably a few other areas but those are real immediate areas of need.
> This was discussed briefly on the -users mailing list many months ago and was generally
met with approval. I can't remember adding it here though...

This message was sent by Atlassian JIRA

View raw message