To me it seems as

project.getReportPlugins()

don't cope with the new syntax for declaring report plugins (i.e. declared
in the configuration of the site plugin). I would start by filing a jira on
Maven core. I'm sure Benjamin will move it if he doesn't agree with this
being a core issue.

Please include a test project in the ticket!

/Anders
On Mon, Jan 10, 2011 at 19:27, Marc Ro... <[email protected]> wrote:

> Hi,
>
> when the site reports are created using Maven 3, several of the report
> plugins don't generate the links to the Source Xref pages, when the JXR
> Plugin hasn't been executed for that project before. Looking at the code of
> the affected plugins, You'll see that those plugins first check if the
> 'xrefLocation' directory already exists. If not, they check if the JXR
> Plugin is configured for the project - but they won't find any plugin there,
> because with Maven 3 the report plugins aren't configured in the reporting
> section of the POM anymore. For Maven 3, the report plugins list for those
> checks should be retrieved from the Site Plugin configuration instead.
>
> Some affected plugins and the Xref link to the 'problematic' code:
>  - Checkstyle Plugin:
> http://maven.apache.org/plugins/maven-checkstyle-plugin/xref/org/apache/maven/plugin/checkstyle/CheckstyleReport.html#670
>  - PMD Plugin:
> http://maven.apache.org/plugins/maven-pmd-plugin/xref/org/apache/maven/plugin/pmd/AbstractPmdReport.html#240
>  - Surefire Report Plugin:
> http://maven.apache.org/plugins/maven-surefire-report-plugin/xref/org/apache/maven/plugins/surefire/report/SurefireReportMojo.html#203
>
> As a workaround You could just add a simple JXR Plugin configuration to the
> reporting section of Your (parent) POM:
>  <reporting>
>    <plugins>
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-jxr-plugin</artifactId>
>        <version>2.2</version>
>      </plugin>
>    </plugins>
>  </reporting>
>
> But in my option, the bug (or regression) should be fixed anyway. My only
> problem is now, that I'm not sure where I should open a JIRA issue for that
> problem. It seems to affect the report plugins, the Site plugin und maybe
> even the Maven core.
>
> Kind regards
>
>   Marc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to