Search code examples
phpjenkinsjenkins-cliphpmd

PHPMD @bin_dir@ error


I try to install PHPMD on Windows computer using the comments below

$ git clone git://github.com/phpmd/phpmd.git
cd phpmd
$ git submodule update --init
$ php composer.phar install

After installed PHPMD, I am getting the below error when I am trying to use PHPMD on Windows command prompt

Could not open input file: @bin_dir@\phpmd

Any one can help me to fix this issue


Solution

  • Don't know if you got your problem fixed, but I had the same issue today and found a solution that works for me.

    You need to edit the last line in your phpmd.bat file. When installed it looks like this:

    "%PHPBIN%" "@php_bin@\phpmd" %*
    

    And you need to update the @php_bin@ part to reflect the path to your phpmd file. Could be something along the lines of:

    "%PHPBIN%" "C:\xampp\htdocs\project\vendor\phpmd\src\bin\phpmd" %*