You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hervé Boutemy (JIRA)" <ji...@apache.org> on 2019/04/13 21:01:00 UTC

[jira] [Updated] (MPH-160) help:effective-pom -Dverbose: add source location as comments in effective pom.xml

     [ https://issues.apache.org/jira/browse/MPH-160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hervé Boutemy updated MPH-160:
------------------------------
    Summary: help:effective-pom -Dverbose: add source location as comments in effective pom.xml  (was: help:effective-pom -Dverbose: add source location in comments to effective pom.xml)

> help:effective-pom -Dverbose: add source location as comments in 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
>            Assignee: Hervé Boutemy
>            Priority: Major
>             Fix For: 3.2.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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)