Sync docs from 1.3.x to gh-pages

This commit is contained in:
buildmaster
2019-02-07 18:06:29 +00:00
parent 423e32f458
commit e5b733acf2
5 changed files with 325 additions and 22 deletions

File diff suppressed because one or more lines are too long

View File

@@ -10,22 +10,22 @@ 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="CO1-1" href="#CO1-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="CO1-2" href="#CO1-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>com.agilejava.docbkx<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>docbkx-maven-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag">&lt;/artifactId&gt;</span> <a name="CO1-3" href="#CO1-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>docbkx-maven-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;/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="CO1-4" href="#CO1-4"></a><span><img src="images/callouts/4.png" alt="4" 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-4" href="#CO4-4"></a><span><img src="images/callouts/4.png" alt="4" 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="#CO1-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="#CO1-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="#CO1-3"><span><img src="images/callouts/3.png" alt="3" border="0"></span></a> </p></td><td valign="top" align="left"><p>This plugin converts the Asciidoctor documentation into single and multi page docs</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO1-4"><span><img src="images/callouts/4.png" alt="4" 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>
<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 converts the Asciidoctor documentation into single and multi page docs</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO4-4"><span><img src="images/callouts/4.png" alt="4" 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.78.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></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>
<title>Spring Cloud Build</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-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

@@ -97,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>
@@ -111,19 +296,19 @@ 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="CO1-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="CO1-2"/>
&lt;artifactId&gt;asciidoctor-maven-plugin&lt;/artifactId&gt; <co xml:id="CO4-2"/>
&lt;/plugin&gt;
&lt;plugin&gt;
&lt;groupId&gt;com.agilejava.docbkx&lt;/groupId&gt;
&lt;artifactId&gt;docbkx-maven-plugin&lt;/artifactId&gt; <co xml:id="CO1-3"/>
&lt;artifactId&gt;docbkx-maven-plugin&lt;/artifactId&gt; <co xml:id="CO4-3"/>
&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="CO1-4"/>
&lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt; <co xml:id="CO4-4"/>
&lt;inherited&gt;false&lt;/inherited&gt;
&lt;/plugin&gt;
&lt;/plugins&gt;
@@ -131,16 +316,16 @@ approach of generating documentation just add these plugins to your <literal>doc
&lt;/profile&gt;
&lt;/profiles&gt;</programlisting>
<calloutlist>
<callout arearefs="CO1-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="CO1-2">
<callout arearefs="CO4-2">
<para>This plugin is required to parse the Asciidoctor documentation</para>
</callout>
<callout arearefs="CO1-3">
<callout arearefs="CO4-3">
<para>This plugin converts the Asciidoctor documentation into single and multi page docs</para>
</callout>
<callout arearefs="CO1-4">
<callout arearefs="CO4-4">
<para>This plugin is required to copy resources into proper final destinations and to generate main README.adoc</para>
</callout>
</calloutlist>