You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andreas Dangel (JIRA)" <ji...@apache.org> on 2018/01/10 18:52:00 UTC
[jira] [Comment Edited] (MPMD-128) Xref link generation regression
with Maven 3
[ https://issues.apache.org/jira/browse/MPMD-128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16320819#comment-16320819 ]
Andreas Dangel edited comment on MPMD-128 at 1/10/18 6:51 PM:
--------------------------------------------------------------
If the jxr plugin has not been executed yet, we check, whether it is in the report plugins list. MavenProject.getReportPlugins() only returns the plugins, that have been configured in the maven-2/3 compatible way (top-level {{<reporting><plugins>...}} section) and ignores the report plugins, that have been configured as part of the maven-site-plugin configuration parameter "reportPlugins".
The parameter "reportPlugins" has also been removed from the site plugin (see MSITE-792).
From now on, the only valid way to configure the reporting plugins is via the global <reporting> section.
The corrected integration test looks like this:
{noformat}
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<rulesets>
<ruleset>src/main/config/pmd/rules.xml</ruleset>
</rulesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</reporting>
...
{noformat}
was (Author: adangel):
If the jxr plugin has not been executed yet, we check, whether it is in the report plugins list. MavenProject.getReportPlugins() only returns the plugins, that have been configured in the maven-2/3 compatible way (top-level {{<reporting><plugins>...}} section) and ignores the report plugins, that have been configured as part of the maven-site-plugin configuration parameter "reportPlugins".
The parameter "reportPlugins" has also been removed from the site plugin (see MSITE-792).
From now on, the only valid way to configure the reporting plugins is via the global <reporting> section.
The corrected integration test looks like this:
{noformat}
...
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
</plugin>
</plugins>
</build>
<reporting>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<rulesets>
<ruleset>src/main/config/pmd/rules.xml</ruleset>
</rulesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
</plugin>
</reporting>
...
{noformat}
> Xref link generation regression with Maven 3
> --------------------------------------------
>
> Key: MPMD-128
> URL: https://issues.apache.org/jira/browse/MPMD-128
> Project: Maven PMD Plugin
> Issue Type: Bug
> Components: CPD, PMD
> Affects Versions: 2.5
> Environment: Apache Maven 3.0.1 (r1038046; 2010-11-23 11:58:32+0100)
> Java version: 1.6.0_20
> Java home: /usr/lib/jvm/java-6-openjdk/jre
> Default locale: en_GB, platform encoding: UTF-8
> OS name: "linux" version: "2.6.32-27-generic" arch: "i386" Family: "unix"
> Reporter: Marc Rohlfs
> Assignee: Andreas Dangel
> Priority: Minor
> Fix For: 3.9.0
>
> Attachments: MPMD-128-IT.patch, MPMD-128_sample.zip
>
>
> When the site reports are created with Maven 3, the PMD plugin doesn't generate the links to the Source Xref pages, when the JXR Plugin hasn't been executed before.
> The plugin looks for the {{xrefLocation}} directory and if it doesn't exist, it checks if the JXR plugin is configured for the project (see http://maven.apache.org/plugins/maven-pmd-plugin/xref/org/apache/maven/plugin/pmd/AbstractPmdReport.html#240). To properly generate the Xref links when the report is created with Maven 3, the plugin should also check the {{reportPlugins}} paramerter of the Site plugin configuration.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)