You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2024/08/18 14:04:00 UTC
[jira] [Updated] (MPH-206) help:effective-pom produces invalid xml (duplicate xml declarations) when bound to a phase in the lifecycle
[ https://issues.apache.org/jira/browse/MPH-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov updated MPH-206:
-------------------------------
Fix Version/s: waiting-for-feedback
> help:effective-pom produces invalid xml (duplicate xml declarations) when bound to a phase in the lifecycle
> -----------------------------------------------------------------------------------------------------------
>
> Key: MPH-206
> URL: https://issues.apache.org/jira/browse/MPH-206
> Project: Maven Help Plugin
> Issue Type: Bug
> Components: effective-pom
> Affects Versions: 3.4.0
> Reporter: Ben Davini
> Priority: Critical
> Fix For: waiting-for-feedback
>
>
> When the maven-help-plugin is invoked as part of the maven lifecycle (see configuration below), it produces xml with 2 XML version declarations, like this (generated with 'mvn clean install'):
>
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- ====================================================================== --><!-- --><!-- Generated by Maven Help Plugin --><!-- See: https://maven.apache.org/plugins/maven-help-plugin/ --><!-- --><!-- ====================================================================== --><!-- ====================================================================== --><!-- --><!-- Effective POM for project --><!-- '<project coordinates>' --><!-- --><!-- ====================================================================== -->
> <?xml version="1.0" encoding="UTF-8"?>
> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> {code}
> When invoked via the command line (mvn help:effective-pom -Doutput=effective-pom.xml), the xml produced is valid (note no duplicate xml declaration before the 'project' declaration):
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- ====================================================================== --><!-- --><!-- Generated by Maven Help Plugin --><!-- See: https://maven.apache.org/plugins/maven-help-plugin/ --><!-- --><!-- ====================================================================== --><!-- ====================================================================== --><!-- --><!-- Effective POM for project --><!-- '<project coordinates>' --><!-- --><!-- ====================================================================== -->
> <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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> {code}
>
>
> {{Configuration as part of lifecycle:}}
>
> {code:java}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-help-plugin</artifactId>
> <version>${maven-help-plugin.version}</version>
> <executions>
> <execution>
> <id>effective-pom</id>
> <phase>verify</phase>
> <goals>
> <goal>effective-pom</goal>
> </goals>
> <configuration>
> <output>${project.build.directory}/effective-pom.xml</output>
> <verbose>true</verbose>
> </configuration>
> </execution>
> </executions>
> </plugin> {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)