Chocolatey Fest - Chocolatey's inaugural conference on Windows Automation (WinOps) is coming - Learn more!

This is not the latest version of PMD available.



Package test results are passing.

Private CDN cached downloads available for licensed customers. Never experience 404 breakages again! Learn more...

This package was approved by moderator gep13 on 7/5/2018.

PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. It supports Java, JavaScript, PLSQL, Apache Velocity, XML, XSL. Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code in Java, C, C++, C#, PHP, Ruby, Fortran, JavaScript, PLSQL, Apache Velocity, Ruby, Scala, Objective C, Matlab, Python, Go.

To install PMD, run the following command from the command line or from PowerShell:

C:\> choco install pmd --version 6.3.0

To upgrade PMD, run the following command from the command line or from PowerShell:

C:\> choco upgrade pmd --version 6.3.0


  • tools\chocolateyInstall.ps1 Show
    $tools = Split-Path $MyInvocation.MyCommand.Definition
    $package = Split-Path $tools
    $pmd_home = Join-path $package 'pmd-bin-6.3.0'
    $pmd_bin = Join-Path $pmd_home 'bin/pmd.bat'
    $cpd_bin = Join-Path $pmd_home 'bin/cpd.bat'
    Install-ChocolateyZipPackage `
        -PackageName 'pmd' `
        -Url '' `
        -Checksum 'BE2310D64EA212126F6A7FB9A4A8D92CC73C0566326B5719BC5604D5DD198C2B' `
        -ChecksumType 'SHA256'`
        -UnzipLocation $package `
    Install-ChocolateyEnvironmentVariable `
        -VariableName 'PMD_HOME' `
        -VariableValue $pmd_home `
        -VariableType 'Machine'
    Install-BinFile -Name 'pmd' -Path $pmd_bin
    Install-BinFile -Name 'cpd' -Path $cpd_bin
  • tools\chocolateyUninstall.ps1 Show
    $tools = Split-Path $MyInvocation.MyCommand.Definition
    $package = Split-Path $tools
    $pmd_home = Join-path $package 'pmd-bin-6.3.0'
    $pmd_bin = Join-Path $pmd_home 'bin/pmd.bat'
    $cpd_bin = Join-Path $pmd_home 'bin/cpd.bat'
    Uninstall-BinFile -Name 'pmd' -Path $pmd_bin
    Uninstall-BinFile -Name 'cpd' -Path $cpd_bin

Virus Scan Results

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.


Package Maintainer(s)

Software Author(s)

  • PMD


Release Notes

Version History

Version Downloads Last updated Status
PMD 6.3.0 487 Friday, May 11, 2018 approved
PMD 5.8.1 331 Tuesday, September 12, 2017 approved
PMD 5.3.2 456 Tuesday, July 7, 2015 approved

Discussion for the PMD Package

Ground rules:

  • This discussion is only about PMD and the PMD package. If you have feedback for Chocolatey, please contact the google group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or PMD, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.

comments powered by Disqus uses cookies to enhance the user experience of the site.