Pmd version 3.9 - How to Download and Install on Mac OS X
Saturday the 7th of November, 2009

    version 3.9

      View the most recent changes for the pmd port at: pmd.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for pmd.
      The raw portfile for pmd 3.9 is located here:
      http://pmd.darwinports.com/dports/java/pmd/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/pmd


      The pmd Portfile 50980 2009-05-14 19:41:55Z and.damore macports.org $

      PortSystem 1.0

      Name: pmd
      Version: 3.9

      Category: java lang
      Platform: darwin
      Maintainers: landonf openmaintainer

      Description: PMD is a Java source code analyzer
      Long Description: PMD is a Java source code analyzer. It finds unused variables, empty catch blocks, unnecessary object creation, and so forth.

      Homepage: http://pmd.sourceforge.net/
      Master Sites: sourceforge
      distname ${name}-src-${version}
      Checksums: md5 2ddefa2c0aa890693e2ce07a548b189f
      use_zip yes

      depends_build bin:ant:apache-ant

      worksrcdir ${name}-${version}

      post-extract {
      # Ensure this gets rebuilt
      file delete ${worksrcpath}/lib/pmd-${version}.jar
      }

      use_configure no

      build.cmd ant
      build.target dist
      build.dir ${worksrcpath}/bin

      destroot {
      # Install the wrapper script
      xinstall -m 755 ${filespath}/pmd ${destroot}${prefix}/bin
      reinplace "s|_PREFIX_|${prefix}|g" ${destroot}${prefix}/bin/pmd

      # Install jars
      xinstall -m 755 -d ${destroot}${prefix}/share/pmd
      file copy ${worksrcpath}/rulesets ${destroot}${prefix}/share/pmd
      foreach file [glob ${worksrcpath}/lib/*.jar] {
      xinstall -m 644 ${file} ${destroot}${prefix}/share/pmd/
      }
      system "cd ${destroot}${prefix}/share/pmd && ln -s pmd-${version}.jar pmd.jar"

      # Install documentation
      xinstall -m 755 -d ${destroot}${prefix}/share/doc/pmd
      file copy ${worksrcpath}/docs ${destroot}${prefix}/share/doc/pmd
      }

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/pmd
      % sudo port install pmd
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching pmd
      ---> Verifying checksum for pmd
      ---> Extracting pmd
      ---> Configuring pmd
      ---> Building pmd with target all
      ---> Staging pmd into destroot
      ---> Installing pmd
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using pmd with these commands:
      %  man pmd
      % apropos pmd
      % which pmd
      % locate pmd

     Where to find more information:

    Darwin Ports



    Lightbox this page.