You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Henri Tremblay (JIRA)" <ji...@codehaus.org> on 2009/06/04 19:24:42 UTC

[jira] Created: (MPMD-99) Report doesn't reflect the real PMD version used

Report doesn't reflect the real PMD version used
------------------------------------------------

                 Key: MPMD-99
                 URL: http://jira.codehaus.org/browse/MPMD-99
             Project: Maven 2.x PMD Plugin
          Issue Type: Bug
          Components: PMD
    Affects Versions: 2.4
            Reporter: Henri Tremblay


If the PMD dependency is overloaded to a new version of PMD (by having a dependency section attached to the plugin definition in the pom.xml), PMD won't show the real PMD version used.

This is because, the version shown following the "The following document contains the results of" on the html report is taken from PMD.VERSION which is inlined by the compiler at compilation and so is always 4.2.2.

The solution is to use the one in the pmd.xml header (<pmd version="4.2.5" timestamp="2009-06-04T18:29:18.945">) which is always right.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MPMD-99) Report doesn't reflect the real PMD version used

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPMD-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy closed MPMD-99.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 2.5
         Assignee: Herve Boutemy

code committed in r939832.
Thank you for the patch

> Report doesn't reflect the real PMD version used
> ------------------------------------------------
>
>                 Key: MPMD-99
>                 URL: http://jira.codehaus.org/browse/MPMD-99
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 2.4
>            Reporter: Henri Tremblay
>            Assignee: Herve Boutemy
>             Fix For: 2.5
>
>         Attachments: PmdReportListener.java
>
>
> If the PMD dependency is overloaded to a new version of PMD (by having a dependency section attached to the plugin definition in the pom.xml), PMD won't show the real PMD version used.
> This is because, the version shown following the "The following document contains the results of" on the html report is taken from PMD.VERSION which is inlined by the compiler at compilation and so is always 4.2.2.
> The solution is to use the one in the pmd.xml header (<pmd version="4.2.5" timestamp="2009-06-04T18:29:18.945">) which is always right.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MPMD-99) Report doesn't reflect the real PMD version used

Posted by "Henri Tremblay (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MPMD-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Tremblay updated MPMD-99:
-------------------------------

    Attachment: PmdReportListener.java

I little bit dull but working solution is to retrieve the version by reflection. This is what I'm doing in the file. The same thing applies to CpdReportGenerator (although I didn't provided here).

It works perfectly and I can't see how to get the version otherwise.


> Report doesn't reflect the real PMD version used
> ------------------------------------------------
>
>                 Key: MPMD-99
>                 URL: http://jira.codehaus.org/browse/MPMD-99
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 2.4
>            Reporter: Henri Tremblay
>         Attachments: PmdReportListener.java
>
>
> If the PMD dependency is overloaded to a new version of PMD (by having a dependency section attached to the plugin definition in the pom.xml), PMD won't show the real PMD version used.
> This is because, the version shown following the "The following document contains the results of" on the html report is taken from PMD.VERSION which is inlined by the compiler at compilation and so is always 4.2.2.
> The solution is to use the one in the pmd.xml header (<pmd version="4.2.5" timestamp="2009-06-04T18:29:18.945">) which is always right.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira