0

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
smxh
  • 19
  • 5
  • you are probably right, that JDK version is too low. Just try lowering plugin version to 1.6 or 2.* and see if it goes. – Augustas Oct 04 '22 at 09:15
  • so I should lower maven-help-plugin plugin right? the maven uses `mvn help:evaluate` command, so I should lower it in pom.xml or in the command? I still get confused about it – smxh Oct 04 '22 at 09:45
  • tried to use full path to help plugin in command line, and it worked :) – smxh Oct 04 '22 at 10:04

1 Answers1

1

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

smxh
  • 19
  • 5