rmorgan / spring-cloud-services-starters

Extensions to the Spring Cloud Starters for Spring Cloud Services on Pivotal Cloud Foundry

Home Page:http://docs.pivotal.io/spring-cloud-services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Travis CI

Spring Cloud Services Starters

  • spring-cloud-services-starter-circuit-breaker

  • spring-cloud-services-starter-config-client

  • spring-cloud-services-starter-service-registry

Build and Deploy

Install the starter POMs to your local Maven repository:

mvn clean install -s .settings.xml

Deploy SNAPSHOT builds

$ mvn clean install deploy -DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local

Deploy MILESTONE artifacts (including release candidates)

$ mvn clean install deploy -DaltReleaseDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-milestone-local

Deploy RELEASE artifacts

$ mvn clean install deploy -DaltReleaseDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-release-local

Usage

Include the starter dependencies in your project using Maven or Gradle.

Maven

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.demo</groupId>
    <artifactId>spring-cloud-services-demo</artifactId>
    <version>0.1.0</version>
    <packaging>jar</packaging>

    <parent>
        <groupId>io.pivotal.spring.cloud</groupId>
        <artifactId>spring-cloud-services-starter-parent</artifactId>
        <version>1.0.0.RC2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <dependencies>
        <dependency>
            <groupId>io.pivotal.spring.cloud</groupId>
            <artifactId>spring-cloud-services-starter-circuit-breaker</artifactId>
        </dependency>
        <dependency>
            <groupId>io.pivotal.spring.cloud</groupId>
            <artifactId>spring-cloud-services-starter-config-client</artifactId>
        </dependency>
        <dependency>
            <groupId>io.pivotal.spring.cloud</groupId>
            <artifactId>spring-cloud-services-starter-service-registry</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/libs-milestone</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>spring-milestones</id>
            <url>https://repo.spring.io/libs-milestone</url>
        </pluginRepository>
    </pluginRepositories>

</project>

Gradle

build.gradle

buildscript {
    repositories {
        maven { url "https://repo.spring.io/plugins-release/" }
        maven { url "https://repo.spring.io/libs-release/" }
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.2.6.RELEASE")
        classpath("io.spring.gradle:dependency-management-plugin:0.5.3.RELEASE")
    }
}

apply plugin: "java"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "spring-boot"
apply plugin: "io.spring.dependency-management"

jar {
    baseName = "spring-cloud-services-demo"
    version =  "0.1.0"
}

dependencyManagement {
    imports {
        mavenBom "io.pivotal.spring.cloud:spring-cloud-services-starter-parent:1.0.0.RC2"
    }
}

dependencies {
    compile("io.pivotal.spring.cloud:spring-cloud-services-starter-circuit-breaker")
    compile("io.pivotal.spring.cloud:spring-cloud-services-starter-config-client")
    compile("io.pivotal.spring.cloud:spring-cloud-services-starter-service-registry")
}

repositories {
    maven { url "https://repo.spring.io/libs-milestone/" }
    mavenCentral()
}

About

Extensions to the Spring Cloud Starters for Spring Cloud Services on Pivotal Cloud Foundry

http://docs.pivotal.io/spring-cloud-services