骆驼K带有当地的毛门储备库

发布于 2025-02-14 01:12:47 字数 401 浏览 0 评论 0原文

我希望设置使用我的设置.xml的设置。从文档中,我完成了以下步骤:

  1. kubectl创建configmap maven-settings -from-file = settings.xml
  2. 我已经验证了这在仪表板中。

当我使用Modeline或-D MVN:软件包:name:ver它找不到JAR和从骆驼k-k-operator的记录中,我没有看到有关它正在使用的存储库的任何明显的东西。

在执行以下命令时,我还需要使用其他设置来使其使用Maven -Sttings属性:

  1. kamel run -d mvn:org.project:faceproject:1.0.0 testfile.java--dev-

dev进入重试构建/部署的无限循环。

I am looking to setup the settings for using my settings.xml. from the documentation I have done the following steps:

  1. kubectl create configmap maven-settings --from-file=settings.xml
  2. I have verified that this is in the dashboard.

My issue then becomes when I use Modeline or -d mvn:package:name:ver it can't find the JAR and from the logging of the camel-k-operator I am not seeing anything obvious as to which repository it is using.

is there an additional setting I need to be using to get it to use the maven-settings attribute when doing the following command:

  1. kamel run -d mvn:org.project:fakeProject:1.0.0 TestFile.java --dev

the above just gets into an infinite loop of retrying to build/deploy.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

二智少女猫性小仙女 2025-02-21 01:12:47

您还需要配置Camel-K以使用创建的ConfigMap(我在您的步骤中看不到它)。

的名称

kamel install --maven-settings=configmap:<configmap name>/<key in the configmap with settings>

for example:
kamel install --maven-settings=configmap:maven-settings/settings.xml

创建配置映射后,使用kamel install:或者,如果您已经安装了骆驼-K,则需要指定ConfigMap 对象(路径:.spec.build.maven.settings.configmapkeyref)。当您运行第一个集成时,当名称空间中没有其他集成平台时,将创建此集成平台对象,因此,如果它在命名空间中不存在,则可以创建它,并且Camel-k运算符将捡起它,例如:

apiVersion: camel.apache.org/v1
kind: IntegrationPlatform
metadata:
  labels:
    app: camel-k
  name: camel-k
spec:
  build:
    maven:
      settings:
        configMapKeyRef:
          key: settings.xml (key in your config map)
          name: maven-settings (name of your config map)

You also need to configure Camel-K to use the configmap created (I don't see it in your steps).

After creating the config map, you either need to specify the name of the configmap when using kamel install:

kamel install --maven-settings=configmap:<configmap name>/<key in the configmap with settings>

for example:
kamel install --maven-settings=configmap:maven-settings/settings.xml

Or if you have Camel-K already installed, you need to reference the configmap in the IntegrationPlatform object (path: .spec.build.maven.settings.configMapKeyRef). This integration platform object is created when there is no other integration platform in the namespace when you run the first integration, so if it doesn't exist in your namespace, you can create it and camel-k operator will pick it up, for example:

apiVersion: camel.apache.org/v1
kind: IntegrationPlatform
metadata:
  labels:
    app: camel-k
  name: camel-k
spec:
  build:
    maven:
      settings:
        configMapKeyRef:
          key: settings.xml (key in your config map)
          name: maven-settings (name of your config map)
晨与橙与城 2025-02-21 01:12:47

配置Maven存储库的一种简单方法是在安装骆驼K运算符时执行此操作,即:

kamel install --maven-repository http://my-repo

请查看kamel install -help选项,以查看如何更好地配置它。完整的可能性列表可在官方文档中找到,网址为 https://camel.apache.org/camel-k/next/configuration/maven.html

A simple way to configure a maven repository is to do it when installing the Camel K operator, ie:

kamel install --maven-repository http://my-repo

Please, have a look at the kamel install --help options to see how to better configure it. The full list of possibilities is available in the official doc at https://camel.apache.org/camel-k/next/configuration/maven.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文