You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Marc Ro..." <po...@silpion.de> on 2011/01/10 19:27:32 UTC

Xref link generation regression with Maven 3

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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Xref link generation regression with Maven 3

Posted by "Marc Ro..." <po...@silpion.de>.
FYI

I opened Jira items for (some of) the affected plugins:
 - http://jira.codehaus.org/browse/MCHECKSTYLE-150
 - http://jira.codehaus.org/browse/MPMD-128
 - http://jira.codehaus.org/browse/SUREFIRE-683
 - http://jira.codehaus.org/browse/MTAGLIST-55

Kind regards

   Marc


----- Ursprüngliche Mail -----
Von: "Marc Ro..." <po...@silpion.de>
An: users@maven.apache.org
Gesendet: Dienstag, 11. Januar 2011 14:34:31
Betreff: Re: Xref link generation regression with Maven 3

It's not a Maven core issue then, I understand.

I think I just simply open Jira items for (some of) the plugins, that 
run into this problem. But I think this will also require some work on 
the Site plugin (3.x), as the Site plugin now should provide a way to access 
that list of configured report plugins.


On 11/01/11 12:48, Benjamin Bentmann wrote:
> This is "Won't fix" as far as Maven core is concerned. This method as
> well as all the other reporting related ones are already deprecated
> since reporting is no longer a core concern.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Xref link generation regression with Maven 3

Posted by "Marc Ro..." <po...@silpion.de>.
It's not a Maven core issue then, I understand.

I think I just simply open Jira items for (some of) the plugins, that 
run into this problem. But I think this will also require some work on 
the Site plugin (3.x), as the Site plugin now should provide a way to access 
that list of configured report plugins.


On 11/01/11 12:48, Benjamin Bentmann wrote:
> This is "Won't fix" as far as Maven core is concerned. This method as
> well as all the other reporting related ones are already deprecated
> since reporting is no longer a core concern.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Xref link generation regression with Maven 3

Posted by Benjamin Bentmann <be...@udo.edu>.
Anders Hammar wrote:

> 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.

This is "Won't fix" as far as Maven core is concerned. This method as 
well as all the other reporting related ones are already deprecated 
since reporting is no longer a core concern.


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Xref link generation regression with Maven 3

Posted by Anders Hammar <an...@hammar.net>.
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... <po...@silpion.de> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>