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

Unable to override maven repositories

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate Issue
    • fuse-7.8-GA
    • fuse-7.10-GA
    • Fuse Online

    Description

      continuation of ENTESB-13403 that is verified, but seems to not work correctly (even in 7.7), as observed on offline cluster.

      Having following syndesis cr configuration:

      ...
            server:
              features:
                maven:
                  append: false
                  repositories:
                    customRepo1: http://10.0.106.59:8080
      ...
      

      the repository is correctly added to the config map:

      oc get cm syndesis-server-config -o yaml
      
      ...
          maven:
            repositories:
              customRepo1: http://10.0.106.59:8080
      ...
      

      but the integration build is using other repositores as well, that prolongs the build time significantly

      oc logs -f i-vvv-1-build                                                                                              
      Caching blobs under "/var/cache/blobs".
      Getting image source signatures
      Copying blob sha256:8c5c0e6c690f733ab0daf5c4adf6d0f99962707af80ab0a9d979dcbc4bca4a3a
      Copying blob sha256:25f07378c750b25e33c2e34d53f05f1f14a320217c294f43ef7835b96db2d8ae
      Copying blob sha256:ba54bb4dbee6b0eb5125af055d7df2bff4cf3f827fb12a3b3bd7affdf786294f
      Copying blob sha256:aab524fa26271e951d909cc641d5748ee393f8b097cce6ae2d3ef9e385eb0037
      Copying blob sha256:96d330a26895c15953dadd5a7cda8801a777e3b49a21bb0f1d5e3006042399d9
      Copying config sha256:134357ea11f2cdb20e59909ed847c21eb9a1c39817019cc7ecde108696bb99a4
      Writing manifest to image destination
      Storing signatures
      Generating dockerfile with builder image registry.redhat.io/fuse7/fuse-ignite-s2i@sha256:0b8b41f53437e847eae4106eb6f8e7e84ce8f4334dabcbc175b0ec73b027bc86
      Copying sources from "/tmp/build/inputs" to "/tmp/dockercontext/upload/src"
      STEP 1: FROM registry.redhat.io/fuse7/fuse-ignite-s2i@sha256:0b8b41f53437e847eae4106eb6f8e7e84ce8f4334dabcbc175b0ec73b027bc86
      STEP 2: LABEL "io.openshift.s2i.destination"="/tmp"       "io.openshift.build.image"="registry.redhat.io/fuse7/fuse-ignite-s2i@sha256:0b8b41f53437e847eae4106eb6f8e7e84ce8f4334dabcbc175b0ec73b027bc86"       "io.openshift.build.source-location"="/tmp/build/inputs"
      STEP 3: ENV OPENSHIFT_BUILD_NAME="i-vvv-1"     OPENSHIFT_BUILD_NAMESPACE="avano-syndesis"     MAVEN_OPTS="-XX:+UseG1GC -XX:+UseStringDeduplication -Xmx310m"     MAVEN_ARGS_APPEND="--strict-checksums"     BUILD_LOGLEVEL="1"
      STEP 4: USER root
      STEP 5: COPY upload/scripts /tmp/scripts
      STEP 6: COPY upload/src /tmp/src
      STEP 7: RUN chown -R 185:0 /tmp/scripts /tmp/src
      STEP 8: USER 185
      STEP 9: RUN /tmp/scripts/assemble
      ==================================================================
      Starting S2I Java Build .....
      S2I source build for Maven detected
      Using custom maven settings from /tmp/src/configuration/settings.xml
      Using MAVEN_OPTS '-XX:+UseG1GC -XX:+UseStringDeduplication -Xmx310m'
      Found pom.xml ... 
      Running 'mvn -Dmaven.repo.local=/tmp/artifacts/m2 -s /tmp/src/configuration/settings.xml package -DskipTests -Dmaven.javadoc.skip=true -Dmaven.site.skip=true -Dmaven.source.skip=true -Djacoco.skip=true -Dcheckstyle.skip=true -Dfindbugs.skip=true -Dpmd.skip=true -Dfabric8.skip=true -e -B --strict-checksums'
      OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
      Apache Maven 3.5.0 (Red Hat 3.5.0-4.3)
      Maven home: /opt/rh/rh-maven35/root/usr/share/maven
      Java version: 1.8.0_262, vendor: Oracle Corporation
      Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-0.el7_8.x86_64/jre
      Default locale: en_US, platform encoding: ANSI_X3.4-1968
      OS name: "linux", version: "4.18.0-193.23.1.el8_2.x86_64", arch: "amd64", family: "unix"
      OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
      [INFO] Error stacktraces are turned on.
      [INFO] Scanning for projects...
      [INFO] 
      [INFO] ------------------------------------------------------------------------
      [INFO] Building Syndesis Integrations :: vvv 0.1-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] Downloading: https://repo.maven.apache.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
      [INFO] Downloading: https://repo.maven.apache.org/maven2/com/jcraft/jsch/0.1.54.redhat-00001/jsch-0.1.54.redhat-00001.jar
      [INFO] Downloading: https://repo.maven.apache.org/maven2/org/jboss/spec/javax/annotation/jboss-annotations-api_1.2_spec/1.0.2.Final/jboss-annotations-api_1.2_spec-1.0.2.Final.jar
      [INFO] Downloading: https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.14.4.redhat-00001/okhttp-3.14.4.redhat-00001.jar
      [INFO] Downloading: https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.17.2.redhat-00002/okio-1.17.2.redhat-00002.jar
      [INFO] Downloading: https://maven.repository.redhat.com/ga/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
      [INFO] Downloading: https://maven.repository.redhat.com/ga/com/jcraft/jsch/0.1.54.redhat-00001/jsch-0.1.54.redhat-00001.jar
      [INFO] Downloading: https://maven.repository.redhat.com/ga/org/jboss/spec/javax/annotation/jboss-annotations-api_1.2_spec/1.0.2.Final/jboss-annotations-api_1.2_spec-1.0.2.Final.jar
      [INFO] Downloading: https://maven.repository.redhat.com/ga/com/squareup/okhttp3/okhttp/3.14.4.redhat-00001/okhttp-3.14.4.redhat-00001.jar
      [INFO] Downloading: https://maven.repository.redhat.com/ga/com/squareup/okio/okio/1.17.2.redhat-00002/okio-1.17.2.redhat-00002.jar
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] I/O exception (java.net.SocketException) caught when processing request to {s}->https://maven.repository.redhat.com:443: Network is unreachable (connect failed)
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] Retrying request to {s}->https://maven.repository.redhat.com:443
      [INFO] Downloading: https://repository.jboss.org/nexus/content/groups/ea/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
      [INFO] Downloading: https://repository.jboss.org/nexus/content/groups/ea/com/jcraft/jsch/0.1.54.redhat-00001/jsch-0.1.54.redhat-00001.jar
      [INFO] Downloading: https://repository.jboss.org/nexus/content/groups/ea/org/jboss/spec/javax/annotation/jboss-annotations-api_1.2_spec/1.0.2.Final/jboss-annotations-api_1.2_spec-1.0.2.Final.jar
      [INFO] Downloading: https://repository.jboss.org/nexus/content/groups/ea/com/squareup/okhttp3/okhttp/3.14.4.redhat-00001/okhttp-3.14.4.redhat-00001.jar
      [INFO] Downloading: https://repository.jboss.org/nexus/content/groups/ea/com/squareup/okio/okio/1.17.2.redhat-00002/okio-1.17.2.redhat-00002.jar
      [INFO] Downloading: https://repo1.maven.org/maven2/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
      [INFO] Downloading: https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.54.redhat-00001/jsch-0.1.54.redhat-00001.jar
      [INFO] Downloading: https://repo1.maven.org/maven2/org/jboss/spec/javax/annotation/jboss-annotations-api_1.2_spec/1.0.2.Final/jboss-annotations-api_1.2_spec-1.0.2.Final.jar
      [INFO] Downloading: https://repo1.maven.org/maven2/com/squareup/okio/okio/1.17.2.redhat-00002/okio-1.17.2.redhat-00002.jar
      [INFO] Downloading: https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/3.14.4.redhat-00001/okhttp-3.14.4.redhat-00001.jar
      [INFO] Downloading: http://10.0.106.59:8080/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
      [INFO] Downloading: http://10.0.106.59:8080/com/jcraft/jsch/0.1.54.redhat-00001/jsch-0.1.54.redhat-00001.jar
      [INFO] Downloading: http://10.0.106.59:8080/org/jboss/spec/javax/annotation/jboss-annotations-api_1.2_spec/1.0.2.Final/jboss-annotations-api_1.2_spec-1.0.2.Final.jar
      [INFO] Downloading: http://10.0.106.59:8080/com/squareup/okhttp3/okhttp/3.14.4.redhat-00001/okhttp-3.14.4.redhat-00001.jar
      [INFO] Downloading: http://10.0.106.59:8080/com/squareup/okio/okio/1.17.2.redhat-00002/okio-1.17.2.redhat-00002.jar
      [INFO] Downloaded: http://10.0.106.59:8080/org/jboss/spec/javax/annotation/jboss-annotations-api_1.2_spec/1.0.2.Final/jboss-annotations-api_1.2_spec-1.0.2.Final.jar (20 kB at 331 kB/s)
      [INFO] Downloaded: http://10.0.106.59:8080/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar (84 kB at 1.4 MB/s)
      [INFO] Downloaded: http://10.0.106.59:8080/com/jcraft/jsch/0.1.54.redhat-00001/jsch-0.1.54.redhat-00001.jar (298 kB at 4.9 MB/s)
      

      the artifact is present there:

      wget http://10.0.106.59:8080/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar                                                                                       
      --2020-10-19 18:54:17--  http://10.0.106.59:8080/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
      Connecting to 10.0.106.59:8080... connected.
      HTTP request sent, awaiting response... 200 OK
      Length: 84091 (82K) [application/java-archive]
      Saving to: ‘xml-resolver-1.2.jar’
      
      xml-resolver-1.2.jar                                 100%[======================================================================================================================>]  82.12K   290KB/s    in 0.3s    
      
      2020-10-19 18:54:17 (290 KB/s) - ‘xml-resolver-1.2.jar’ saved [84091/84091]
      

      from the S2I log, it uses -s /tmp/src/configuration/settings.xml, where the content of the settings.xml is:

      cat configuration/settings.xml 
      <?xml version="1.0" encoding="UTF-8"?>
      <!--
         Copyright (C) 2016 Red Hat, Inc.
      
         Licensed under the Apache License, Version 2.0 (the "License");
         you may not use this file except in compliance with the License.
         You may obtain a copy of the License at
      
             http://www.apache.org/licenses/LICENSE-2.0
      
         Unless required by applicable law or agreed to in writing, software
         distributed under the License is distributed on an "AS IS" BASIS,
         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         See the License for the specific language governing permissions and
         limitations under the License.
      -->
      <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 http://maven.apache.org/xsd/settings-1.0.0.xsd">
      
        <profiles>
          <profile>
            <id>additional-repositories</id>
            <repositories>
              <repository>
                <id>central</id>
                <name>Maven Central</name>
                <url>https://repo.maven.apache.org/maven2/</url>
                <snapshots>
                  <enabled>false</enabled>
                </snapshots>
                <releases>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
                </releases>
              </repository>
              <repository>
                <id>redhat-ga</id>
                <name>Red Hat General Availability Repository</name>
                <url>https://maven.repository.redhat.com/ga/</url>
                <snapshots>
                  <enabled>false</enabled>
                </snapshots>
                <releases>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
                </releases>
              </repository>
              <repository>
                <id>jboss-ea</id>
                <name>JBoss Community Early Access Release Repository</name>
                <url>https://repository.jboss.org/nexus/content/groups/ea/</url>
                <snapshots>
                  <enabled>false</enabled>
                </snapshots>
                <releases>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
                </releases>
              </repository>
            </repositories>
            <pluginRepositories>
              <pluginRepository>
                <id>central</id>
                <name>Maven Central</name>
                <url>https://repo.maven.apache.org/maven2/</url>
                <snapshots>
                  <enabled>false</enabled>
                </snapshots>
                <releases>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
                </releases>
              </pluginRepository>
              <pluginRepository>
                <id>redhat-ga</id>
                <name>Red Hat General Availability Repository</name>
                <url>https://maven.repository.redhat.com/ga/</url>
                <snapshots>
                  <enabled>false</enabled>
                </snapshots>
                <releases>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
                </releases>
              </pluginRepository>
              <pluginRepository>
                <id>jboss-ea</id>
                <name>JBoss Community Early Access Release Repository</name>
                <url>https://repository.jboss.org/nexus/content/groups/ea/</url>
                <snapshots>
                  <enabled>false</enabled>
                </snapshots>
                <releases>
                  <enabled>true</enabled>
                  <updatePolicy>never</updatePolicy>
                </releases>
              </pluginRepository>
            </pluginRepositories>
          </profile>
        </profiles>
      
        <activeProfiles>
          <activeProfile>additional-repositories</activeProfile>
        </activeProfiles>
      </settings>
      

      This content shouldn't be used as I specified "append: false" in the CR, so I would expect that the only repository used will be the one I defined. My repository is added to /tmp/src/pom.xml:

      <repositories>
          <repository>
            <id>01_maven_central</id>
            <name>01_maven_central</name>
            <url>https://repo1.maven.org/maven2</url>
          </repository>
          <repository>
            <id>customRepo1</id>
            <name>customRepo1</name>
            <url>http://10.0.106.59:8080</url>
          </repository>
        </repositories>
      
        <pluginRepositories>
          <pluginRepository>
            <id>01_maven_central</id>
            <name>01_maven_central</name>
            <url>https://repo1.maven.org/maven2</url>
          </pluginRepository>
          <pluginRepository>
            <id>customRepo1</id>
            <name>customRepo1</name>
            <url>http://10.0.106.59:8080</url>
          </pluginRepository>
        </pluginRepositories>
      

      along with the maven central (which is also wrong).

      Attachments

        Issue Links

          Activity

            People

              mariasde Maria Arias de Reyna Dominguez
              avano@redhat.com Andrej Vano
              Jan Safarik Jan Safarik
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: