Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2019-02-07 18:03:38 +00:00
parent 90b7603325
commit 423e32f458
6 changed files with 308 additions and 163 deletions

View File

@@ -1,3 +1,3 @@
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>1.&nbsp;Building and Deploying</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="multi_spring-cloud-build.html" title="Spring Cloud Build"><link rel="up" href="multi_spring-cloud-build.html" title="Spring Cloud Build"><link rel="prev" href="multi_pr01.html" title=""><link rel="next" href="multi__checkstyle.html" title="2.&nbsp;Checkstyle"></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">1.&nbsp;Building and Deploying</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi_pr01.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="multi__checkstyle.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_building_and_deploying" href="#_building_and_deploying"></a>1.&nbsp;Building and Deploying</h1></div></div></div><p>To install locally:</p><pre class="screen">$ mvn install -s .settings.xml</pre><p>and to deploy snapshots to repo.spring.io:</p><pre class="screen">$ mvn deploy -DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local</pre><p>for a RELEASE build use</p><pre class="screen">$ mvn deploy -DaltReleaseDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-release-local</pre><p>and for jcenter use</p><pre class="screen">$ mvn deploy -DaltReleaseDeploymentRepository=bintray::default::https://api.bintray.com/maven/spring/jars/org.springframework.cloud:build</pre><p>and for Maven Central use</p><pre class="screen">$ mvn deploy -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2</pre><p>(the "central" profile is available for all projects in Spring Cloud and it sets up the gpg jar signing, and the repository has to be specified separately for this project because it is a parent of the starter parent which users in turn have as their own parent).</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi_pr01.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="multi__checkstyle.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud-build.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;2.&nbsp;Checkstyle</td></tr></table></div></body></html>
<title>1.&nbsp;Building and Deploying</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="multi_spring-cloud-build.html" title="Spring Cloud Build"><link rel="up" href="multi_spring-cloud-build.html" title="Spring Cloud Build"><link rel="prev" href="multi_pr01.html" title=""><link rel="next" href="multi__contributing.html" title="2.&nbsp;Contributing"></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">1.&nbsp;Building and Deploying</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi_pr01.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="multi__contributing.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_building_and_deploying" href="#_building_and_deploying"></a>1.&nbsp;Building and Deploying</h1></div></div></div><p>To install locally:</p><pre class="screen">$ mvn install -s .settings.xml</pre><p>and to deploy snapshots to repo.spring.io:</p><pre class="screen">$ mvn deploy -DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local</pre><p>for a RELEASE build use</p><pre class="screen">$ mvn deploy -DaltReleaseDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-release-local</pre><p>and for jcenter use</p><pre class="screen">$ mvn deploy -DaltReleaseDeploymentRepository=bintray::default::https://api.bintray.com/maven/spring/jars/org.springframework.cloud:build</pre><p>and for Maven Central use</p><pre class="screen">$ mvn deploy -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2</pre><p>(the "central" profile is available for all projects in Spring Cloud and it sets up the gpg jar signing, and the repository has to be specified separately for this project because it is a parent of the starter parent which users in turn have as their own parent).</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi_pr01.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="multi__contributing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud-build.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;2.&nbsp;Contributing</td></tr></table></div></body></html>

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>4.&nbsp;Reusing the documentation</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="multi_spring-cloud-build.html" title="Spring Cloud Build"><link rel="up" href="multi_spring-cloud-build.html" title="Spring Cloud Build"><link rel="prev" href="multi__contributing.html" title="3.&nbsp;Contributing"></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">4.&nbsp;Reusing the documentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__contributing.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;</td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_reusing_the_documentation" href="#_reusing_the_documentation"></a>4.&nbsp;Reusing the documentation</h1></div></div></div><p>Spring Cloud Build publishes its <code class="literal">spring-cloud-build-docs</code> module that contains
<title>3.&nbsp;Reusing the documentation</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="multi_spring-cloud-build.html" title="Spring Cloud Build"><link rel="up" href="multi_spring-cloud-build.html" title="Spring Cloud Build"><link rel="prev" href="multi__contributing.html" title="2.&nbsp;Contributing"></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">3.&nbsp;Reusing the documentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__contributing.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;</td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_reusing_the_documentation" href="#_reusing_the_documentation"></a>3.&nbsp;Reusing the documentation</h1></div></div></div><p>Spring Cloud Build publishes its <code class="literal">spring-cloud-build-docs</code> module that contains
helpful scripts (e.g. README generation ruby script) and css, xslt and images
for the Spring Cloud documentation. If you want to follow the same convention
approach of generating documentation just add these plugins to your <code class="literal">docs</code> module</p><pre class="programlisting"><span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;profiles&gt;</span>
@@ -10,18 +10,18 @@ approach of generating documentation just add these plugins to your <code class=
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;plugins&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;plugin&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;groupId&gt;</span>org.apache.maven.plugins<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>maven-dependency-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/artifactId&gt;</span> <a name="CO3-1" href="#CO3-1"></a><span><img src="images/callouts/1.png" alt="1" border="0"></span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;artifactId&gt;</span>maven-dependency-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/artifactId&gt;</span> <a name="CO4-1" href="#CO4-1"></a><span><img src="images/callouts/1.png" alt="1" border="0"></span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/plugin&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;plugin&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;groupId&gt;</span>org.asciidoctor<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>asciidoctor-maven-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/artifactId&gt;</span> <a name="CO3-2" href="#CO3-2"></a><span><img src="images/callouts/2.png" alt="2" border="0"></span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;artifactId&gt;</span>asciidoctor-maven-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/artifactId&gt;</span> <a name="CO4-2" href="#CO4-2"></a><span><img src="images/callouts/2.png" alt="2" border="0"></span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/plugin&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;plugin&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;groupId&gt;</span>org.apache.maven.plugins<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>maven-antrun-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/artifactId&gt;</span> <a name="CO3-3" href="#CO3-3"></a><span><img src="images/callouts/3.png" alt="3" border="0"></span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;artifactId&gt;</span>maven-antrun-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/artifactId&gt;</span> <a name="CO4-3" href="#CO4-3"></a><span><img src="images/callouts/3.png" alt="3" border="0"></span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;inherited&gt;</span>false<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/inherited&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/plugin&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/plugins&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/build&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/profile&gt;</span>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/profiles&gt;</span></pre><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><p><a href="#CO3-1"><span><img src="images/callouts/1.png" alt="1" border="0"></span></a> </p></td><td valign="top" align="left"><p>This plugin downloads and unpacks the resources of the <code class="literal">spring-cloud-build-docs</code> module</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO3-2"><span><img src="images/callouts/2.png" alt="2" border="0"></span></a> </p></td><td valign="top" align="left"><p>This plugin is required to parse the Asciidoctor documentation</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO3-3"><span><img src="images/callouts/3.png" alt="3" border="0"></span></a> </p></td><td valign="top" align="left"><p>This plugin is required to copy resources into proper final destinations and to generate main README.adoc</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>The order of plugin declaration is important!</p></td></tr></table></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__contributing.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;</td></tr><tr><td width="40%" align="left" valign="top">3.&nbsp;Contributing&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud-build.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/profiles&gt;</span></pre><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><p><a href="#CO4-1"><span><img src="images/callouts/1.png" alt="1" border="0"></span></a> </p></td><td valign="top" align="left"><p>This plugin downloads and unpacks the resources of the <code class="literal">spring-cloud-build-docs</code> module</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO4-2"><span><img src="images/callouts/2.png" alt="2" border="0"></span></a> </p></td><td valign="top" align="left"><p>This plugin is required to parse the Asciidoctor documentation</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO4-3"><span><img src="images/callouts/3.png" alt="3" border="0"></span></a> </p></td><td valign="top" align="left"><p>This plugin is required to copy resources into proper final destinations and to generate main README.adoc</p></td></tr></table></div><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>The order of plugin declaration is important!</p></td></tr></table></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__contributing.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;</td></tr><tr><td width="40%" align="left" valign="top">2.&nbsp;Contributing&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud-build.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>

View File

@@ -1,3 +1,3 @@
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Spring Cloud Build</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="multi_spring-cloud-build.html" title="Spring Cloud Build"><link rel="next" href="multi_pr01.html" title=""></head><body class="firstpage" 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">Spring Cloud Build</th></tr><tr><td width="20%" align="left">&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="multi_pr01.html">Next</a></td></tr></table><hr></div><div lang="en" class="book"><div class="titlepage"><div><div><h1 class="title"><a name="d0e3"></a>Spring Cloud Build</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="preface"><a href="multi_pr01.html"></a></span></dt><dt><span class="chapter"><a href="multi__building_and_deploying.html">1. Building and Deploying</a></span></dt><dt><span class="chapter"><a href="multi__checkstyle.html">2. Checkstyle</a></span></dt><dd><dl><dt><span class="section"><a href="multi__checkstyle.html#_checkstyle_configuration">2.1. Checkstyle configuration</a></span></dt></dl></dd><dt><span class="chapter"><a href="multi__contributing.html">3. Contributing</a></span></dt><dd><dl><dt><span class="section"><a href="multi__contributing.html#_sign_the_contributor_license_agreement">3.1. Sign the Contributor License Agreement</a></span></dt><dt><span class="section"><a href="multi__contributing.html#_code_of_conduct">3.2. Code of Conduct</a></span></dt><dt><span class="section"><a href="multi__contributing.html#_code_conventions_and_housekeeping">3.3. Code Conventions and Housekeeping</a></span></dt></dl></dd><dt><span class="chapter"><a href="multi__reusing_the_documentation.html">4. Reusing the documentation</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="multi_pr01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>
<title>Spring Cloud Build</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="multi_spring-cloud-build.html" title="Spring Cloud Build"><link rel="next" href="multi_pr01.html" title=""></head><body class="firstpage" 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">Spring Cloud Build</th></tr><tr><td width="20%" align="left">&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="multi_pr01.html">Next</a></td></tr></table><hr></div><div lang="en" class="book"><div class="titlepage"><div><div><h1 class="title"><a name="d0e3"></a>Spring Cloud Build</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="preface"><a href="multi_pr01.html"></a></span></dt><dt><span class="chapter"><a href="multi__building_and_deploying.html">1. Building and Deploying</a></span></dt><dt><span class="chapter"><a href="multi__contributing.html">2. Contributing</a></span></dt><dd><dl><dt><span class="section"><a href="multi__contributing.html#_sign_the_contributor_license_agreement">2.1. Sign the Contributor License Agreement</a></span></dt><dt><span class="section"><a href="multi__contributing.html#_code_of_conduct">2.2. Code of Conduct</a></span></dt><dt><span class="section"><a href="multi__contributing.html#_code_conventions_and_housekeeping">2.3. Code Conventions and Housekeeping</a></span></dt><dt><span class="section"><a href="multi__contributing.html#_checkstyle">2.4. Checkstyle</a></span></dt><dd><dl><dt><span class="section"><a href="multi__contributing.html#_checkstyle_configuration">2.4.1. Checkstyle configuration</a></span></dt></dl></dd><dt><span class="section"><a href="multi__contributing.html#_ide_setup">2.5. IDE setup</a></span></dt><dd><dl><dt><span class="section"><a href="multi__contributing.html#_intellij_idea">2.5.1. Intellij IDEA</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="multi__reusing_the_documentation.html">3. Reusing the documentation</a></span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="multi_pr01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right" valign="top">&nbsp;</td></tr></table></div></body></html>

File diff suppressed because one or more lines are too long

View File

@@ -31,113 +31,6 @@ to use for plugin and dependency management.</simpara>
<screen>$ mvn deploy -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2</screen>
<simpara>(the "central" profile is available for all projects in Spring Cloud and it sets up the gpg jar signing, and the repository has to be specified separately for this project because it is a parent of the starter parent which users in turn have as their own parent).</simpara>
</chapter>
<chapter xml:id="_checkstyle">
<title>Checkstyle</title>
<simpara>Spring Cloud Build comes with a set of checkstyle rules. You can find them in the <literal>spring-cloud-build-tools</literal> module. The most notable files under the module are:</simpara>
<formalpara>
<title>spring-cloud-build-tools/</title>
<para>
<screen>└── src
   ├── checkstyle
   │   └── checkstyle-suppressions.xml <co xml:id="CO1-1"/>
   └── main
   └── resources
   ├── checkstyle-header.txt <co xml:id="CO1-2"/>
   ├── checkstyle.xml <co xml:id="CO1-3"/>
   └── intellij
      ├── Intellij_Project_Defaults.xml <co xml:id="CO1-4"/>
      └── Intellij_Spring_Boot_Java_Conventions.xml <co xml:id="CO1-5"/></screen>
</para>
</formalpara>
<calloutlist>
<callout arearefs="CO1-3">
<para>Default Checkstyle rules</para>
</callout>
<callout arearefs="CO1-2">
<para>File header setup</para>
</callout>
<callout arearefs="CO1-1">
<para>Default suppression rules</para>
</callout>
<callout arearefs="CO1-4">
<para>Project defaults for Intellij that apply most of Checkstyle rules</para>
</callout>
<callout arearefs="CO1-5">
<para>Project style conventions for Intellij that apply most of Checkstyle rules</para>
</callout>
</calloutlist>
<section xml:id="_checkstyle_configuration">
<title>Checkstyle configuration</title>
<simpara>Checkstyle rules are <emphasis role="strong">disabled by default</emphasis>. To add checkstyle to your project just define the following properties and plugins.</simpara>
<formalpara>
<title>pom.xml</title>
<para>
<screen>&lt;properties&gt;
&lt;maven-checkstyle-plugin.failsOnError&gt;true&lt;/maven-checkstyle-plugin.failsOnError&gt; <co xml:id="CO2-1"/>
&lt;maven-checkstyle-plugin.failsOnViolation&gt;true
&lt;/maven-checkstyle-plugin.failsOnViolation&gt; <co xml:id="CO2-2"/>
&lt;maven-checkstyle-plugin.includeTestSourceDirectory&gt;true
&lt;/maven-checkstyle-plugin.includeTestSourceDirectory&gt; <co xml:id="CO2-3"/>
&lt;/properties&gt;
&lt;build&gt;
&lt;plugins&gt;
&lt;plugin&gt; <co xml:id="CO2-4"/>
&lt;groupId&gt;io.spring.javaformat&lt;/groupId&gt;
&lt;artifactId&gt;spring-javaformat-maven-plugin&lt;/artifactId&gt;
&lt;/plugin&gt;
&lt;plugin&gt; <co xml:id="CO2-5"/>
&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
&lt;artifactId&gt;maven-checkstyle-plugin&lt;/artifactId&gt;
&lt;/plugin&gt;
&lt;/plugins&gt;
&lt;/build&gt;
&lt;reporting&gt;
&lt;plugins&gt;
&lt;plugin&gt; <co xml:id="CO2-6"/>
&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
&lt;artifactId&gt;maven-checkstyle-plugin&lt;/artifactId&gt;
&lt;/plugin&gt;
&lt;/plugins&gt;
&lt;/reporting&gt;
&lt;/build&gt;</screen>
</para>
</formalpara>
<calloutlist>
<callout arearefs="CO2-1">
<para>Fails the build upon Checkstyle errors</para>
</callout>
<callout arearefs="CO2-2">
<para>Fails the build upon Checkstyle violations</para>
</callout>
<callout arearefs="CO2-3">
<para>Checkstyle analyzes also the test sources</para>
</callout>
<callout arearefs="CO2-4">
<para>Add the Spring Java Format plugin that will reformat your code to pass most of the Checkstyle formatting rules</para>
</callout>
<callout arearefs="CO2-5 CO2-6">
<para>Add checkstyle plugin to your build and reporting phases</para>
</callout>
</calloutlist>
<simpara>If you need to suppress some rules (e.g. line length needs to be longer), then it&#8217;s enough for you to define a file under <literal>${project.root}/src/checkstyle/checkstyle-suppressions.xml</literal> with your suppressions. Example:</simpara>
<formalpara>
<title>projectRoot/src/checkstyle/checkstyle-suppresions.xml</title>
<para>
<screen>&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"&gt;
&lt;suppressions&gt;
&lt;suppress files=".*ConfigServerApplication\.java" checks="HideUtilityClassConstructor"/&gt;
&lt;suppress files=".*ConfigClientWatch\.java" checks="LineLengthCheck"/&gt;
&lt;/suppressions&gt;</screen>
</para>
</formalpara>
<simpara>It&#8217;s advisable to copy the <literal>${spring-cloud-build.rootFolder}/.editorconfig</literal> and <literal>${spring-cloud-build.rootFolder}/.springformat</literal> to your project. That way, some default formatting rules will be applied.</simpara>
</section>
</chapter>
<chapter xml:id="_contributing">
<title>Contributing</title>
<simpara>Spring Cloud is released under the non-restrictive Apache 2.0 license,
@@ -204,6 +97,191 @@ message (where XXXX is the issue number).</simpara>
</listitem>
</itemizedlist>
</section>
<section xml:id="_checkstyle">
<title>Checkstyle</title>
<simpara>Spring Cloud Build comes with a set of checkstyle rules. You can find them in the <literal>spring-cloud-build-tools</literal> module. The most notable files under the module are:</simpara>
<formalpara>
<title>spring-cloud-build-tools/</title>
<para>
<screen>└── src
   ├── checkstyle
   │   └── checkstyle-suppressions.xml <co xml:id="CO1-1"/>
   └── main
   └── resources
   ├── checkstyle-header.txt <co xml:id="CO1-2"/>
   └── checkstyle.xml <co xml:id="CO1-3"/></screen>
</para>
</formalpara>
<calloutlist>
<callout arearefs="CO1-3">
<para>Default Checkstyle rules</para>
</callout>
<callout arearefs="CO1-2">
<para>File header setup</para>
</callout>
<callout arearefs="CO1-1">
<para>Default suppression rules</para>
</callout>
</calloutlist>
<section xml:id="_checkstyle_configuration">
<title>Checkstyle configuration</title>
<simpara>Checkstyle rules are <emphasis role="strong">disabled by default</emphasis>. To add checkstyle to your project just define the following properties and plugins.</simpara>
<formalpara>
<title>pom.xml</title>
<para>
<screen>&lt;properties&gt;
&lt;maven-checkstyle-plugin.failsOnError&gt;true&lt;/maven-checkstyle-plugin.failsOnError&gt; <co xml:id="CO2-1"/>
&lt;maven-checkstyle-plugin.failsOnViolation&gt;true
&lt;/maven-checkstyle-plugin.failsOnViolation&gt; <co xml:id="CO2-2"/>
&lt;maven-checkstyle-plugin.includeTestSourceDirectory&gt;true
&lt;/maven-checkstyle-plugin.includeTestSourceDirectory&gt; <co xml:id="CO2-3"/>
&lt;/properties&gt;
&lt;build&gt;
&lt;plugins&gt;
&lt;plugin&gt; <co xml:id="CO2-4"/>
&lt;groupId&gt;io.spring.javaformat&lt;/groupId&gt;
&lt;artifactId&gt;spring-javaformat-maven-plugin&lt;/artifactId&gt;
&lt;/plugin&gt;
&lt;plugin&gt; <co xml:id="CO2-5"/>
&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
&lt;artifactId&gt;maven-checkstyle-plugin&lt;/artifactId&gt;
&lt;/plugin&gt;
&lt;/plugins&gt;
&lt;reporting&gt;
&lt;plugins&gt;
&lt;plugin&gt; <co xml:id="CO2-6"/>
&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
&lt;artifactId&gt;maven-checkstyle-plugin&lt;/artifactId&gt;
&lt;/plugin&gt;
&lt;/plugins&gt;
&lt;/reporting&gt;
&lt;/build&gt;</screen>
</para>
</formalpara>
<calloutlist>
<callout arearefs="CO2-1">
<para>Fails the build upon Checkstyle errors</para>
</callout>
<callout arearefs="CO2-2">
<para>Fails the build upon Checkstyle violations</para>
</callout>
<callout arearefs="CO2-3">
<para>Checkstyle analyzes also the test sources</para>
</callout>
<callout arearefs="CO2-4">
<para>Add the Spring Java Format plugin that will reformat your code to pass most of the Checkstyle formatting rules</para>
</callout>
<callout arearefs="CO2-5 CO2-6">
<para>Add checkstyle plugin to your build and reporting phases</para>
</callout>
</calloutlist>
<simpara>If you need to suppress some rules (e.g. line length needs to be longer), then it&#8217;s enough for you to define a file under <literal>${project.root}/src/checkstyle/checkstyle-suppressions.xml</literal> with your suppressions. Example:</simpara>
<formalpara>
<title>projectRoot/src/checkstyle/checkstyle-suppresions.xml</title>
<para>
<screen>&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd"&gt;
&lt;suppressions&gt;
&lt;suppress files=".*ConfigServerApplication\.java" checks="HideUtilityClassConstructor"/&gt;
&lt;suppress files=".*ConfigClientWatch\.java" checks="LineLengthCheck"/&gt;
&lt;/suppressions&gt;</screen>
</para>
</formalpara>
<simpara>It&#8217;s advisable to copy the <literal>${spring-cloud-build.rootFolder}/.editorconfig</literal> and <literal>${spring-cloud-build.rootFolder}/.springformat</literal> to your project. That way, some default formatting rules will be applied. You can do so by running this script:</simpara>
<programlisting language="bash" linenumbering="unnumbered">$ curl https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/.editorconfig -o .editorconfig
$ touch .springformat</programlisting>
</section>
</section>
<section xml:id="_ide_setup">
<title>IDE setup</title>
<section xml:id="_intellij_idea">
<title>Intellij IDEA</title>
<simpara>In order to setup Intellij you should import our coding conventions, inspection profiles and set up the checkstyle plugin.</simpara>
<formalpara>
<title>spring-cloud-build-tools/</title>
<para>
<screen>└── src
   ├── checkstyle
   │   └── checkstyle-suppressions.xml <co xml:id="CO3-1"/>
   └── main
   └── resources
   ├── checkstyle-header.txt <co xml:id="CO3-2"/>
   ├── checkstyle.xml <co xml:id="CO3-3"/>
   └── intellij
      ├── Intellij_Project_Defaults.xml <co xml:id="CO3-4"/>
      └── Intellij_Spring_Boot_Java_Conventions.xml <co xml:id="CO3-5"/></screen>
</para>
</formalpara>
<calloutlist>
<callout arearefs="CO3-3">
<para>Default Checkstyle rules</para>
</callout>
<callout arearefs="CO3-2">
<para>File header setup</para>
</callout>
<callout arearefs="CO3-1">
<para>Default suppression rules</para>
</callout>
<callout arearefs="CO3-4">
<para>Project defaults for Intellij that apply most of Checkstyle rules</para>
</callout>
<callout arearefs="CO3-5">
<para>Project style conventions for Intellij that apply most of Checkstyle rules</para>
</callout>
</calloutlist>
<figure>
<title>Code style</title>
<mediaobject>
<imageobject>
<imagedata fileref="https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/images/intellij-code-style.png"/>
</imageobject>
<textobject><phrase>Code style</phrase></textobject>
</mediaobject>
</figure>
<simpara>Go to <literal>File</literal> &#8594; <literal>Settings</literal> &#8594; <literal>Editor</literal> &#8594; <literal>Code style</literal>. There click on the icon next to the <literal>Scheme</literal> section. There, click on the <literal>Import Scheme</literal> value and pick the <literal>Intellij IDEA code style XML</literal> option. Import the <literal>spring-cloud-build-tools/src/main/resources/intellij/Intellij_Spring_Boot_Java_Conventions.xml</literal> file.</simpara>
<figure>
<title>Inspection profiles</title>
<mediaobject>
<imageobject>
<imagedata fileref="https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/images/intellij-inspections.png"/>
</imageobject>
<textobject><phrase>Code style</phrase></textobject>
</mediaobject>
</figure>
<simpara>Go to <literal>File</literal> &#8594; <literal>Settings</literal> &#8594; <literal>Editor</literal> &#8594; <literal>Inspections</literal>. There click on the icon next to the <literal>Profile</literal> section. There, click on the <literal>Import Profile</literal> and import the <literal>spring-cloud-build-tools/src/main/resources/intellij/Intellij_Project_Defaults.xml</literal> file.</simpara>
<formalpara>
<title>Checkstyle</title>
<para>To have Intellij work with Checkstyle, you have to install the <literal>Checkstyle</literal> plugin. It&#8217;s advisable to also install the <literal>Assertions2Assertj</literal> to automatically convert the JUnit assertions</para>
</formalpara>
<informalfigure>
<mediaobject>
<imageobject>
<imagedata fileref="https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/images/intellij-checkstyle.png"/>
</imageobject>
<textobject><phrase>Checkstyle</phrase></textobject>
</mediaobject>
</informalfigure>
<simpara>Go to <literal>File</literal> &#8594; <literal>Settings</literal> &#8594; <literal>Other settings</literal> &#8594; <literal>Checkstyle</literal>. There click on the <literal>+</literal> icon in the <literal>Configuration file</literal> section. There, you&#8217;ll have to define where the checkstyle rules should be picked from. In the image above, we&#8217;ve picked the rules from the cloned Spring Cloud Build repository. However, you can point to the Spring Cloud Build&#8217;s GitHub repository (e.g. for the <literal>checkstyle.xml</literal> : <literal><link xl:href="https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle.xml">https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle.xml</link></literal>). We need to provide the following variables:</simpara>
<itemizedlist>
<listitem>
<simpara><literal>checkstyle.header.file</literal> - please point it to the Spring Cloud Build&#8217;s, <literal>spring-cloud-build-tools/src/main/resources/checkstyle/checkstyle-header.txt</literal> file either in your cloned repo or via the <literal><link xl:href="https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt">https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt</link></literal> URL.</simpara>
</listitem>
<listitem>
<simpara><literal>checkstyle.suppressions.file</literal> - default suppressions. Please point it to the Spring Cloud Build&#8217;s, <literal>spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml</literal> file either in your cloned repo or via the <literal><link xl:href="https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml">https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml</link></literal> URL.</simpara>
</listitem>
<listitem>
<simpara><literal>checkstyle.additional.suppressions.file</literal> - this variable corresponds to suppressions in your local project. E.g. you&#8217;re working on <literal>spring-cloud-contract</literal>. Then point to the <literal>project-root/src/checkstyle/checkstyle-suppressions.xml</literal> folder. Example for <literal>spring-cloud-contract</literal> would be: <literal>/home/username/spring-cloud-contract/src/checkstyle/checkstyle-suppressions.xml</literal>.</simpara>
</listitem>
</itemizedlist>
<important>
<simpara>Remember to set the <literal>Scan Scope</literal> to <literal>All sources</literal> since we apply checkstyle rules for production and test sources.</simpara>
</important>
</section>
</section>
</chapter>
<chapter xml:id="_reusing_the_documentation">
<title>Reusing the documentation</title>
@@ -218,15 +296,15 @@ approach of generating documentation just add these plugins to your <literal>doc
&lt;plugins&gt;
&lt;plugin&gt;
&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
&lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt; <co xml:id="CO3-1"/>
&lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt; <co xml:id="CO4-1"/>
&lt;/plugin&gt;
&lt;plugin&gt;
&lt;groupId&gt;org.asciidoctor&lt;/groupId&gt;
&lt;artifactId&gt;asciidoctor-maven-plugin&lt;/artifactId&gt; <co xml:id="CO3-2"/>
&lt;artifactId&gt;asciidoctor-maven-plugin&lt;/artifactId&gt; <co xml:id="CO4-2"/>
&lt;/plugin&gt;
&lt;plugin&gt;
&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
&lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt; <co xml:id="CO3-3"/>
&lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt; <co xml:id="CO4-3"/>
&lt;inherited&gt;false&lt;/inherited&gt;
&lt;/plugin&gt;
&lt;/plugins&gt;
@@ -234,13 +312,13 @@ approach of generating documentation just add these plugins to your <literal>doc
&lt;/profile&gt;
&lt;/profiles&gt;</programlisting>
<calloutlist>
<callout arearefs="CO3-1">
<callout arearefs="CO4-1">
<para>This plugin downloads and unpacks the resources of the <literal>spring-cloud-build-docs</literal> module</para>
</callout>
<callout arearefs="CO3-2">
<callout arearefs="CO4-2">
<para>This plugin is required to parse the Asciidoctor documentation</para>
</callout>
<callout arearefs="CO3-3">
<callout arearefs="CO4-3">
<para>This plugin is required to copy resources into proper final destinations and to generate main README.adoc</para>
</callout>
</calloutlist>