Search code examples
eclipse-pluginpmdeclipse-2020-06eclipse-pmd

Error installing PMD on Eclipse Version: 2020-06 (4.16.0)


I recently upgraded to Eclipse Version: 2020-06 (4.16.0) on Windows 10.

My java version is "14.0.1" 2020-04-14

After the upgrade, I attempted to install Eclipse-PMD 2.0 from the Marketplace ( help / Eclipse Marketplace / etc. ) ...I receive the error(s):

Cannot complete the install because some dependencies are not satisfiable Software being installed: a.jre.javase 14.0.0 Software being installed: Eclipse PMD Plug-in 2.0.0.202006052026 (ch.acanda.eclipse.pmd.feature.feature.group 2.0.0.202006052026)
Cannot satisfy dependency: From: Eclipse PMD Plug-in 2.0.0.202006052026 (ch.acanda.eclipse.pmd.feature.feature.group 2.0.0.202006052026) To: org.eclipse.equinox.p2.iu; ch.acanda.eclipse.pmd.java.feature.feature.group [2.0.0.202006052026,2.0.0.202006052026] Cannot satisfy dependency: From: eclipse-pmd Java 2.0.0.202006052026 (ch.acanda.eclipse.pmd.java 2.0.0.202006052026) To: osgi.ee; (&(osgi.ee=JavaSE)(version=11)) Cannot satisfy dependency: From: eclipse-pmd Java Support (Optional, JDT Prerequisite) 2.0.0.202006052026 (ch.acanda.eclipse.pmd.java.feature.feature.group 2.0.0.202006052026) To: org.eclipse.equinox.p2.iu; ch.acanda.eclipse.pmd.java [2.0.0.202006052026,2.0.0.202006052026]

Does anyone have an idea(s) as regards the source of the issue ...if all else fails I may try building the PMD source from the github repo ( https://github.com/eclipse-pmd/eclipse-pmd ) but I cannot imagine why this should be necessary.


Solution

  • I created eclipse-pmd and I can install eclipse-pmd 2.0 from the marketplace with Java 14 and Eclipse 2020-06 without any problems.

    From the error message you provided it looks like there are two missing dependencies:

    1. ch.acanda.eclipse.pmd.java requires (&(osgi.ee=JavaSE)(version=11))
    2. several plugins require org.eclipse.equinox.p2.iu and ch.acanda.eclipse.pmd.java

    The first issue indicates that you do not run Eclipse with Java 11+. Check the Java version by opening the "Installation Details" dialog: Help > About Eclipse IDE > Installation Details > Configuration. Then look for the system property java.version. If it shows a version lower than 11, then you need to configure Eclipse to run with Java 11+.

    The second issue looks like a subsequent error. Since ch.acanda.eclipse.pmd.java couldn't be installed, all plugins that depend on this plugin cannot be installed either. Why org.eclipse.equinox.p2.iu is also mentioned in the error message is unclear to me since eclipse-pmd does not (directly) depend on this plugin and it should be a plugin installed by default in Eclipse.

    If this does not fix your problem, then please open a new issue on Github as it is easier to help with problems like this on Github than on Stack Overflow.