Sync docs from master to gh-pages
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>1. 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. 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. Building and Deploying</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi_pr01.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <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. 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> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="multi__contributing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </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"> 2. Contributing</td></tr></table></div></body></html>
|
||||
<title>1. 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. 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. Building and Deploying</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi_pr01.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <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. 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> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="multi__checkstyle.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </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"> 2. Checkstyle</td></tr></table></div></body></html>
|
||||
54
multi/multi__checkstyle.html
Normal file
54
multi/multi__checkstyle.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>2. Checkstyle</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__building_and_deploying.html" title="1. Building and Deploying"><link rel="next" href="multi__contributing.html" title="3. 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">2. Checkstyle</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__building_and_deploying.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <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="_checkstyle" href="#_checkstyle"></a>2. Checkstyle</h1></div></div></div><p>Spring Cloud Build comes with a set of checkstyle rules. You can find them in the <code class="literal">spring-cloud-build-tools</code> module. The most notable files under the module are:</p><p><b>spring-cloud-build-tools/. </b>
|
||||
</p><pre class="screen">└── src
|
||||
├── checkstyle
|
||||
│ └── checkstyle-suppressions.xml <a name="CO1-1" href="#CO1-1"></a><span><img src="images/callouts/1.png" alt="1" border="0"></span>
|
||||
└── main
|
||||
└── resources
|
||||
├── checkstyle-header.txt <a name="CO1-2" href="#CO1-2"></a><span><img src="images/callouts/2.png" alt="2" border="0"></span>
|
||||
├── checkstyle.xml <a name="CO1-3" href="#CO1-3"></a><span><img src="images/callouts/3.png" alt="3" border="0"></span>
|
||||
└── intellij
|
||||
├── Intellij_Project_Defaults.xml <a name="CO1-4" href="#CO1-4"></a><span><img src="images/callouts/4.png" alt="4" border="0"></span>
|
||||
└── Intellij_Spring_Boot_Java_Conventions.xml <a name="CO1-5" href="#CO1-5"></a><span><img src="images/callouts/5.png" alt="5" border="0"></span></pre><p>
|
||||
</p><div class="calloutlist"><table border="0" summary="Callout list"><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>Default Checkstyle rules</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>File header setup</p></td></tr><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>Default suppression rules</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>Project defaults for Intellij that apply most of Checkstyle rules</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO1-5"><span><img src="images/callouts/5.png" alt="5" border="0"></span></a> </p></td><td valign="top" align="left"><p>Project style conventions for Intellij that apply most of Checkstyle rules</p></td></tr></table></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_checkstyle_configuration" href="#_checkstyle_configuration"></a>2.1 Checkstyle configuration</h2></div></div></div><p>Checkstyle rules are <span class="strong"><strong>disabled by deafult</strong></span>. To add checkstyle to your project just define the following properties and plugins.</p><p><b>pom.xml. </b>
|
||||
</p><pre class="screen"><properties>
|
||||
<maven-checkstyle-plugin.failsOnError>true</maven-checkstyle-plugin.failsOnError> <a name="CO2-1" href="#CO2-1"></a><span><img src="images/callouts/1.png" alt="1" border="0"></span>
|
||||
<maven-checkstyle-plugin.failsOnViolation>true
|
||||
</maven-checkstyle-plugin.failsOnViolation> <a name="CO2-2" href="#CO2-2"></a><span><img src="images/callouts/2.png" alt="2" border="0"></span>
|
||||
<maven-checkstyle-plugin.includeTestSourceDirectory>true
|
||||
</maven-checkstyle-plugin.includeTestSourceDirectory> <a name="CO2-3" href="#CO2-3"></a><span><img src="images/callouts/3.png" alt="3" border="0"></span>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin> <a name="CO2-4" href="#CO2-4"></a><span><img src="images/callouts/4.png" alt="4" border="0"></span>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin> <a name="CO2-5" href="#CO2-5"></a><span><img src="images/callouts/5.png" alt="5" border="0"></span>
|
||||
<groupId>io.spring.javaformat</groupId>
|
||||
<artifactId>spring-javaformat-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin> <a name="CO2-6" href="#CO2-6"></a><span><img src="images/callouts/6.png" alt="6" border="0"></span>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
</build></pre><p>
|
||||
</p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><p><a href="#CO2-1"><span><img src="images/callouts/1.png" alt="1" border="0"></span></a> </p></td><td valign="top" align="left"><p>Fails the build upon Checkstyle errors</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO2-2"><span><img src="images/callouts/2.png" alt="2" border="0"></span></a> </p></td><td valign="top" align="left"><p>Fails the build upon Checkstyle violations</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO2-3"><span><img src="images/callouts/3.png" alt="3" border="0"></span></a> </p></td><td valign="top" align="left"><p>Checkstyle analyzes also the test sources</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO2-4"><span><img src="images/callouts/4.png" alt="4" border="0"></span></a> <a href="#CO2-6"><span><img src="images/callouts/6.png" alt="6" border="0"></span></a> </p></td><td valign="top" align="left"><p>Add checkstyle plugin to your build and reporting phases</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO2-5"><span><img src="images/callouts/5.png" alt="5" border="0"></span></a> </p></td><td valign="top" align="left"><p>Add the Spring Java Format plugin that will reformat your code to pass most of the Checkstyle formatting rules</p></td></tr></table></div><p>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 <code class="literal">${project.root}/src/checkstyle/checkstyle-suppressions.xml</code> with your suppressions. Example:</p><p><b>projectRoot/src/checkstyle/checkstyle-suppresions.xml. </b>
|
||||
</p><pre class="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></pre><p>
|
||||
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__building_and_deploying.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="multi__contributing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">1. Building and Deploying </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"> 3. Contributing</td></tr></table></div></body></html>
|
||||
@@ -1,17 +1,17 @@
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>2. Contributing</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__building_and_deploying.html" title="1. Building and Deploying"><link rel="next" href="multi__reusing_the_documentation.html" title="3. Reusing the documentation"></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">2. Contributing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__building_and_deploying.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="multi__reusing_the_documentation.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_contributing" href="#_contributing"></a>2. Contributing</h1></div></div></div><p>Spring Cloud is released under the non-restrictive Apache 2.0 license,
|
||||
<title>3. Contributing</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__checkstyle.html" title="2. Checkstyle"><link rel="next" href="multi__reusing_the_documentation.html" title="4. Reusing the documentation"></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. Contributing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__checkstyle.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="multi__reusing_the_documentation.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_contributing" href="#_contributing"></a>3. Contributing</h1></div></div></div><p>Spring Cloud is released under the non-restrictive Apache 2.0 license,
|
||||
and follows a very standard Github development process, using Github
|
||||
tracker for issues and merging pull requests into master. If you want
|
||||
to contribute even something trivial please do not hesitate, but
|
||||
follow the guidelines below.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_sign_the_contributor_license_agreement" href="#_sign_the_contributor_license_agreement"></a>2.1 Sign the Contributor License Agreement</h2></div></div></div><p>Before we accept a non-trivial patch or pull request we will need you to sign the
|
||||
follow the guidelines below.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_sign_the_contributor_license_agreement" href="#_sign_the_contributor_license_agreement"></a>3.1 Sign the Contributor License Agreement</h2></div></div></div><p>Before we accept a non-trivial patch or pull request we will need you to sign the
|
||||
<a class="link" href="https://cla.pivotal.io/sign/spring" target="_top">Contributor License Agreement</a>.
|
||||
Signing the contributor’s agreement does not grant anyone commit rights to the main
|
||||
repository, but it does mean that we can accept your contributions, and you will get an
|
||||
author credit if we do. Active contributors might be asked to join the core team, and
|
||||
given the ability to merge pull requests.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_code_of_conduct" href="#_code_of_conduct"></a>2.2 Code of Conduct</h2></div></div></div><p>This project adheres to the Contributor Covenant <a class="link" href="https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc" target="_top">code of
|
||||
given the ability to merge pull requests.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_code_of_conduct" href="#_code_of_conduct"></a>3.2 Code of Conduct</h2></div></div></div><p>This project adheres to the Contributor Covenant <a class="link" href="https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc" target="_top">code of
|
||||
conduct</a>. By participating, you are expected to uphold this code. Please report
|
||||
unacceptable behavior to <a class="link" href="mailto:spring-code-of-conduct@pivotal.io" target="_top">spring-code-of-conduct@pivotal.io</a>.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_code_conventions_and_housekeeping" href="#_code_conventions_and_housekeeping"></a>2.3 Code Conventions and Housekeeping</h2></div></div></div><p>None of these is essential for a pull request, but they will all help. They can also be
|
||||
unacceptable behavior to <a class="link" href="mailto:spring-code-of-conduct@pivotal.io" target="_top">spring-code-of-conduct@pivotal.io</a>.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_code_conventions_and_housekeeping" href="#_code_conventions_and_housekeeping"></a>3.3 Code Conventions and Housekeeping</h2></div></div></div><p>None of these is essential for a pull request, but they will all help. They can also be
|
||||
added after the original pull request but before a merge.</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Use the Spring Framework code format conventions. If you use Eclipse
|
||||
you can import formatter settings using the
|
||||
<code class="literal">eclipse-code-formatter.xml</code> file from the
|
||||
@@ -25,4 +25,4 @@ in the project)</li><li class="listitem">Add yourself as an <code class="literal
|
||||
than cosmetic changes).</li><li class="listitem">Add some Javadocs and, if you change the namespace, some XSD doc elements.</li><li class="listitem">A few unit tests would help a lot as well — someone has to do it.</li><li class="listitem">If no-one else is using your branch, please rebase it against the current master (or
|
||||
other target branch in the main project).</li><li class="listitem">When writing a commit message please follow <a class="link" href="http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html" target="_top">these conventions</a>,
|
||||
if you are fixing an existing issue please add <code class="literal">Fixes gh-XXXX</code> at the end of the commit
|
||||
message (where XXXX is the issue number).</li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__building_and_deploying.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="multi__reusing_the_documentation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">1. Building and Deploying </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"> 3. Reusing the documentation</td></tr></table></div></body></html>
|
||||
message (where XXXX is the issue number).</li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__checkstyle.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="multi__reusing_the_documentation.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2. Checkstyle </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"> 4. Reusing the documentation</td></tr></table></div></body></html>
|
||||
@@ -1,6 +1,6 @@
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>3. 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. 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. Reusing the documentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__contributing.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </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. 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>4. 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. 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. Reusing the documentation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi__contributing.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </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. 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"><profiles></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"><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="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"></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="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"></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-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>maven-antrun-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></artifactId></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"><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 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="#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> </td><td width="20%" align="center"> </td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">3. 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.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"> </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.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"> </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__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"> </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>
|
||||
@@ -1,18 +1,69 @@
|
||||
<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-singlepage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><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="#d0e9"></a></span></dt><dt><span class="chapter"><a href="#_building_and_deploying">1. Building and Deploying</a></span></dt><dt><span class="chapter"><a href="#_contributing">2. Contributing</a></span></dt><dd><dl><dt><span class="section"><a href="#_sign_the_contributor_license_agreement">2.1. Sign the Contributor License Agreement</a></span></dt><dt><span class="section"><a href="#_code_of_conduct">2.2. Code of Conduct</a></span></dt><dt><span class="section"><a href="#_code_conventions_and_housekeeping">2.3. Code Conventions and Housekeeping</a></span></dt></dl></dd><dt><span class="chapter"><a href="#_reusing_the_documentation">3. Reusing the documentation</a></span></dt></dl></div><div class="preface"><div class="titlepage"><div><div><h1 class="title"><a name="d0e9" href="#d0e9"></a></h1></div></div></div><p><span class="inlinemediaobject"></span></p><p>Spring Cloud Build is a common utility project for Spring Cloud
|
||||
to use for plugin and dependency management.</p></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_building_and_deploying" href="#_building_and_deploying"></a>1. 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="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_contributing" href="#_contributing"></a>2. Contributing</h1></div></div></div><p>Spring Cloud is released under the non-restrictive Apache 2.0 license,
|
||||
<title>Spring Cloud Build</title><link rel="stylesheet" type="text/css" href="css/manual-singlepage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><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="#d0e9"></a></span></dt><dt><span class="chapter"><a href="#_building_and_deploying">1. Building and Deploying</a></span></dt><dt><span class="chapter"><a href="#_checkstyle">2. Checkstyle</a></span></dt><dd><dl><dt><span class="section"><a href="#_checkstyle_configuration">2.1. Checkstyle configuration</a></span></dt></dl></dd><dt><span class="chapter"><a href="#_contributing">3. Contributing</a></span></dt><dd><dl><dt><span class="section"><a href="#_sign_the_contributor_license_agreement">3.1. Sign the Contributor License Agreement</a></span></dt><dt><span class="section"><a href="#_code_of_conduct">3.2. Code of Conduct</a></span></dt><dt><span class="section"><a href="#_code_conventions_and_housekeeping">3.3. Code Conventions and Housekeeping</a></span></dt></dl></dd><dt><span class="chapter"><a href="#_reusing_the_documentation">4. Reusing the documentation</a></span></dt></dl></div><div class="preface"><div class="titlepage"><div><div><h1 class="title"><a name="d0e9" href="#d0e9"></a></h1></div></div></div><p><span class="inlinemediaobject"></span></p><p>Spring Cloud Build is a common utility project for Spring Cloud
|
||||
to use for plugin and dependency management.</p></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_building_and_deploying" href="#_building_and_deploying"></a>1. 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="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_checkstyle" href="#_checkstyle"></a>2. Checkstyle</h1></div></div></div><p>Spring Cloud Build comes with a set of checkstyle rules. You can find them in the <code class="literal">spring-cloud-build-tools</code> module. The most notable files under the module are:</p><p><b>spring-cloud-build-tools/. </b>
|
||||
</p><pre class="screen">└── src
|
||||
├── checkstyle
|
||||
│ └── checkstyle-suppressions.xml <a name="CO1-1" href="#CO1-1"></a><span><img src="images/callouts/1.png" alt="1" border="0"></span>
|
||||
└── main
|
||||
└── resources
|
||||
├── checkstyle-header.txt <a name="CO1-2" href="#CO1-2"></a><span><img src="images/callouts/2.png" alt="2" border="0"></span>
|
||||
├── checkstyle.xml <a name="CO1-3" href="#CO1-3"></a><span><img src="images/callouts/3.png" alt="3" border="0"></span>
|
||||
└── intellij
|
||||
├── Intellij_Project_Defaults.xml <a name="CO1-4" href="#CO1-4"></a><span><img src="images/callouts/4.png" alt="4" border="0"></span>
|
||||
└── Intellij_Spring_Boot_Java_Conventions.xml <a name="CO1-5" href="#CO1-5"></a><span><img src="images/callouts/5.png" alt="5" border="0"></span></pre><p>
|
||||
</p><div class="calloutlist"><table border="0" summary="Callout list"><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>Default Checkstyle rules</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>File header setup</p></td></tr><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>Default suppression rules</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>Project defaults for Intellij that apply most of Checkstyle rules</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO1-5"><span><img src="images/callouts/5.png" alt="5" border="0"></span></a> </p></td><td valign="top" align="left"><p>Project style conventions for Intellij that apply most of Checkstyle rules</p></td></tr></table></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_checkstyle_configuration" href="#_checkstyle_configuration"></a>2.1 Checkstyle configuration</h2></div></div></div><p>Checkstyle rules are <span class="strong"><strong>disabled by deafult</strong></span>. To add checkstyle to your project just define the following properties and plugins.</p><p><b>pom.xml. </b>
|
||||
</p><pre class="screen"><properties>
|
||||
<maven-checkstyle-plugin.failsOnError>true</maven-checkstyle-plugin.failsOnError> <a name="CO2-1" href="#CO2-1"></a><span><img src="images/callouts/1.png" alt="1" border="0"></span>
|
||||
<maven-checkstyle-plugin.failsOnViolation>true
|
||||
</maven-checkstyle-plugin.failsOnViolation> <a name="CO2-2" href="#CO2-2"></a><span><img src="images/callouts/2.png" alt="2" border="0"></span>
|
||||
<maven-checkstyle-plugin.includeTestSourceDirectory>true
|
||||
</maven-checkstyle-plugin.includeTestSourceDirectory> <a name="CO2-3" href="#CO2-3"></a><span><img src="images/callouts/3.png" alt="3" border="0"></span>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin> <a name="CO2-4" href="#CO2-4"></a><span><img src="images/callouts/4.png" alt="4" border="0"></span>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin> <a name="CO2-5" href="#CO2-5"></a><span><img src="images/callouts/5.png" alt="5" border="0"></span>
|
||||
<groupId>io.spring.javaformat</groupId>
|
||||
<artifactId>spring-javaformat-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin> <a name="CO2-6" href="#CO2-6"></a><span><img src="images/callouts/6.png" alt="6" border="0"></span>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
</build></pre><p>
|
||||
</p><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><p><a href="#CO2-1"><span><img src="images/callouts/1.png" alt="1" border="0"></span></a> </p></td><td valign="top" align="left"><p>Fails the build upon Checkstyle errors</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO2-2"><span><img src="images/callouts/2.png" alt="2" border="0"></span></a> </p></td><td valign="top" align="left"><p>Fails the build upon Checkstyle violations</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO2-3"><span><img src="images/callouts/3.png" alt="3" border="0"></span></a> </p></td><td valign="top" align="left"><p>Checkstyle analyzes also the test sources</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO2-4"><span><img src="images/callouts/4.png" alt="4" border="0"></span></a> <a href="#CO2-6"><span><img src="images/callouts/6.png" alt="6" border="0"></span></a> </p></td><td valign="top" align="left"><p>Add checkstyle plugin to your build and reporting phases</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CO2-5"><span><img src="images/callouts/5.png" alt="5" border="0"></span></a> </p></td><td valign="top" align="left"><p>Add the Spring Java Format plugin that will reformat your code to pass most of the Checkstyle formatting rules</p></td></tr></table></div><p>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 <code class="literal">${project.root}/src/checkstyle/checkstyle-suppressions.xml</code> with your suppressions. Example:</p><p><b>projectRoot/src/checkstyle/checkstyle-suppresions.xml. </b>
|
||||
</p><pre class="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></pre><p>
|
||||
</p></div></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_contributing" href="#_contributing"></a>3. Contributing</h1></div></div></div><p>Spring Cloud is released under the non-restrictive Apache 2.0 license,
|
||||
and follows a very standard Github development process, using Github
|
||||
tracker for issues and merging pull requests into master. If you want
|
||||
to contribute even something trivial please do not hesitate, but
|
||||
follow the guidelines below.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_sign_the_contributor_license_agreement" href="#_sign_the_contributor_license_agreement"></a>2.1 Sign the Contributor License Agreement</h2></div></div></div><p>Before we accept a non-trivial patch or pull request we will need you to sign the
|
||||
follow the guidelines below.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_sign_the_contributor_license_agreement" href="#_sign_the_contributor_license_agreement"></a>3.1 Sign the Contributor License Agreement</h2></div></div></div><p>Before we accept a non-trivial patch or pull request we will need you to sign the
|
||||
<a class="link" href="https://cla.pivotal.io/sign/spring" target="_top">Contributor License Agreement</a>.
|
||||
Signing the contributor’s agreement does not grant anyone commit rights to the main
|
||||
repository, but it does mean that we can accept your contributions, and you will get an
|
||||
author credit if we do. Active contributors might be asked to join the core team, and
|
||||
given the ability to merge pull requests.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_code_of_conduct" href="#_code_of_conduct"></a>2.2 Code of Conduct</h2></div></div></div><p>This project adheres to the Contributor Covenant <a class="link" href="https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc" target="_top">code of
|
||||
given the ability to merge pull requests.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_code_of_conduct" href="#_code_of_conduct"></a>3.2 Code of Conduct</h2></div></div></div><p>This project adheres to the Contributor Covenant <a class="link" href="https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc" target="_top">code of
|
||||
conduct</a>. By participating, you are expected to uphold this code. Please report
|
||||
unacceptable behavior to <a class="link" href="mailto:spring-code-of-conduct@pivotal.io" target="_top">spring-code-of-conduct@pivotal.io</a>.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_code_conventions_and_housekeeping" href="#_code_conventions_and_housekeeping"></a>2.3 Code Conventions and Housekeeping</h2></div></div></div><p>None of these is essential for a pull request, but they will all help. They can also be
|
||||
unacceptable behavior to <a class="link" href="mailto:spring-code-of-conduct@pivotal.io" target="_top">spring-code-of-conduct@pivotal.io</a>.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_code_conventions_and_housekeeping" href="#_code_conventions_and_housekeeping"></a>3.3 Code Conventions and Housekeeping</h2></div></div></div><p>None of these is essential for a pull request, but they will all help. They can also be
|
||||
added after the original pull request but before a merge.</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Use the Spring Framework code format conventions. If you use Eclipse
|
||||
you can import formatter settings using the
|
||||
<code class="literal">eclipse-code-formatter.xml</code> file from the
|
||||
@@ -26,7 +77,7 @@ in the project)</li><li class="listitem">Add yourself as an <code class="literal
|
||||
than cosmetic changes).</li><li class="listitem">Add some Javadocs and, if you change the namespace, some XSD doc elements.</li><li class="listitem">A few unit tests would help a lot as well — someone has to do it.</li><li class="listitem">If no-one else is using your branch, please rebase it against the current master (or
|
||||
other target branch in the main project).</li><li class="listitem">When writing a commit message please follow <a class="link" href="http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html" target="_top">these conventions</a>,
|
||||
if you are fixing an existing issue please add <code class="literal">Fixes gh-XXXX</code> at the end of the commit
|
||||
message (where XXXX is the issue number).</li></ul></div></div></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_reusing_the_documentation" href="#_reusing_the_documentation"></a>3. Reusing the documentation</h1></div></div></div><p>Spring Cloud Build publishes its <code class="literal">spring-cloud-build-docs</code> module that contains
|
||||
message (where XXXX is the issue number).</li></ul></div></div></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_reusing_the_documentation" href="#_reusing_the_documentation"></a>4. 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"><profiles></span>
|
||||
@@ -36,18 +87,18 @@ 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="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"></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="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"></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-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>maven-antrun-plugin<span xmlns:d="http://docbook.org/ns/docbook" class="hl-tag"></artifactId></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"><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 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></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="#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></body></html>
|
||||
@@ -31,6 +31,112 @@ 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 deafult</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>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin> <co xml:id="CO2-5"/>
|
||||
<groupId>io.spring.javaformat</groupId>
|
||||
<artifactId>spring-javaformat-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<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 CO2-6">
|
||||
<para>Add checkstyle plugin to your build and reporting phases</para>
|
||||
</callout>
|
||||
<callout arearefs="CO2-5">
|
||||
<para>Add the Spring Java Format plugin that will reformat your code to pass most of the Checkstyle formatting rules</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>
|
||||
</section>
|
||||
</chapter>
|
||||
<chapter xml:id="_contributing">
|
||||
<title>Contributing</title>
|
||||
<simpara>Spring Cloud is released under the non-restrictive Apache 2.0 license,
|
||||
@@ -111,15 +217,15 @@ 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="CO3-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="CO3-2"/>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId> <co xml:id="CO1-3"/>
|
||||
<artifactId>maven-antrun-plugin</artifactId> <co xml:id="CO3-3"/>
|
||||
<inherited>false</inherited>
|
||||
</plugin>
|
||||
</plugins>
|
||||
@@ -127,13 +233,13 @@ approach of generating documentation just add these plugins to your <literal>doc
|
||||
</profile>
|
||||
</profiles></programlisting>
|
||||
<calloutlist>
|
||||
<callout arearefs="CO1-1">
|
||||
<callout arearefs="CO3-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="CO3-2">
|
||||
<para>This plugin is required to parse the Asciidoctor documentation</para>
|
||||
</callout>
|
||||
<callout arearefs="CO1-3">
|
||||
<callout arearefs="CO3-3">
|
||||
<para>This plugin is required to copy resources into proper final destinations and to generate main README.adoc</para>
|
||||
</callout>
|
||||
</calloutlist>
|
||||
|
||||
Reference in New Issue
Block a user