[ https://issues.apache.org/jira/browse/MPIR-412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov closed MPIR-412. ------------------------------- Resolution: Fixed Fixed with [d85aec37c385d64196f7db5c3c27b400b46032ca|https://gitbox.apache.org/repos/asf?p=maven-project-info-reports-plugin.git;a=commit;h=d85aec37c385d64196f7db5c3c27b400b46032ca]. > Dependency report generates non-well-formed output if the POM of a > depdendency cannot be parsed > ----------------------------------------------------------------------------------------------- > > Key: MPIR-412 > URL: https://issues.apache.org/jira/browse/MPIR-412 > Project: Maven Project Info Reports Plugin > Issue Type: Bug > Components: dependencies > Affects Versions: 3.1.2 > Reporter: Jukka Matilainen > Assignee: Michael Osipov > Priority: Minor > Fix For: 3.2.1 > > > If there is dependency whose POM cannot be parsed, the output from the > dependency report is not well-formed, with start and end tags not matching > each other. > This causes problems when using maven-pdf-plugin, which skips the depedency > report entirely if it is not well-formed. > h3. How to reproduce > 1. Use the following POM: > {code:xml} > <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/maven-v4_0_0.xsd"> > <modelVersion>4.0.0</modelVersion> > <groupId>fi.iki.jkmatila</groupId> > <artifactId>repro-dependency-report-bug</artifactId> > <version>1.0-SNAPSHOT</version> > <dependencies> > <!-- an example of a dependency which will trigger this problem: --> > <dependency> > <groupId>xml-apis</groupId> > <artifactId>xml-apis-ext</artifactId> > <version>1.3.04</version> > </dependency> > </dependencies> > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-project-info-reports-plugin</artifactId> > <version>3.1.2</version> > </plugin> > </plugins> > </build> > </project> > {code} > 2. Run this command: > {code:bash} > mvn project-info-reports:dependencies > {code} > Note that since there is a problem with the POM of > xml-apis:xml-apis-ext:jar:1.3.04 (the {{distributionManagement}} tag contains > a {{status}} tag inside), there is a message displayed about that: > {quote}[INFO] Unable to create Maven project from repository for artifact > 'xml-apis:xml-apis-ext:jar:1.3.04', for more information run with -X > {quote} > h3. Expected results > Even if there is a dependency with problems in its POM, I would expect the > generated dependency report to be well-formed (even if the details for that > dependency are missing), so that maven-pdf-plugin can process that dependency > report. > h3. Observed results > The generated Dependency Tree secion in the dependency report is not > well-formed, with start tags and end tags not matching each other. This > causes problems with maven-pdf-plugin. > {code:bash} > $ xmllint --noout target/site/dependencies.html > target/site/dependencies.html:94: parser error : Opening and ending tag > mismatch: div line 94 and td > ; vertical-align: text-bottom;"></img><div id="_dep2" > style="display:none"></td> > [...]{code} > Here is an excerpt from the generated file > {{{}target/site/dependencies.html{}}}, with whitespace and indentation > manually added to make it more clear: > {code:xml} > <section> > <h3><a name="Dependency_Tree"></a>Dependency Tree</h3> > <ul> > <li> > fi.iki.jkmatila:repro-dependency-report-bug:jar:1.0-SNAPSHOT > <img id="_img1" src="./images/icon_info_sml.gif" alt="[Information]" > onclick="toggleDependencyDetails( '_dep0', '_img1' );" style="cursor: > pointer; vertical-align: text-bottom;"></img> > <div id="_dep0" style="display:none"> > <table border="0" class="bodyTable"> > <tr class="a"> > <th>repro-dependency-report-bug</th> > </tr> > <tr class="b"> > <td> > <p><b>Description: </b>There is currently no description > associated with this project.</p> > <p><b>Project Licenses: </b>No licenses are defined for this > project.</p> > </td> > </tr> > </table> > </div> > <ul> > <li> > xml-apis:xml-apis-ext:jar:1.3.04 (compile) > <img id="_img3" src="./images/icon_info_sml.gif" > alt="[Information]" onclick="toggleDependencyDetails( '_dep2', '_img3' );" > style="cursor: pointer; vertical-align: text-bottom;"></img> > <div id="_dep2" style="display:none"> > </td> > </tr> > </table> > </div> > </li> > </ul> > </li> > </ul> > </section> > {code} > There are end tags {{</td></tr></table>}} generated in the output without the > corresponding start tags. -- This message was sent by Atlassian Jira (v8.20.1#820001)