On Thu, Dec 05, 2019 at 09:04:17PM +0200, Anton Tanasenko wrote:
> If you have control over report generation, what you can do is add xml
> processing instructions into your pom files that your plugin can later
> parse out of the xml without interfering with existing pom model.
> M2Eclipse uses that approach to add some metadata to plugin executions.
> Here's [1] the code pointer that performs the parsing from maven model.
> 
> [1]
> https://github.com/eclipse/m2e-core/blob/master/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/AnnotationMappingMetadataSource.java#L168

It might be even easier than that.  Could one not write an XSL
transform to combine the POM with a document containing named
dependencies and your rationales, to produce such a report?

But it would be nicer if the schema and the dependency plugin were
extended to permit the documentation that was requested.  And it does
seem in line with Maven's purpose as a "project...comprehension tool."

Another approach, which wouldn't require releasing a new version of
the POM schema, would be if Maven had an option to politely ignore
elements in other namespaces instead of killing the build with an
ERROR.  Then a POM document could be augmented for processing by other
tools (such as a slightly different XSL transform).

-- 
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu

Attachment: signature.asc
Description: PGP signature

Reply via email to