Problem: When attempting to set the location through the extension preference window of PMD for BlueJ 5.x or launching the extension from a context menu, a file not found exception occurs.
Cause: As the title notes, the main PMD distribution changed the entry-point script name for Linux/Mac from <pmd distro>/bin/run.sh or variations to just <pmd distro>/bin/pmd a while back (at least PMD v6.55 which is current in Homebrew, but also applies to the latest snapshot 7.x from the main website).
Reference:
These three spots were the only obvious references I found on cursory look.
Resolution: As a workaround, it works for my needs (in the extension by adding a symbolic link in the bin folder of the distribution (ln -s pmd run.sh.
For a more permanent resolution, switching to the current entry-point script name in code would probably be the forward-thinking way to handle it, and warn if using an older PMD distribution where the older expected entry point is present, but continue to execute the underlying, older PMD distribution.
Problem: When attempting to set the location through the extension preference window of PMD for BlueJ 5.x or launching the extension from a context menu, a file not found exception occurs.
Cause: As the title notes, the main PMD distribution changed the entry-point script name for Linux/Mac from
<pmd distro>/bin/run.sh
or variations to just<pmd distro>/bin/pmd
a while back (at least PMD v6.55 which is current in Homebrew, but also applies to the latest snapshot 7.x from the main website).Reference:
These three spots were the only obvious references I found on cursory look.
https://github.com/pmd/pmd-bluej/blob/de2e9b13d5ed9e622fa2f3c3947b2876d6581a7e/src/main/java/net/sourceforge/pmd/Preferences.java#L87
https://github.com/pmd/pmd-bluej/blob/de2e9b13d5ed9e622fa2f3c3947b2876d6581a7e/src/main/java/net/sourceforge/pmd/Preferences.java#L73
https://github.com/pmd/pmd-bluej/blob/de2e9b13d5ed9e622fa2f3c3947b2876d6581a7e/src/main/java/net/sourceforge/pmd/MenuBuilder.java#L74
Resolution: As a workaround, it works for my needs (in the extension by adding a symbolic link in the bin folder of the distribution (
ln -s pmd run.sh
.For a more permanent resolution, switching to the current entry-point script name in code would probably be the forward-thinking way to handle it, and warn if using an older PMD distribution where the older expected entry point is present, but continue to execute the underlying, older PMD distribution.