PMD plugin does not work with JDK5 (missing property)
-----------------------------------------------------

         Key: MPPMD-24
         URL: http://jira.codehaus.org/browse/MPPMD-24
     Project: maven-pmd-plugin
        Type: Bug

    Versions: 1.7    
    Reporter: Benoit Xhenseval
    Priority: Critical


It looks like the PMD plugin version 1.7 does NOT use maven.pmd.targetjdk, 
despite the documentation.  This basically prevents PMD from working with any 
jdk1.5-specific featurs.
 
I have added the following lines in the plugin.jelly (line 107):
 
    <j:set var="targetjdk" value="${maven.compile.source}"/>
    <j:if test="${context.getVariable('maven.pmd.targetjdk')!=''}">
     <j:set var="targetjdk" value="${maven.pmd.targetjdk}"/>
    </j:if>
 
    <echo>Running the PMD task with ${maven.pmd.rulesetfiles} ... 
Target:${targetjdk}</echo>
 
    <!-- Prepare empty raw report because no file is generated if no rule is 
         violated and that causes the report generation to fail later on -->
 
    <echo file="${maven.build.dir}/pmd-raw-report.xml" 
        message="&lt;?xml version='1.0'?&gt;&lt;pmd/&gt;"/>
 
    <j:choose>
      <j:when test="${sourcesPresent == 'true'}">
        <pmd rulesetfiles="${maven.pmd.rulesetfiles}" targetjdk="${targetjdk}">
...
 
---------------------
I trust that this would fix the issue (it does in my environment).
 


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to