[
https://issues.apache.org/jira/browse/MPH-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16766889#comment-16766889
]
Hervé Boutemy edited comment on MPH-160 at 2/19/19 8:04 AM:
------------------------------------------------------------
initial implementation of Modello {{xpp3-extended-writer}} in
https://github.com/codehaus-plexus/modello/tree/xpp3-extended-writer
integrated in maven-help-plugin branch
https://github.com/apache/maven-help-plugin/tree/MPH-160
works well, with known limitations:
- does not display input location for plugins configuration: information not
calculated by Maven core when merging DOM objects, not so easy to track, need
to find a strategy...
- -does not display input location for properties-
- -does not display input location for lists of Strings (reports, roles,
otherArchives, goals, modules),- not sure it is well tracked by Maven core when
doing inheritance
- does not display input location for lines inherited from [Maven
super-POM|https://maven.apache.org/ref/current/maven-model-builder/super-pom.html]:
requires Maven core improvement MNG-6593
was (Author: hboutemy):
initial implementation of Modello {{xpp3-extended-writer}} in
https://github.com/codehaus-plexus/modello/tree/xpp3-extended-writer
integrated in maven-help-plugin branch
https://github.com/apache/maven-help-plugin/tree/MPH-160
works well, with known limitations:
- does not display input location for plugins configuration: information not
calculated by Maven core when merging DOM objects, not so easy to track, need
to find a strategy...
- -does not display input location for properties-
- does not display input location for lists of Strings (reports, roles,
otherArchives, goals, modules), not sure it is well tracked by Maven core when
doing inheritance
- does not display input location for lines inherited from [Maven
super-POM|https://maven.apache.org/ref/current/maven-model-builder/super-pom.html]:
requires Maven core improvement MNG-6593
> add source location in comments to effective pom.xml
> ----------------------------------------------------
>
> Key: MPH-160
> URL: https://issues.apache.org/jira/browse/MPH-160
> Project: Maven Help Plugin
> Issue Type: New Feature
> Components: effective-pom
> Affects Versions: 3.1.0
> Reporter: Hervé Boutemy
> Priority: Major
>
> during in-memory effective pom building (by maven-model-builder), the source
> location of content is kept in memory: see [Modello documentation on location
> tracking|https://codehaus-plexus.github.io/modello/location-tracking.html]
> and MNG-1803 for its integration into Maven model
> adding this information as comment on every line of generated XML would ease
> tracking for end users (and not only m2e users, who get "Jump to location"
> hint when editing their pom.xml in Eclipse...)
> This will require a Modello enhancement (see [Modello
> #28|https://github.com/codehaus-plexus/modello/issues/28]) then integration
> (idea found during Devoxx 2018 Maven BoF, since users were missing ways to
> diagnose unexpected result in effective pom)
> Sample result is the addition of comments with modelId and "line xxx" at the
> end of each line of generated XML:
> {code:xml}$ mvn -Dverbose
> org.apache.maven.plugins:maven-help-plugin:3.1.2-SNAPSHOT:effective-pom
> [INFO] Scanning for projects...
> [INFO]
> [INFO] -------------< org.apache.maven.plugins:maven-help-plugin
> >-------------
> [INFO] Building Apache Maven Help Plugin 3.1.2-SNAPSHOT
> [INFO] ----------------------------[ maven-plugin
> ]----------------------------
> [INFO]
> [INFO] --- maven-help-plugin:3.1.2-SNAPSHOT:effective-pom (default-cli) @
> maven-help-plugin ---
> [INFO]
> Effective POMs, after inheritance, interpolation, and profiles are applied:
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- ======================================================================
> -->
> <!--
> -->
> <!-- Generated by Maven Help Plugin on 2019-02-15T12:52:00+01:00
> -->
> <!-- See: http://maven.apache.org/plugins/maven-help-plugin/
> -->
> <!--
> -->
> <!-- ======================================================================
> -->
> <!-- ======================================================================
> -->
> <!--
> -->
> <!-- Effective POM for project
> -->
> <!-- 'org.apache.maven.plugins:maven-help-plugin:maven-plugin:3.1.2-SNAPSHOT'
> -->
> <!--
> -->
> <!-- ======================================================================
> -->
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion> <!--
> org.apache.maven.plugins:maven-help-plugin:3.1.2-SNAPSHOT, line 23 -->
> <parent>
> <artifactId>maven-plugins</artifactId> <!--
> org.apache.maven.plugins:maven-help-plugin:3.1.2-SNAPSHOT, line 26 -->
> <groupId>org.apache.maven.plugins</groupId> <!--
> org.apache.maven.plugins:maven-help-plugin:3.1.2-SNAPSHOT, line 27 -->
> <version>33</version> <!--
> org.apache.maven.plugins:maven-help-plugin:3.1.2-SNAPSHOT, line 28 -->
> <relativePath>../../pom/maven/maven-plugins/pom.xml</relativePath> <!--
> org.apache.maven.plugins:maven-help-plugin:3.1.2-SNAPSHOT, line 29 -->
> </parent>
> <groupId>org.apache.maven.plugins</groupId> <!--
> org.apache.maven.plugins:maven-plugins:[unknown-version]
> /home/herve/.m2/repository/org/apache/maven/plugins/maven-plugins/33/maven-plugins-33.pom,
> line 31 -->
> <artifactId>maven-help-plugin</artifactId> <!--
> org.apache.maven.plugins:maven-help-plugin:3.1.2-SNAPSHOT, line 32 -->
> <version>3.1.2-SNAPSHOT</version> <!--
> org.apache.maven.plugins:maven-help-plugin:3.1.2-SNAPSHOT, line 33 -->
> <packaging>maven-plugin</packaging> <!--
> org.apache.maven.plugins:maven-help-plugin:3.1.2-SNAPSHOT, line 34 -->
> <name>Apache Maven Help Plugin</name> <!--
> org.apache.maven.plugins:maven-help-plugin:3.1.2-SNAPSHOT, line 36 -->
> <description>The Maven Help plugin provides goals aimed at helping to make
> sense out of
> the build environment. It includes the ability to view the effective
> POM and settings files, after inheritance and active profiles
> have been applied, as well as a describe a particular plugin goal to give
> usage information.</description> <!--
> org.apache.maven.plugins:maven-help-plugin:3.1.2-SNAPSHOT, line 37 -->
> <url>https://maven.apache.org/plugins/maven-help-plugin/</url> <!--
> org.apache.maven.plugins:maven-plugins:[unknown-version]
> /home/herve/.m2/repository/org/apache/maven/plugins/maven-plugins/33/maven-plugins-33.pom,
> line 37 -->
> <inceptionYear>2001</inceptionYear> <!--
> org.apache.maven.plugins:maven-help-plugin:3.1.2-SNAPSHOT, line 43 -->
> <organization>
> <name>The Apache Software Foundation</name> <!-- org.apache:apache:21,
> line 41 -->
> <url>https://www.apache.org/</url> <!-- org.apache:apache:21, line 42 -->
> </organization>
> <licenses>
> <license>
> <name>Apache License, Version 2.0</name> <!-- org.apache:apache:21,
> line 46 -->
> <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> <!--
> org.apache:apache:21, line 47 -->
> <distribution>repo</distribution> <!-- org.apache:apache:21, line 48
> -->
> </license>
> </licenses>
> ...{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)