我在嘗試在Jenkins中構建我的maven項目時出現以下錯誤。通過Jenkins運行maven項目時出錯
[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] -----------------------------------------------------
詹金斯版本:2.19.2
Maven的版本:3.3.9
JDK版本:1.7.0_79
我使用maven編譯器插件在我的pom.xml文件,目標和來源集合是1.7。我正在Windows環境中工作。確保PATH變量根據需要設置。但是,詹金斯的工作仍然失敗。 如何克服這個錯誤?
安裝了Jdk8並配置了我的Jenkins作業以使用此JDK版本。仍然有錯誤。 '[錯誤]無法執行目標com.oracle.adf.plugin:ojmake:12.2.1-0-0:編譯(默認)項目TestAppView:無法運行程序「$ {env.ORACLE_HOME}/jdeveloper/jdev/bin /ojmake.exe「:CreateProcess error = 2,系統找不到指定的文件 - > [Help 1]' – akr
我可以看到java錯誤已經消失,但是現在看起來好像是缺少文件問題 '無法運行程序「$ {env.ORACLE_HOME} /jdeveloper/jdev/bin/ojmake.exe」 此行明確指出名爲「ojmake.exe」的文件在所提及的路徑 中缺失,即**「$ { env.ORACLE_HOME} /jdeveloper/jdev/bin/ojmake.exe「**。 因此,請將所需的文件(ojmake.exe)放在該位置。讓我們檢查一下它是否執行得更遠。 手指交叉。 – vijayraj34