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


   **Versions**
   kubernetes: docker for dekstop 1.19
   camelk client : `Camel K Client 1.5.0`
   
   Given the following kamel installation:
   ```
   kamel install --registry testyodregistry.azurecr.io --organization mmacphail 
--registry-secret regcred --maven-repository 
https://packages.confluent.io/maven/@id=confluent --maven-repository 
https://jitpack.io/@id=jitpack
   ```
   
   And the following helloworld.groovy file:
   ```
   def bootstrap = 'my-cluster-kafka-bootstrap.kafka:9092'
   def topic = 'sensor'
   def groupId = 'test-camel-k'
   def keyDeserializer = 
'org.apache.kafka.common.serialization.StringDeserializer'
   def valueDeserializer = 
'io.confluent.kafka.serializers.KafkaAvroDeserializer'
   def schemaRegistryURL = 'http://schema-registry-service.kafka:8081'
   
   def kafka = 
"kafka:${topic}?brokers=${bootstrap}&groupId=${groupId}&autoOffsetReset=earliest&keyDeserializer=${keyDeserializer}&valueDeserializer=${valueDeserializer}&schemaRegistryURL=${schemaRegistryURL}"
   
   from(kafka)
     .process({e -> println e.getIn().getBody().getClass()})
     .to('log:info?showBody=true&showHeaders=true')
   ```
   
   Running the integration using jitpack dependency fails using this `kamel 
run` command:
   ```
   kamel run -d camel-kafka -d mvn:io.confluent:kafka-avro-serializer:6.0.0 -d 
mvn:com.github.mmacphail:temp-schemas:1.0 helloworld.groovy
   ```
   This fails although `https://jitpack.io/#mmacphail/temp-schemas/1.0` exists.
   
   The failure happens during the building kit phase.
   A describe such as `kubectl describe integration helloworld ` shows the 
following information:
   ```
     Normal  ReasonRelatedObjectChanged   2m6s                 
camel-k-build-controller            Integration helloworld subresource 
kit-c4ia81qmvrereqhrjk50 (Build) changed phase to "Running" (recovery 1 of 5)
     Normal  ReasonRelatedObjectChanged   2m3s                 
camel-k-build-controller            Integration helloworld subresource 
kit-c4ia81qmvrereqhrjk50 (Build) changed phase to "Failed" (recovery 1 of 5)
     Normal  ReasonRelatedObjectChanged   54s (x15 over 116s)  
camel-k-build-controller            (combined from similar events): Integration 
helloworld subresource kit-c4ia81qmvrereqhrjk50 (Build) changed phase to 
"Failed" (recovery 4 of 5)
     Normal  ReasonRelatedObjectChanged   54s (x15 over 116s)  
camel-k-build-controller            (combined from similar events): Integration 
helloworld subresource kit-c4ia81qmvrereqhrjk50 (Build) changed phase to 
"Failed" (recovery 4 of 5)
   ```
   
   Logs of the camel-k-operator pod show the following:
   ```
   
{"level":"error","ts":1629791431.6187263,"logger":"camel-k.maven.build","msg":"Failed
 to execute goal on project camel-k-integration: Could not resolve dependencies 
for project org.apache.camel.k.integration:camel-k-integration:jar:1.5.0: Could 
not find artifact com.github.mmacphail.temp-schemas:temp-schemas:jar:1.0 in 
central (https://repo.maven.apache.org/maven2) -> [Help 
1]","stacktrace":"github.com/apache/camel-k/pkg/util/log.Logger.Errorf\n\tgithub.com/apache/camel-k/pkg/util/log/log.go:60\ngithub.com/apache/camel-k/pkg/util/maven.normalizeLog\n\tgithub.com/apache/camel-k/pkg/util/maven/maven_log.go:62\ngithub.com/apache/camel-k/pkg/util/maven.(*Command).Do\n\tgithub.com/apache/camel-k/pkg/util/maven/maven_command.go:140\ngithub.com/apache/camel-k/pkg/builder.BuildQuarkusRunnerCommon\n\tgithub.com/apache/camel-k/pkg/builder/quarkus.go:189\ngithub.com/apache/camel-k/pkg/builder.buildQuarkusRunner\n\tgithub.com/apache/camel-k/pkg/builder/quarkus.go:163\ngithub.com/apache/camel-
 
k/pkg/builder.(*builderStep).execute\n\tgithub.com/apache/camel-k/pkg/builder/steps.go:46\ngithub.com/apache/camel-k/pkg/builder.(*builderTask).Do\n\tgithub.com/apache/camel-k/pkg/builder/builder.go:125\ngithub.com/apache/camel-k/pkg/controller/build.(*monitorRoutineAction).runBuild\n\tgithub.com/apache/camel-k/pkg/controller/build/monitor_routine.go:146"}
   ```
   
   I don't understand why this dependency is not found  since it's the jitpack 
repository is correctly added to the settings.xml. The command `kubectl 
describe configmap camel-k-maven-settings` returns the following:
   ```
   Name:         camel-k-maven-settings
   Namespace:    default
   Labels:       app=camel-k
   Annotations:  <none>
   
   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>central</id>
             <url>https://repo.maven.apache.org/maven2</url>
             <snapshots>
               <enabled>false</enabled>
               <checksumPolicy>fail</checksumPolicy>
             </snapshots>
             <releases>
               <enabled>true</enabled>
               <checksumPolicy>fail</checksumPolicy>
             </releases>
           </repository>
           <repository>
             <id>confluent</id>
             <url>https://packages.confluent.io/maven/</url>
             <snapshots>
               <enabled>false</enabled>
               <checksumPolicy>fail</checksumPolicy>
             </snapshots>
             <releases>
               <enabled>true</enabled>
               <checksumPolicy>fail</checksumPolicy>
             </releases>
           </repository>
           <repository>
             <id>jitpack</id>
             <url>https://jitpack.io/</url>
             <snapshots>
               <enabled>false</enabled>
               <checksumPolicy>fail</checksumPolicy>
             </snapshots>
             <releases>
               <enabled>true</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>true</enabled>
               <checksumPolicy>fail</checksumPolicy>
             </releases>
           </pluginRepository>
           <pluginRepository>
             <id>confluent</id>
             <url>https://packages.confluent.io/maven/</url>
             <snapshots>
               <enabled>false</enabled>
               <checksumPolicy>fail</checksumPolicy>
             </snapshots>
             <releases>
               <enabled>true</enabled>
               <checksumPolicy>fail</checksumPolicy>
             </releases>
           </pluginRepository>
           <pluginRepository>
             <id>jitpack</id>
             <url>https://jitpack.io/</url>
             <snapshots>
               <enabled>false</enabled>
               <checksumPolicy>fail</checksumPolicy>
             </snapshots>
             <releases>
               <enabled>true</enabled>
               <checksumPolicy>fail</checksumPolicy>
             </releases>
           </pluginRepository>
         </pluginRepositories>
       </profile>
     </profiles>
     <mirrors></mirrors>
   </settings>
   Events:  <none>
   ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to