You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/01/31 13:53:23 UTC

[GitHub] [camel-k] k0pper opened a new issue #2966: Configure Maven: Artifact Repository is not recognized

k0pper opened a new issue #2966:
URL: https://github.com/apache/camel-k/issues/2966


   I followed the instructions on https://camel.apache.org/camel-k/1.8.x/configuration/maven.html to configure Camel-K and which repository to use. My goal is that the Integrations download their dependencies from gitlab's package registry, and if not found it looks it up on Maven Central. How is this possible?
   
   I created an this settings.xml:
   https://gist.github.com/k0pper/e2e8530634e9df159f26e8148e943a0b
   
   and created a configmap from it:
   ```
   kubectl create configmap maven-settings --from-file=settings.xml
   ```
   
   Then, I referenced the created configmap in the integrationplatform.yaml in the cluster.
   
   ```
   apiVersion: camel.apache.org/v1
   kind: IntegrationPlatform
   metadata:
     labels:
       app: camel-k
       app.kubernetes.io/instance: RELEASE-NAME
       app.kubernetes.io/managed-by: Helm
       app.kubernetes.io/name: camel-k
       app.kubernetes.io/version: 1.8.0
       helm.sh/chart: camel-k-0.9.0
     name: camel-k
     namespace: camel-k
   spec:
     build:
       maven:
         settings:
           configMapKeyRef:
             key: settings.xml
             name: maven-settings
   ```
   
   
   Now, **The Problem**: The Logs of the Operator trying to deploy an integration doesn't even mention the **gitlab-maven** repository. When resolving the dependencies, it logs:
   ```
    {"level":"info","ts":1643637038.4897394,"logger":"camel-k.maven.build","msg":"Downloading from central: https://repo.maven.apache.org/maven2/org/apache/camel/quarkus/camel-quarkus-timer/2.6.0/camel-quarkus-timer-2.6.0.pom"}
   ```
    
   Shouldn't it be at least "Downloading from centralllll", because that is the ID for the Central Repository in the settings.xml?
   
   What is happening?
   
   Alex
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] k0pper commented on issue #2966: Configure Maven: Artifact Repository is not recognized

Posted by GitBox <gi...@apache.org>.
k0pper commented on issue #2966:
URL: https://github.com/apache/camel-k/issues/2966#issuecomment-1026002036


   Thanks a lot. It works now. I updated the gist. 
   
   I had to explicitly enable the gitlab-maven repository, as you can read in the gist.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] astefanutti commented on issue #2966: Configure Maven: Artifact Repository is not recognized

Posted by GitBox <gi...@apache.org>.
astefanutti commented on issue #2966:
URL: https://github.com/apache/camel-k/issues/2966#issuecomment-1025829499


   Could you try by adding your own repositories to the following settings:
   
   ```
   kubectl get cm 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>camel-k</id>
             <activation>
               <activeByDefault>true</activeByDefault>
             </activation>
             <repositories>
               <repository>
                 <id>central</id>
                 <url>https://repo.maven.apache.org/maven2</url>
                 <snapshots>
                   <enabled>false</enabled>
                   <checksumPolicy>fail</checksumPolicy>
                 </snapshots>
                 <releases>
                   <enabled>false</enabled>
                   <checksumPolicy>fail</checksumPolicy>
                 </releases>
               </repository>
               <repository>
                 <id>apache-snapshots</id>
                 <url>https://repository.apache.org/content/repositories/snapshots</url>
                 <snapshots>
                   <enabled>false</enabled>
                   <checksumPolicy>fail</checksumPolicy>
                 </snapshots>
                 <releases>
                   <enabled>false</enabled>
                   <checksumPolicy>fail</checksumPolicy>
                 </releases>
               </repository>
             </repositories>
             <pluginRepositories>
               <pluginRepository>
                 <id>central</id>
                 <url>https://repo.maven.apache.org/maven2</url>
                 <snapshots>
                   <enabled>false</enabled>
                   <checksumPolicy>fail</checksumPolicy>
                 </snapshots>
                 <releases>
                   <enabled>false</enabled>
                   <checksumPolicy>fail</checksumPolicy>
                 </releases>
               </pluginRepository>
             </pluginRepositories>
           </profile>
         </profiles>
         <proxies></proxies>
         <mirrors></mirrors>
       </settings>
   kind: ConfigMap
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] astefanutti edited a comment on issue #2966: Configure Maven: Artifact Repository is not recognized

Posted by GitBox <gi...@apache.org>.
astefanutti edited a comment on issue #2966:
URL: https://github.com/apache/camel-k/issues/2966#issuecomment-1025770002


   Maven central is added by default to the "platform" Maven settings, so you have to disable it in your custom Maven settings, e.g.:
   
   ```xml
   <repositories>
       <repository>
           <id>central</id>
           <url>http://repo1.maven.org/maven2</url>
           <releases>
               <enabled>false</enabled>
           </releases>
           <snapshots>
               <enabled>false</enabled>
           </snapshots>
       </repository>    
   </repositories>
   <pluginRepositories>
       <pluginRepository>
           <id>central</id>
           <url>http://repo1.maven.org/maven2</url>
           <releases>
               <enabled>false</enabled>
           </releases>
           <snapshots>
               <enabled>false</enabled>
           </snapshots>
       </pluginRepository>
   </pluginRepositories>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] k0pper commented on issue #2966: Configure Maven: Artifact Repository is not recognized

Posted by GitBox <gi...@apache.org>.
k0pper commented on issue #2966:
URL: https://github.com/apache/camel-k/issues/2966#issuecomment-1025785521


   I changed the settings.xml, and reapplied it as a configmap. It still doesn't work.
   
   Can you provide a full working example of the settings.xml with your changes? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] astefanutti commented on issue #2966: Configure Maven: Artifact Repository is not recognized

Posted by GitBox <gi...@apache.org>.
astefanutti commented on issue #2966:
URL: https://github.com/apache/camel-k/issues/2966#issuecomment-1025770002


   Maven central is added by default to the "platform" Maven settings, so you have to disable it in your custom Maven settings, e.g.:
   
   ```xml
   <repositories>
       <repository>
           <id>central</id>
           <url>http://repo1.maven.org/maven2</url>
           <releases>
                   <enabled>false</enabled>
           </releases>
           <snapshots>
               <enabled>false</enabled>
           </snapshots>
       </repository>    
   </repositories>
   <pluginRepositories>
       <pluginRepository>
           <id>central</id>
           <url>http://repo1.maven.org/maven2</url>
           <releases>
               <enabled>false</enabled>
           </releases>
           <snapshots>
               <enabled>false</enabled>
           </snapshots>
       </pluginRepository>
   </pluginRepositories>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] k0pper closed issue #2966: Configure Maven: Artifact Repository is not recognized

Posted by GitBox <gi...@apache.org>.
k0pper closed issue #2966:
URL: https://github.com/apache/camel-k/issues/2966


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org