maven - YAKS 在独立 Kubernetes 集群上失败
问题描述
独立 Kubernetes 集群上的 YAKS 尝试下载 surefire-junit4 jar 失败。我已经向 ~/.m2/settings.xml 添加了一个镜像仓库以指向本地 maven 存储库,并将我的本地 maven 仓库添加到 yaks-config.yaml,但显然没有成功将 YAKS 容器指向我的本地 maven回购。
$ yaks test helloworld.test
test "helloworld" updated
+ test-helloworld-c287tt0uobphu24pdl8g-xgjnx > test
test-helloworld-c287tt0uobphu24pdl8g-xgjnx test [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.22.2:integration-test (integration-tests) yaks-runtime-maven: Unable to generate classpath: org.apache.maven.artifact.resolver.ArtifactResolutionException: Unable to get dependency information for org.apache.maven.surefire:surefire-junit4:jar:2.22.2: Failed to retrieve POM for org.apache.maven.surefire:surefire-junit4:jar:2.22.2: Could not transfer artifact org.apache.maven.surefire:surefire-junit4:pom:2.22.2 from/to central (https:repo.maven.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.22.2/surefire-junit4-2.22.2.pom
test-helloworld-c287tt0uobphu24pdl8g-xgjnx test [ERROR] org.apache.maven.surefire:surefire-junit4:jar:2.22.2
test-helloworld-c287tt0uobphu24pdl8g-xgjnx test [ERROR]
test-helloworld-c287tt0uobphu24pdl8g-xgjnx test [ERROR] from the specified remote repositories:
test-helloworld-c287tt0uobphu24pdl8g-xgjnx test [ERROR] central (https://repo.maven.apache.org/maven2, releases-true, snapshots=false)
要测试的功能是简单的 hello world:
Feature: Hello
Scenario: Print hello message
Given print 'Hello from YAKS!'
创建了 pod 和容器,因此 YAKS 成功地从本地 docker 注册表中提取了 docker.io/citrusframework/yaks:0.3.0 映像。
解决方案
推荐阅读
- c# - 查找相关对象
- date - 将 CURRENT_DATE 或 UNIX_TIMESTAMP 转换为 Hive 中的字符串(YYYY-DD-MM 格式)
- sql - 在连接表上使用任意布尔表达式进行查询
- visual-studio - Xamarin Forms Previewer 在 Visual Studio for Mac 中不起作用。给出错误消息:找不到与此 XAML 文件关联的基类
- c++ - 按给定字符串中出现的顺序打印字符及其频率,但我无法理解行“freq[str[i] - 'a']++;”
- javascript - 如何将此产品轮播更改为每项 1 行而不是每项 3 行?
- tensorflow - 你能在 Tensorflow 对象检测 API 中训练时改变你的学习率吗
- android - 状态栏未在 MIUI 和 EMUI 设备上显示
- javascript - 如何调试无法打开的页面(空白页面)
- asp.net-mvc-4 - 如何在 ASP.NETMVC 中将页面模型与网格事务 (iggrid) 一起发送到服务器