首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >通过Jenkins运行maven项目时出错

通过Jenkins运行maven项目时出错
EN

Stack Overflow用户
提问于 2017-02-11 15:01:07
回答 2查看 942关注 0票数 0

当我试图在Jenkins中构建我的maven项目时,我得到了以下错误。

代码语言:javascript
复制
[ERROR] Failed to execute goal com.oracle.adf.plugin:ojmake:12.2.1-0-0:compile (default) on project TestApp: Execution default of goal com.oracle.adf.plugin:ojmake:12.2.1-0-0:compile failed: Unable to load the mojo 'compile' in the plugin 'com.oracle.adf.plugin:ojmake:12.2.1-0-0' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: oracle/jdeveloper/deploy/maven/OjmakeMojo : Unsupported major.minor version 52.0
[ERROR] -----------------------------------------------------
[JENKINS] Archiving C:\test\pom.xml to com.test/test/3.7.2/TestApp-3.7.2.pom
[ERROR] realm =    plugin>com.oracle.adf.plugin:ojmake:12.2.1-0-0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/maven-repository/com/oracle/adf/plugin/ojmake/12.2.1-0-0/ojmake-12.2.1-0-0.jar
[ERROR] urls[1] = file:/C:/maven-repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------

Jenkins版本: 2.19.2

Maven版本: 3.3.9

jdk版本: 1.7.0_79

我在我的pom.xml文件中使用了maven编译器插件,目标和源代码设置为1.7。我在Windows环境下工作。已确保根据需要设置PATH变量。但是,Jenkins作业仍然失败。如何克服这个错误?

EN

回答 2

Stack Overflow用户

发布于 2017-02-11 15:26:03

显示的版本号描述了类文件与之兼容的JRE版本。Java SE 8= 52可能是您有需要java 1.8的依赖项

参考- https://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html

票数 0
EN

Stack Overflow用户

发布于 2018-06-08 03:58:19

通过将源代码中所有pom.xml文件中的ojmake.exe替换为ojmake文件,可以解决此问题。

JDeveloper提供了多种类型的ojmake文件,使用Linux命令' file‘检查文件的类型,并检查它是否是Linux可执行文件。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42173251

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档