Search code examples
spring-cloudspring-cloud-configspring-cloud-dataflow

spring-cloud-deployer - specifying maven remote repository URLs


Spring Cloud Data Flow - Cloudfoundry Server (v1.0.0.M4)

In working on trying to externalize configuration info in a properties file, and then use Spring Cloud Config Server to provide these environment settings at installation time, I've got a question about some of the values I would normally put a certain way in the YML manifest.

First, in a YML manifest, I might define them this way:

JAVA_OPTS: -Dhttp.keepAlive=false
MAVEN_REMOTE_REPOSITORIES_SNAPSHOTS_URL: <nexus url>
MAVEN_REMOTE_REPOSITORIES_RELEASES_URL: <another nexus url>

So how would I put these into a properties file? This is my guess:

java.opts=-Dhttp.keepAlive=false
maven.remote.repositories.snapshots.url=<nexus url>
maven.remote.repositories.releases.url=<another nexus url>

Solution

  • If you're looking to configure custom maven repository mirrors, please review this section.

    The Spring Cloud Deployer's maven resolution strategy looks for naming conventions defined in this section. One you have the right set of k/v pairs, you could then list them in property file or as env-var's.