Skip to content

Commit 27b0cf9

Browse files
committed
Polish README and CONTRIBUTING files
1 parent 619247b commit 27b0cf9

File tree

2 files changed

+126
-214
lines changed

2 files changed

+126
-214
lines changed

CONTRIBUTING.adoc

Lines changed: 62 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,67 @@
11
= Contributing to Spring Boot
22

3-
Spring Boot is released under the Apache 2.0 license. If you would like to contribute
4-
something, or want to hack on the code this document should help you get started.
3+
Spring Boot is released under the Apache 2.0 license. If you would like to contribute something, or want to hack on the code this document should help you get started.
54

65

76

87
== Code of Conduct
9-
This project adheres to the Contributor Covenant link:CODE_OF_CONDUCT.adoc[code of
10-
conduct]. By participating, you are expected to uphold this code. Please report
11-
unacceptable behavior to [email protected].
8+
This project adheres to the Contributor Covenant link:CODE_OF_CONDUCT.adoc[code of conduct].
9+
By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].
1210

1311

1412

1513
== Using GitHub Issues
16-
We use GitHub issues to track bugs and enhancements. If you have a general usage question
17-
please ask on https://stackoverflow.com[Stack Overflow]. The Spring Boot team and the
18-
broader community monitor the https://stackoverflow.com/tags/spring-boot[`spring-boot`]
19-
tag.
14+
We use GitHub issues to track bugs and enhancements.
15+
If you have a general usage question please ask on https://stackoverflow.com[Stack Overflow].
16+
The Spring Boot team and the broader community monitor the https://stackoverflow.com/tags/spring-boot[`spring-boot`] tag.
2017

21-
If you are reporting a bug, please help to speed up problem diagnosis by providing as
22-
much information as possible. Ideally, that would include a small sample project that
23-
reproduces the problem.
18+
If you are reporting a bug, please help to speed up problem diagnosis by providing as much information as possible.
19+
Ideally, that would include a small sample project that reproduces the problem.
2420

2521

2622

2723
== Reporting Security Vulnerabilities
28-
If you think you have found a security vulnerability in Spring Boot please *DO NOT*
29-
disclose it publicly until we've had a chance to fix it. Please don't report security
30-
vulnerabilities using GitHub issues, instead head over to https://pivotal.io/security and
31-
learn how to disclose them responsibly.
24+
If you think you have found a security vulnerability in Spring Boot please *DO NOT* disclose it publicly until we've had a chance to fix it.
25+
Please don't report security vulnerabilities using GitHub issues, instead head over to https://tanzu.vmware.com/security and learn how to disclose them responsibly.
3226

3327

3428

3529
== Sign the Contributor License Agreement
36-
Before we accept a non-trivial patch or pull request we will need you to
37-
https://cla.pivotal.io/sign/spring[sign the Contributor License Agreement].
38-
Signing the contributor's agreement does not grant anyone commit rights to the main
39-
repository, but it does mean that we can accept your contributions, and you will get an
40-
author credit if we do. Active contributors might be asked to join the core team, and
41-
given the ability to merge pull requests.
30+
Before we accept a non-trivial patch or pull request we will need you to https://cla.pivotal.io/sign/spring[sign the Contributor License Agreement].
31+
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.
32+
Active contributors might be asked to join the core team, and given the ability to merge pull requests.
4233

4334

4435

4536
== Code Conventions and Housekeeping
46-
None of these is essential for a pull request, but they will all help. They can also be
47-
added after the original pull request but before a merge.
48-
49-
* We use the https://github.com/spring-io/spring-javaformat/[Spring JavaFormat] project
50-
to apply code formatting conventions. If you use Eclipse and you follow the '`Importing
51-
into eclipse`' instructions below you should get project specific formatting
52-
automatically. You can also install the https://github.com/spring-io/spring-javaformat/#intellij-idea[Spring JavaFormat IntelliJ Plugin]
53-
or format the code from the Maven build by running
54-
`./mvnw io.spring.javaformat:spring-javaformat-maven-plugin:apply`.
55-
* The build includes checkstyle rules for many of our code conventions. Run
56-
`./mvnw validate` if you want to check you changes are compliant.
57-
* Make sure all new `.java` files have a Javadoc class comment with at least an
58-
`@author` tag identifying you, and preferably at least a paragraph on what the class is
59-
for.
60-
* Add the ASF license header comment to all new `.java` files (copy from existing files
61-
in the project)
62-
* Add yourself as an `@author` to the `.java` files that you modify substantially (more
63-
than cosmetic changes).
37+
None of these is essential for a pull request, but they will all help.
38+
They can also be added after the original pull request but before a merge.
39+
40+
* We use the https://github.com/spring-io/spring-javaformat/[Spring JavaFormat] project to apply code formatting conventions.
41+
If you use Eclipse and you follow the '`Importing into eclipse`' instructions below you should get project specific formatting automatically.
42+
You can also install the https://github.com/spring-io/spring-javaformat/#intellij-idea[Spring JavaFormat IntelliJ Plugin] or format the code from the Maven build by running `./mvnw io.spring.javaformat:spring-javaformat-maven-plugin:apply`.
43+
* The build includes checkstyle rules for many of our code conventions.
44+
Run `./mvnw validate` if you want to check you changes are compliant.
45+
* Make sure all new `.java` files have a Javadoc class comment with at least an `@author` tag identifying you, and preferably at least a paragraph on what the class is for.
46+
* Add the ASF license header comment to all new `.java` files (copy from existing files in the project).
47+
* Add yourself as an `@author` to the `.java` files that you modify substantially (more than cosmetic changes).
6448
* Add some Javadocs.
6549
* A few unit tests would help a lot as well -- someone has to do it.
66-
* If no-one else is using your branch, please rebase it against the current master (or
67-
other target branch in the main project).
68-
* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions],
69-
if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit
70-
message (where `XXXX` is the issue number).
50+
* If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project).
51+
* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions].
7152

7253

7354

7455
== Working with the Code
75-
If you don't have an IDE preference we would recommend that you use
76-
https://spring.io/tools/sts[Spring Tools Suite] or
77-
https://eclipse.org[Eclipse] when working with the code. We use the
78-
https://eclipse.org/m2e/[M2Eclipse] eclipse plugin for maven support. Other IDEs and tools
79-
should also work without issue.
56+
If you don't have an IDE preference we would recommend that you use https://spring.io/tools/sts[Spring Tools Suite] or https://eclipse.org[Eclipse] when working with the code.
57+
We use the https://eclipse.org/m2e/[M2Eclipse] Eclipse plugin for Maven support.
58+
Other IDEs and tools should also work without issue.
8059

8160

8261

8362
=== Building from Source
84-
Spring Boot source can be built from the command line using
85-
https://maven.apache.org/run-maven/index.html[Apache Maven] on JDK 1.8 or above. We
86-
include '`Maven Wrapper`' scripts (`./mvnw` or `mvnw.bat`) that you can run rather than
87-
needing to install Maven locally.
63+
Spring Boot source can be built from the command line using https://maven.apache.org/run-maven/index.html[Apache Maven] on JDK 1.8 or above.
64+
We include '`Maven Wrapper`' scripts (`./mvnw` or `mvnw.bat`) that you can run rather than needing to install Maven locally.
8865

8966

9067

@@ -96,11 +73,9 @@ The project can be built from the root directory using the standard Maven comman
9673
$ ./mvnw clean install
9774
----
9875

99-
NOTE: You may need to increase the amount of memory available to Maven by setting
100-
a `MAVEN_OPTS` environment variable with the value `-Xmx512m`
76+
NOTE: You may need to increase the amount of memory available to Maven by setting a `MAVEN_OPTS` environment variable with the value `-Xmx512m`.
10177

102-
If you are rebuilding often, you might also want to skip the tests and the execution of
103-
checkstyle until you are ready to submit a pull request:
78+
If you are rebuilding often, you might also want to skip the tests and the execution of checkstyle until you are ready to submit a pull request:
10479

10580
[indent=0]
10681
----
@@ -117,16 +92,13 @@ You can run a full build using the following command:
11792
$ ./mvnw -Pfull clean install
11893
----
11994

120-
NOTE: As for the standard build, you may need to increase the amount of memory available
121-
to Maven by setting a `MAVEN_OPTS` environment variable with the value `-Xmx512m`. We
122-
generate more artifacts when running the full build (such as Javadoc jars), so you may
123-
find the process a little slower than the standard build.
95+
NOTE: As for the standard build, you may need to increase the amount of memory available to Maven by setting a `MAVEN_OPTS` environment variable with the value `-Xmx512m`.
96+
We generate more artifacts when running the full build (such as Javadoc jars), so you may find the process a little slower than the standard build.
12497

12598
[TIP]
12699
====
127-
If you want to run a build without the smoke tests and integration tests, building the
128-
`spring-boot-project` module is enough. You can cd there and run the same command, or you
129-
can run this from the top-level directory:
100+
If you want to run a build without the smoke tests and integration tests, building the `spring-boot-project` module is enough.
101+
You can cd there and run the same command, or you can run this from the top-level directory:
130102
131103
[indent=0]
132104
----
@@ -137,9 +109,8 @@ can run this from the top-level directory:
137109

138110

139111
=== Importing into Eclipse
140-
You can import the Spring Boot code into any Eclipse 2019-12-based distribution. The
141-
easiest way to setup a new environment is to use the Eclipse Installer with the provided
142-
`spring-boot-project.setup` file (in the `/eclipse` folder).
112+
You can import the Spring Boot code into any Eclipse 2019-12-based distribution.
113+
The easiest way to setup a new environment is to use the Eclipse Installer with the provided `spring-boot-project.setup` file (in the `/eclipse` folder).
143114

144115

145116

@@ -150,7 +121,8 @@ To use the installer:
150121
* Download and run the latest https://download.eclipse.org/justj/?file=oomph/products/latest[Eclipse Installer] (must be 1.19.0 or above).
151122
* Switch to "Advanced Mode" using the drop down menu on the right.
152123
* Select "`Eclipse IDE for Java Developers`" under "`Eclipse.org`" as the product to install, `2020-12` as the product version, and click "`next`".
153-
* For the "`Project`" click on "`+`" to add a new setup file. Select "`Github Projects`" and browse for `<checkout>/eclipse/spring-boot-project.setup` from your locally cloned copy of the source code.
124+
* For the "`Project`" click on "`+`" to add a new setup file.
125+
Select "`Github Projects`" and browse for `<checkout>/eclipse/spring-boot-project.setup` from your locally cloned copy of the source code.
154126
Click "`OK`" to add the setup file to the list.
155127
* Double-click on "`Spring Boot`" from the project list to add it to the list that will be provisioned then click "`Next`".
156128
* Click show all variables and make sure that "`Checkout Location`" points to the locally cloned source code that you selected earlier.
@@ -162,17 +134,16 @@ Projects will be grouped into working-sets to make the code easier to navigate.
162134

163135
If you want to work on the `spring-boot-gradle-plugin` you should remove the imported Maven project and reimport it as a Gradle project.
164136

165-
TIP: If you see import errors with `com.sun` packages make sure you have setup a valid `JavaSE-1.8` environment. From preferences select "`Java`", "`Installed JREs`", "`Execution Environments`" and make sure "`JavaSE-1.8`" points to a Java 1.8 install (we use AdoptOpenJDK on our CI).
137+
TIP: If you see import errors with `com.sun` packages make sure you have setup a valid `JavaSE-1.8` environment.
138+
From preferences select "`Java`", "`Installed JREs`", "`Execution Environments`" and make sure "`JavaSE-1.8`" points to a Java 1.8 install (we use AdoptOpenJDK on our CI).
166139

167140

168141

169142
==== Manual Installation with M2Eclipse
170-
If you prefer to install Eclipse yourself you should use the
171-
https://eclipse.org/m2e/[M2Eclipse] eclipse plugin. If you don't already have m2eclipse
172-
installed it is available from the "`Eclipse marketplace`".
143+
If you prefer to install Eclipse yourself you should use the https://eclipse.org/m2e/[M2Eclipse] eclipse plugin.
144+
If you don't already have m2eclipse installed it is available from the "`Eclipse marketplace`".
173145

174-
Spring Boot includes project specific source formatting settings, in order to have these
175-
work with m2eclipse, we provide an additional Eclipse plugin that you can install:
146+
Spring Boot includes project specific source formatting settings, in order to have these work with m2eclipse, we provide an additional Eclipse plugin that you can install.
176147

177148

178149

@@ -181,30 +152,25 @@ work with m2eclipse, we provide an additional Eclipse plugin that you can instal
181152
* Add `https://dl.bintray.com/spring/javaformat-eclipse/` as a site.
182153
* Install "Spring Java Format".
183154

184-
NOTE: The plugin is optional. Projects can be imported without the plugins, your code
185-
changes just won't be automatically formatted.
155+
NOTE: The plugin is optional.
156+
Projects can be imported without the plugins, your code changes just won't be automatically formatted.
186157

187-
With the requisite eclipse plugins installed you can select
188-
`import existing maven projects` from the `file` menu to import the code. You will
189-
need to import the root `spring-boot` pom and the `spring-boot-smoke-tests` pom separately.
158+
With the requisite eclipse plugins installed you can select `import existing maven projects` from the `file` menu to import the code.
159+
You will need to import the root `spring-boot` pom and the `spring-boot-smoke-tests` pom separately.
190160

191161

192162

193163
=== Importing into IntelliJ IDEA
194164
**Please, do this first!**
195-
Go to `Preferences | Build, Execution, Deployment | Build Tools | Maven | Importing`
196-
and set `VM options for importer` to `-Xmx2g` to allocate sufficient memory for IDEA's
197-
Maven import process to parse the Spring Boot project structure. _Not doing so could
198-
mean the import fails silently, leaving the project setup incomplete._
165+
Go to `Preferences | Build, Execution, Deployment | Build Tools | Maven | Importing` and set `VM options for importer` to `-Xmx2g` to allocate sufficient memory for IDEA's Maven import process to parse the Spring Boot project structure.
166+
_Not doing so could mean the import fails silently, leaving the project setup incomplete._
199167

200-
For the actual import use "`File`" -> "`Open`" and select the root `pom.xml`, or the
201-
`spring-boot-project/pom.xml` if you only want the Spring Boot project sources.
168+
For the actual import use "`File`" -> "`Open`" and select the root `pom.xml`, or the `spring-boot-project/pom.xml` if you only want the Spring Boot project sources.
202169

203170

204171

205172
==== Install the Spring Formatter plugin
206-
If you haven't done so, install the formatter plugin so that proper formatting rules are
207-
applied automatically when you reformat code in the IDE.
173+
If you haven't done so, install the formatter plugin so that proper formatting rules are applied automatically when you reformat code in the IDE.
208174

209175
* Download the latest https://search.maven.org/search?q=g:io.spring.javaformat%20AND%20a:spring-javaformat-intellij-plugin[IntelliJ IDEA plugin].
210176
* Select "`IntelliJ IDEA`" -> "`Preferences`".
@@ -215,8 +181,7 @@ applied automatically when you reformat code in the IDE.
215181

216182

217183
==== Import additional code style
218-
The formatter does not cover all rules (such as order of imports) and an additional file
219-
needs to be added.
184+
The formatter does not cover all rules (such as order of imports) and an additional file needs to be added.
220185

221186
* Select "`IntelliJ IDEA`" -> "`Preferences`".
222187
* Select "`Editor`" -> "`Code Style`".
@@ -226,22 +191,21 @@ needs to be added.
226191

227192

228193
=== Importing into Other IDEs
229-
Maven is well supported by most Java IDEs. Refer to your vendor documentation.
194+
Maven is well supported by most Java IDEs.
195+
Refer to your vendor documentation.
230196

231197

232198

233199
== Integration Tests
234200
The smoke tests run as part of the build when you `./mvnw install`.
235-
Due to the fact that they make use of the `spring-boot-maven-plugin`
236-
they cannot be called directly, and so instead are launched via the
237-
`maven-invoker-plugin`. If you encounter build failures running the integration tests,
238-
check the `build.log` file in the appropriate smoke test directory.
201+
Due to the fact that they make use of the `spring-boot-maven-plugin` they cannot be called directly, and so instead are launched via the `maven-invoker-plugin`.
202+
If you encounter build failures running the integration tests, check the `build.log` file in the appropriate smoke test directory.
203+
239204

240205

241206
== Cloning the git repository on Windows
242-
Some files in the git repository may exceed the Windows maximum file path (260
243-
characters), depending on where you clone the repository. If you get `Filename too long`
244-
errors, set the `core.longPaths=true` git option:
207+
Some files in the git repository may exceed the Windows maximum file path (260 characters), depending on where you clone the repository.
208+
If you get `Filename too long` errors, set the `core.longPaths=true` git option:
245209

246210
```
247211
git clone -c core.longPaths=true https://github.com/spring-projects/spring-boot

0 commit comments

Comments
 (0)