Search code examples
javamavenjdk6

Error while running building maven project - plugins, API incompatibility


I am facing problem while trying to run maven build with JDK6. I am running build inside docker container with JDK6 and Maven.

Do I get it right, that the plugins are not compatibile with JDK6 version and I should use lower version of help plugin? I cannot change JDK version to higher, I ran into this problem while trying to enable bulding project with JDK6, so I want to solve this problem.

error message from Maven:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate (default-cli) on project security-component: Execution default-cli of goal org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate failed: Unable to load the mojo 'evaluate' in the plugin 'org.apache.maven.plugins:maven-help-plugin:3.2.0' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/apache/maven/plugins/help/EvaluateMojo : Unsupported major.minor version 51.0
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-help-plugin:3.2.0

mvn -version output:

Maven home: /usr/share/maven
Java version: 1.6.0_41, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre

Solution

  • indeed problem was in too high version of help plugin, I lower it to 2.2 and its fine

    adding direct path to selected version of help plugin worked for me: $MVN_CMD org.apache.maven.plugins:maven-help-plugin:2.2:evaluate