Files
spring-cloud-static/Greenwich.RC2/multi/multi__dependency_management.html
2018-12-21 09:47:55 -05:00

15 lines
4.4 KiB
HTML

<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>148.&nbsp;Dependency Management</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="multi_spring-cloud.html" title="Spring Cloud"><link rel="up" href="multi_spring-cloud-gcp-reference.html" title="Part&nbsp;XVIII.&nbsp;Spring Cloud GCP"><link rel="prev" href="multi__introduction_4.html" title="147.&nbsp;Introduction"><link rel="next" href="multi__getting_started_2.html" title="149.&nbsp;Getting started"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">148.&nbsp;Dependency Management</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__introduction_4.html">Prev</a>&nbsp;</td><th width="60%" align="center">Part&nbsp;XVIII.&nbsp;Spring Cloud GCP</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="multi__getting_started_2.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="_dependency_management" href="#_dependency_management"></a>148.&nbsp;Dependency Management</h2></div></div></div><p>The Spring Cloud GCP Bill of Materials (BOM) contains the versions of all the dependencies it uses.</p><p>If you&#8217;re a Maven user, adding the following to your pom.xml file will allow you to not specify any Spring Cloud GCP dependency versions.
Instead, the version of the BOM you&#8217;re using determines the versions of the used dependencies.</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;dependencyManagement&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;dependencies&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;dependency&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;groupId&gt;</span>org.springframework.cloud<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/groupId&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;artifactId&gt;</span>spring-cloud-gcp-dependencies<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/artifactId&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;version&gt;</span>{project-version}<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/version&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;type&gt;</span>pom<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/type&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;scope&gt;</span>import<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/scope&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/dependency&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/dependencies&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/dependencyManagement&gt;</span></pre><p>In the following sections, it will be assumed you are using the Spring Cloud GCP BOM and the dependency snippets will not contain versions.</p><p>Gradle users can achieve the same kind of BOM experience using Spring&#8217;s <a class="link" href="https://github.com/spring-gradle-plugins/dependency-management-plugin" target="_top">dependency-management-plugin</a> Gradle plugin.
For simplicity, the Gradle dependency snippets in the remainder of this document will also omit their versions.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__introduction_4.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="multi_spring-cloud-gcp-reference.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="multi__getting_started_2.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">147.&nbsp;Introduction&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;149.&nbsp;Getting started</td></tr></table></div></body></html>