Sync docs from 2.0.x to gh-pages
BIN
2.0.x/images/callouts/1.png
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
2.0.x/images/callouts/2.png
Normal file
|
After Width: | Height: | Size: 353 B |
BIN
2.0.x/images/callouts/3.png
Normal file
|
After Width: | Height: | Size: 350 B |
@@ -90,7 +90,7 @@ $(addBlockSwitches);
|
||||
<div id="preamble">
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>2.0.0.BUILD-SNAPSHOT</p>
|
||||
<p>2.0.5.BUILD-SNAPSHOT</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
BIN
2.0.x/multi/images/callouts/1.png
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
2.0.x/multi/images/callouts/2.png
Normal file
|
After Width: | Height: | Size: 353 B |
BIN
2.0.x/multi/images/callouts/3.png
Normal file
|
After Width: | Height: | Size: 350 B |
@@ -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"><plugins></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"><plugin></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"><groupId></span>org.apache.maven.plugins<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></groupId></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"><artifactId></span>maven-dependency-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></artifactId></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"><artifactId></span>maven-dependency-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></artifactId></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"></plugin></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"><plugin></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"><groupId></span>org.asciidoctor<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></groupId></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"><artifactId></span>asciidoctor-maven-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></artifactId></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"><artifactId></span>asciidoctor-maven-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></artifactId></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"></plugin></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"><plugin></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"><groupId></span>com.agilejava.docbkx<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></groupId></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"><artifactId></span>docbkx-maven-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></artifactId></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"><artifactId></span>docbkx-maven-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></artifactId></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"></plugin></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"><plugin></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"><groupId></span>org.apache.maven.plugins<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></groupId></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"><artifactId></span>maven-antrun-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></artifactId></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"><artifactId></span>maven-antrun-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></artifactId></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"><inherited></span>false<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></inherited></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></plugin></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></plugins></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></build></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></profile></span>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></profiles></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> </td><td width="20%" align="center"> </td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">2. Contributing </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"> </td></tr></table></div></body></html>
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></profiles></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> </td><td width="20%" align="center"> </td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">2. Contributing </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"> </td></tr></table></div></body></html>
|
||||
@@ -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"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <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"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="multi_pr01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> </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"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <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"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="multi_pr01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
|
||||
BIN
2.0.x/single/images/callouts/1.png
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
2.0.x/single/images/callouts/2.png
Normal file
|
After Width: | Height: | Size: 353 B |
BIN
2.0.x/single/images/callouts/3.png
Normal file
|
After Width: | Height: | Size: 350 B |
@@ -4,7 +4,7 @@
|
||||
<book xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
|
||||
<info>
|
||||
<title>Spring Cloud Build</title>
|
||||
<date>2017-11-28</date>
|
||||
<date>2019-02-14</date>
|
||||
</info>
|
||||
<preface>
|
||||
<title></title>
|
||||
@@ -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><properties>
|
||||
<maven-checkstyle-plugin.failsOnError>true</maven-checkstyle-plugin.failsOnError> <co xml:id="CO2-1"/>
|
||||
<maven-checkstyle-plugin.failsOnViolation>true
|
||||
</maven-checkstyle-plugin.failsOnViolation> <co xml:id="CO2-2"/>
|
||||
<maven-checkstyle-plugin.includeTestSourceDirectory>true
|
||||
</maven-checkstyle-plugin.includeTestSourceDirectory> <co xml:id="CO2-3"/>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin> <co xml:id="CO2-4"/>
|
||||
<groupId>io.spring.javaformat</groupId>
|
||||
<artifactId>spring-javaformat-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin> <co xml:id="CO2-5"/>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin> <co xml:id="CO2-6"/>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
</build></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’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><?xml version="1.0"?>
|
||||
<!DOCTYPE suppressions PUBLIC
|
||||
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
|
||||
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
|
||||
<suppressions>
|
||||
<suppress files=".*ConfigServerApplication\.java" checks="HideUtilityClassConstructor"/>
|
||||
<suppress files=".*ConfigClientWatch\.java" checks="LineLengthCheck"/>
|
||||
</suppressions></screen>
|
||||
</para>
|
||||
</formalpara>
|
||||
<simpara>It’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> → <literal>Settings</literal> → <literal>Editor</literal> → <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> → <literal>Settings</literal> → <literal>Editor</literal> → <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’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> → <literal>Settings</literal> → <literal>Other settings</literal> → <literal>Checkstyle</literal>. There click on the <literal>+</literal> icon in the <literal>Configuration file</literal> section. There, you’ll have to define where the checkstyle rules should be picked from. In the image above, we’ve picked the rules from the cloned Spring Cloud Build repository. However, you can point to the Spring Cloud Build’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’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’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’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
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId> <co xml:id="CO1-1"/>
|
||||
<artifactId>maven-dependency-plugin</artifactId> <co xml:id="CO4-1"/>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId> <co xml:id="CO1-2"/>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId> <co xml:id="CO4-2"/>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.agilejava.docbkx</groupId>
|
||||
<artifactId>docbkx-maven-plugin</artifactId> <co xml:id="CO1-3"/>
|
||||
<artifactId>docbkx-maven-plugin</artifactId> <co xml:id="CO4-3"/>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId> <co xml:id="CO1-4"/>
|
||||
<artifactId>maven-antrun-plugin</artifactId> <co xml:id="CO4-4"/>
|
||||
<inherited>false</inherited>
|
||||
</plugin>
|
||||
</plugins>
|
||||
@@ -131,16 +316,16 @@ approach of generating documentation just add these plugins to your <literal>doc
|
||||
</profile>
|
||||
</profiles></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>
|
||||
|
||||