将自定义jar上传到cx-server nexus [英] Uploading custom jar to cx-server nexus

查看:128
本文介绍了将自定义jar上传到cx-server nexus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我正在尝试使用s4sdk建立CI/CD管道.我成功完成了中描述的所有步骤.博客.一切似乎都运行顺利,但是我的构建因以下错误消息而失败:

So, I am trying to set up a CI/CD pipeline with the s4sdk. I successfully completed all the steps descriped in this blog. Everything seems to be running smoothly, however my build is failing with the following error message:

The following artifacts could not be resolved: com.sap.xs2.security:security-commons:jar:0.28.6, com.sap.xs2.security:java-container-security:jar:0.28.6, com.sap.xs2.security:java-container-security-api:jar:0.28.6, com.sap.security.nw.sso.linuxx86_64.opt:sapjwt.linuxx86_64:jar:1.1.19: Could not find artifact com.sap.xs2.security:security-commons:jar:0.28.6 in s4sdk-mirror (http://s4sdk-nexus:8081/repository/mvn-proxy/)

现在,此错误消息对我来说很有意义,因为我记得从SAP下载中心下载了这些工件,因此这些工件在maven Central中不可用.

Now, this error messages makes sense to me, since I remember downloading these artifacts from the SAP download center and therefore those artifacts are not available on maven central.

我认为可以通过将这些工件手动上载到nexus服务器来解决此错误,但是我不知道如何解决.根据联系文档,可以在http://<上找到可访问的Web ui. cx-server-ip>:8081,但是以某种方式没有响应.

I think this error can be resolved by manually uploading those artifacts to the nexus server, but I don't know how. According to the nexus documentation, there is a web ui reachable under http://< cx-server-ip>:8081, but it is somehow not responding.

我可以用docker ps确认jenkins和nexus容器都在运行,并且nexus容器正在侦听TCP8081.我还可以到达jenkin的前端来配置和运行我的管道.

I can confirm with docker ps that both the jenkins and nexus container are running and that the nexus container is listening on TCP 8081. I am also able to reach the jenkin's frontend to configure and run my pipeline.

我想念什么?将丢失的工件上传到联系是否正确?感谢您的帮助.

What am I missing? Is uploading the missing artifacts to the nexus the right approach? Any help is appreciated.

推荐答案

您看到的nexus容器充当下载缓存,并且设计上不能从外部访问它以防止意外更改.另外,它的生命周期由cx-server脚本控制,因此,即使您在此处手动安装了软件包,升级Jenkins也会消失.

The nexus container you see acts as a download cache and is by design not accessible from outside to prevent accidental changes to it. Also, its life-cycle is controlled by the cx-server script, so even if you installed packages there manually, they would be gone once you upgrade the Jenkins.

我认为处理此问题的最佳方法是设置另一个Nexus实例,在该实例中安装所需的软件包并配置管道以使用

I think the best way to handle this would be to set up another Nexus instance where you install the required packages and configure the pipeline to use that as described here (mvn_repository_url). This nexus needs to be configured as a mirror for Maven central. We don't have specific docs on how to do that, but this post describes a similar setup.

在此设置中,您可能要禁用下载缓存,因为它是多余的(cache_enabledfalse).

In this set up, you might want to disable the download cache as it is redundant (cache_enabled to false).

我希望这会有所帮助.

亲切的问候

弗洛里安

这篇关于将自定义jar上传到cx-server nexus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆