简体   繁体   English

运行构建 maven 项目时出错 - 插件,API 不兼容

[英]Error while running building maven project - plugins, API incompatibility

I am facing problem while trying to run maven build with JDK6.我在尝试使用 JDK6 运行 maven 构建时遇到问题。 I am running build inside docker container with JDK6 and Maven.我正在使用 JDK6 和 Maven 在 docker 容器中运行构建。

Do I get it right, that the plugins are not compatibile with JDK6 version and I should use lower version of help plugin?我做对了吗,插件与 JDK6 版本不兼容,我应该使用较低版本的帮助插件? 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.我无法将 JDK 版本更改为更高版本,我在尝试使用 JDK6 启用构建项目时遇到了这个问题,所以我想解决这个问题。

error message from Maven:来自 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: 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

indeed problem was in too high version of help plugin, I lower it to 2.2 and its fine确实问题出在帮助插件的版本太高,我将它降低到 2.2 并且它很好

adding direct path to selected version of help plugin worked for me: $MVN_CMD org.apache.maven.plugins:maven-help-plugin:2.2:evaluate为我工作的帮助插件的选定版本添加直接路径: $MVN_CMD org.apache.maven.plugins:maven-help-plugin:2.2:evaluate

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM