1

I am using SCDF deployment on k8s and trying to add a new Task Application from our internal Maven repo. By default, SCDF seems to only lookup in the [springRepo] repository. I followed the documentation to add a new maven repo here .

Since the documentation only talks about CloudFoundry example, I added these lines to application.yaml section based on my understanding.

spring:
  cloud:
    dataflow:
      task:
        platform:
          local:
            accounts:
              localDev:
             ********
  datasource:
        uri:  xxx
        *********
  maven:
    remote-repositories:
      repo1:
        url: https://repo1
        auth:
          username: user1
          password: pass1
        snapshot-policy:
          update-policy: daily
          checksum-policy: warn
        release-policy:
          update-policy: never
          checksum-policy: fail

While adding the app I used the syntax : maven://:[:[:]]:. However, when I launch the task, it fails with error : Failed to resolve maven Resource XXX at configured Remote Repository : [springRepo]

How can I override it to search in my newly added repo.. why SCDF still only searching in default [springRepo]? Appreciate any help.

1 Answers1

1

The property prefix is maven.remote-repositories but what you have is spring.maven.remote-repositories.

You need to specify:

spring:
  cloud:
    dataflow:
      task:
        platform:
          local:
            accounts:
              localDev:
             ********
  datasource:
        uri:  xxx
        *********
maven:
  remote-repositories:
    repo1:
      url: https://repo1
      ...

Please note that the Kubernetes deployment works with containers rather than maven jar artifacts and hence, you need to have your apps registered with the app's URI using docker: prefix.

Ilayaperumal Gopinathan
  • 4,099
  • 1
  • 13
  • 12
  • Thanks Gopinathan. looks like adding maven at the same level a spring worked fine. It is now looking into repo1 also. However, its still not finding my image. Could be something wrong with my maven: url. Will figure it out. Thanks for your clarification on docker: images. That's what I am using right now. Wanted to try a maven jar file instead. I was thinking , SCDF will add some kind of magic wrapper on my jar to run n SCDF :). – Sudhakar Master Nov 18 '20 at 05:17