On 20/04/2015 4:55 PM, Jim Klo wrote:
Comments inline below..

On Apr 20, 2015, at 10:44 AM, Ron Wheeler <rwhee...@artifact-software.com <mailto:rwhee...@artifact-software.com>> wrote:

RDF sounds like overkill. There is no reason why a comment could not be a URI but I am not sure that you want to mandate that.
Use Case 1 link to web resource
<dependency comment="http://blog.artifact-software.com/tech/?p=191”>

Having dealt with this sort of thing on other projects, linked comments sound good at first but ultimately become a very bad idea IMO. This creates a non-idempotent and brittle link scenario where the comment url is out of synch with the content in the POM.


Use Case 2 lots of in-line deatils
       <dependency comment="added to support PDF output">
           <groupId>org.apache.xmlgraphics</groupId>
           <artifactId>fop</artifactId>
<version comment="Can't use version 2.x see FOP-3423">1.0</version> <optional comment="set to true to get text in black on white">true</optional>
       </dependency>

Use case 3 reference to a full explanation in the description
There is also the description tag which could be used to hold more details
       <dependency comment="See note 2  in description tag.”>

I’m not sure I’m seeing a difference between UC 2 & 3. Unless you mean something more like this for UC 3:
<dependency comment_ref=“note2”>  <!— or some XPath expression —>
 ...
<description comment_refid=“note2” comment=“This version doesn’t work for the following reasons:….”>

I was thinking that the description might be <description>Note 1: Please put all dependency versions in Parent, Note 2:FOP required for PDF output</description>

IDE's could show comment attributes on tags in the POM editor or in XML outline views.

It seems to be a lot more flexible than adding comment tags and probably less intrusive to existing plug-ins.


I think comment tags should still be included. Inline is great for short descriptions, but nothing really beats having a tag element that doesn’t require a lot of XML escaping like an attribute would need.

- Jim

You are looking for a lot more machine processing that I was thinking.
I was just considering comments as a way to tell people about the choices made.

Your  XML escaping note is a good point.
The IDE will pick up invalid text so it should not be hard to avoid but for people without a good IDE, they will get an error. It should only happen once to each person editing a pom and POMs are not edited a lot in most projects.


Can you give a comment tag solution for each of the use cases.
Are you proposing that comment tags be allowed inside all tags or just some.
I would suggest comment attributes on all elements.

Does anyone know what the impact would be of either solution on existing poms or plug-ins?

Ron

Ron

--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102

Reply via email to