Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-11064

[camel-k] kamel install --repository option is not working for plugins

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.4-GA
    • fuse-7.4-GA
    • Camel
    • None
    • % %

      kamel install --maven-repository http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all/
      kamel run foo.groovy
      oc log camel-k-operator-65bccd6d6c-xvkzn
      
      {"level":"info","ts":1563367870.6915715,"logger":"camel-k.builder","msg":"executing step","step":"github.com/apache/camel-k/pkg/builder/SanitizeDependencies","phase":13,"context":"ctx-bknhjfh3lf0crfaptc2g"}
      {"level":"info","ts":1563367870.6915762,"logger":"camel-k.builder","msg":"step done in 0.000000 seconds","step":"github.com/apache/camel-k/pkg/builder/SanitizeDependencies","phase":13,"context":"ctx-bknhjfh3lf0crfaptc2g"}
      {"level":"info","ts":1563367870.6915846,"logger":"camel-k.builder","msg":"executing step","step":"github.com/apache/camel-k/pkg/builder/ComputeDependencies","phase":20,"context":"ctx-bknhjfh3lf0crfaptc2g"}
      {"level":"info","ts":1563367870.6984468,"logger":"camel-k.maven","msg":"execute: mvn -Dmaven.repo.local=/tmp/artifacts/m2 org.apache.camel.k:camel-k-maven-plugin:0.3.4.fuse-740009-redhat-00002:generate-dependency-list --batch-mode --settings /tmp/builder-867961064/maven/settings.xml"}
      [INFO] Scanning for projects...
      [INFO] Downloading: http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all/org/apache/camel/camel-bom/2.21.0.fuse-740039-redhat-00001/camel-bom-2.21.0.fuse-740039-redhat-00001.pom
      [INFO] Downloaded: http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all/org/apache/camel/camel-bom/2.21.0.fuse-740039-redhat-00001/camel-bom-2.21.0.fuse-740039-redhat-00001.pom (104 kB at 750 kB/s)
      [INFO] Downloading: http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all/org/apache/camel/camel/2.21.0.fuse-740039-redhat-00001/camel-2.21.0.fuse-740039-redhat-00001.pom
      [INFO] Downloaded: http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all/org/apache/camel/camel/2.21.0.fuse-740039-redhat-00001/camel-2.21.0.fuse-740039-redhat-00001.pom (32 kB at 1.6 MB/s)
      [INFO] Downloading: http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all/org/apache/apache/18.0.0.redhat-1/apache-18.0.0.redhat-1.pom
      [INFO] Downloaded: http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all/org/apache/apache/18.0.0.redhat-1/apache-18.0.0.redhat-1.pom (17 kB at 1.1 MB/s)
      [INFO] Downloading: http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all/org/jboss/jboss-parent/19.0.0.redhat-2/jboss-parent-19.0.0.redhat-2.pom
      [INFO] Downloaded: http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all/org/jboss/jboss-parent/19.0.0.redhat-2/jboss-parent-19.0.0.redhat-2.pom (33 kB at 1.6 MB/s)
      [INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/apache/21.0.0.redhat-00001/apache-21.0.0.redhat-00001.pom
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1.132 s
      [INFO] Finished at: 2019-07-17T12:51:13Z
      [INFO] Final Memory: 10M/119M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Plugin org.apache.camel.k:camel-k-maven-plugin:0.3.4.fuse-740009-redhat-00002 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.camel.k:camel-k-maven-plugin:jar:0.3.4.fuse-740009-redhat-00002: Could not find artifact org.apache:apache:pom:21.0.0.redhat-00001 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
      [ERROR] 
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
      {"level":"info","ts":1563367873.8277943,"logger":"camel-k.builder","msg":"step failed with error: failure while determining classpath: exit status 1","step":"github.com/apache/camel-k/pkg/builder/ComputeDependencies","phase":20,"context":"ctx-bknhjfh3lf0crfaptc2g"}
      

      camel-k-maven-plugin is not downloading dependencies from additional repository (in my case from http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all) because there is no pluginRepository in settings.xml which is used.

      ➜  tmp oc get ConfigMap camel-k-maven-settings -o yaml
      apiVersion: v1
      data:
        settings.xml: |-
          <?xml version="1.0" encoding="UTF-8"?>
          <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
            <localRepository></localRepository>
            <profiles>
              <profile>
                <id>maven-settings</id>
                <activation>
                  <activeByDefault>true</activeByDefault>
                </activation>
                <repositories>
                  <repository>
                    <id>repository-000</id>
                    <url>http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all/</url>
                    <snapshots>
                      <enabled>false</enabled>
                    </snapshots>
                    <releases>
                      <enabled>true</enabled>
                    </releases>
                  </repository>
                </repositories>
                <pluginRepositories></pluginRepositories>
              </profile>
            </profiles>
          </settings>
      kind: ConfigMap
      metadata:
        creationTimestamp: 2019-07-17T13:22:56Z
        labels:
          app: camel-k
        name: camel-k-maven-settings
        namespace: camel-k
        resourceVersion: "1302397"
        selfLink: /api/v1/namespaces/camel-k/configmaps/camel-k-maven-settings
        uid: fd239796-a895-11e9-a5c2-fa163e5ecf57
      

      When I change it to

      ➜  tmp oc get ConfigMap camel-k-maven-settings -o yaml
      apiVersion: v1
      data:
        settings.xml: |-
          <?xml version="1.0" encoding="UTF-8"?>
          <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
            <localRepository></localRepository>
            <profiles>
              <profile>
                <id>maven-settings</id>
                <activation>
                  <activeByDefault>true</activeByDefault>
                </activation>
                <repositories>
                  <repository>
                    <id>repository-000</id>
                    <url>http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all/</url>
                    <snapshots>
                      <enabled>false</enabled>
                    </snapshots>
                    <releases>
                      <enabled>true</enabled>
                    </releases>
                  </repository>
                </repositories>
                <pluginRepositories>
                   <pluginRepository>
                   <id>repository-000</id>
                    <url>http://nexus.fuse-qe.eng.rdu2.redhat.com/repository/fuse7-all/</url>
                    <snapshots>
                      <enabled>false</enabled>
                    </snapshots>
                    <releases>
                      <enabled>true</enabled>
                    </releases>
                    </pluginRepository>
                </pluginRepositories>
              </profile>
            </profiles>
          </settings>
      kind: ConfigMap
      metadata:
        creationTimestamp: 2019-07-17T13:22:56Z
        labels:
          app: camel-k
        name: camel-k-maven-settings
        namespace: camel-k
        resourceVersion: "1302397"
        selfLink: /api/v1/namespaces/camel-k/configmaps/camel-k-maven-settings
        uid: fd239796-a895-11e9-a5c2-fa163e5ecf57
      

      It starts work.

              nicolaferraro Nicola Ferraro (Inactive)
              jbouska@redhat.com Jan Bouska
              Jan Bouska Jan Bouska
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: