gitlabspring-cloud-dataflowmaven-repository

GitLab private maven repository not working in Spring Cloud Data Flow


I'm trying to register a task from my GitLab private maven repository...

I launch Spring Cloud DataFlow and Skipper with these properties:

maven.remote-repositories.gitlab.url: ${GITLAB_PACKAGE_REPOSIOTRY_URL}
maven.remote-repositories.gitlab.auth.username: ${GITLAB_PACKAGE_REPOSIOTRY_USERNAME}
maven.remote-repositories.gitlab.auth.password: ${GITLAB_PACKAGE_REPOSIOTRY_PASSWORD}

So I register the app as:

maven://com.xxx:dummy:0.0.1

When I trying to launch a task it can't be resolved saying:

dataflow-server_1    | java.lang.IllegalStateException: Failed to resolve MavenResource: com.xxx:dummy:jar:0.0.1. Configured remote repositories: : [gitlab],[springRepo]

Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.xxx:dummy:jar:0.0.1 from/to springRepo (https://repo.spring.io/libs-snapshot): status code: 401, reason phrase: Unauthorized (401)

It seems that SCDF try to download the maven package only from springRepo and not from gitlab.

Am I missing something?


Solution

  • Using these properties:

    maven:
      use-wagon: true
      remote-repositories:
        gitlab:
          url: ${GITLAB_PACKAGE_REPOSIOTRY_URL}
          wagon:
            http:
              all:
                use-preemptive: true
          auth:
            username: ${GITLAB_PACKAGE_REPOSIOTRY_USERNAME}
            password: ${GITLAB_PACKAGE_REPOSIOTRY_PASSWORD}
    

    both for Spring Cloud Data Flow and Skipper Server