简体   繁体   English

Jitpack 使用错误配置的工具链构建失败

[英]Jitpack failing a build with Misconfigured Toolchain

I am trying to compile a forked repo with jitpack becaause the repo is not published to maven and has several bugfixes over its prior release that is published on maven.我正在尝试使用jitpack编译一个分叉的 repo,因为该 repo 没有发布到 maven,并且在 maven 上发布的先前版本中有几个错误修正。 However, I keep getting a misconfigured toolchain error:但是,我不断收到配置错误的工具链错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-toolchains-plugin:1.1:toolchain (default) on project microbean-kubernetes-controller: Misconfigured toolchains. Non-existing JDK home configuration at /usr/lib/jvm/java-6-oracle -> [Help 1]

I've been at this for a few hours now, and I have basically given up.我已经在这里呆了几个小时了,我基本上已经放弃了。

The repo is at: https://github.com/asuprem/microbean-kubernetes-controller回购位于: https : //github.com/asuprem/microbean-kubernetes-controller

The pom.xml is at: https://github.com/asuprem/microbean-kubernetes-controller/blob/master/pom.xml pom.xml 位于: https : //github.com/asuprem/microbean-kubernetes-controller/blob/master/pom.xml

The build log for jitpack is at: https://jitpack.io/com/github/asuprem/microbean-kubernetes-controller/v0.2.3.3/build.log jitpack 的构建日志位于: https ://jitpack.io/com/github/asuprem/microbean-kubernetes-controller/v0.2.3.3/build.log

I am specifically getting the following error:我特别收到以下错误:

[INFO] Required toolchain: jdk [ version='1.8' ]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.134 s
[INFO] Finished at: 2020-10-20T20:06:17Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-toolchains-plugin:1.1:toolchain (default) on project microbean-kubernetes-controller: Misconfigured toolchains. Non-existing JDK home configuration at /usr/lib/jvm/java-6-oracle -> [Help 1]

I thought this was because the original repo did not specify a maven-compiler-plugin so I added the following to the pom:我认为这是因为原始 repo 没有指定maven-compiler-plugin所以我在 pom 中添加了以下内容:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.2</version>
  <configuration>
    <source>1.8</source>
    <target>1.8</target>
  </configuration>
</plugin>

It does compile locally though.虽然它确实在本地编译。

I also tried adding a jitpack.yml with:我还尝试添加一个jitpack.yml

jdk:
  - openjdk8

because I thought the error was the usr/lib/jvm/java-6-oracle bit, but that also failed, so I removed it.因为我认为错误是usr/lib/jvm/java-6-oracle位,但也失败了,所以我删除了它。

I know I am missing something probably incredibly simple, but staring at the logs isn't helping anymore.我知道我遗漏了一些可能非常简单的东西,但盯着日志已经无济于事了。 Any help would be greatly appreciated.任何帮助将不胜感激。

I ran into this same error.我遇到了同样的错误。 It turns out my toolchains.xml file, which maven was reading when trying to locate the appropriate JDK for the toolchain, was invalid - it had an entry for <jdkHome> that pointed to a location that did not exist.事实证明,我的toolchains.xml文件(maven 在尝试为工具链查找适当的 JDK 时正在读取该文件)无效 - 它有一个<jdkHome>条目指向一个不存在的位置。

The solution was to simply correct the incorrect path in my toolchains.xml file and then everything worked just fine.解决方案是简单地更正我的toolchains.xml文件中的错误路径,然后一切正常。

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

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