@@ -47,12 +47,14 @@ given the ability to merge pull requests.
47
47
None of these is essential for a pull request, but they will all help. They can also be
48
48
added after the original pull request but before a merge.
49
49
50
- * Use the Spring Framework code format conventions. If you use Eclipse and you follow
51
- the '`Importing into eclipse`' instructions below you should get project specific
52
- formatting automatically. You can also import formatter settings using the
53
- `eclipse-code-formatter.xml` file from the `eclipse` folder. If using IntelliJ IDEA, you
54
- can use the http://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter Plugin]
55
- to import the same file.
50
+ * We use the https://github.com/spring-io/spring-javaformat/[Spring JavaFormat] project
51
+ to apply code formatting conventions. If you use Eclipse and you follow the '`Importing
52
+ into eclipse`' instructions below you should get project specific formatting
53
+ automatically. You can also install the https://github.com/spring-io/spring-javaformat/#intellij-idea[Spring JavaFormat IntelliJ Plugin]
54
+ or format the code from the Maven build by running
55
+ `./mvnw io.spring.javaformat:spring-javaformat-maven-plugin:apply`.
56
+ * The build includes checkstyle rules for many of our code conventions. Run
57
+ `./mvnw validate` if you want to check you changes are compliant.
56
58
* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
57
59
`@author` tag identifying you, and preferably at least a paragraph on what the class is
58
60
for.
@@ -80,13 +82,15 @@ should also work without issue.
80
82
81
83
82
84
=== Building from Source
83
- To build the source you will need to install
84
- http://maven.apache.org/run-maven/index.html[Apache Maven] v3.2.3 or above and JDK 1.8.
85
+ Spring Boot source can be build from the command line using
86
+ http://maven.apache.org/run-maven/index.html[Apache Maven] on JDK 1.8 or above.
87
+ We include '`Maven Wrapper`' scripts (`./mvnw` or `mvnw.bat`) that you can run rather
88
+ than needing to install Maven locally.
85
89
86
90
87
91
88
92
==== Default Build
89
- The project can be built from the root directory using the standard maven command:
93
+ The project can be built from the root directory using the standard Maven command:
90
94
91
95
[indent=0]
92
96
----
@@ -151,9 +155,9 @@ to Maven by setting a `MAVEN_OPTS` environment variable with the value
151
155
152
156
153
157
=== Importing into Eclipse
154
- You can import the Spring Boot code into any Eclipse Mars based distribution. The easiest
158
+ You can import the Spring Boot code into any Eclipse Oxygen based distribution. The easiest
155
159
way to setup a new environment is to use the Eclipse Installer with the provided
156
- `.setup` file.
160
+ `.setup` file (in the `/eclipse` folder) .
157
161
158
162
159
163
==== Using the Eclipse Installer
@@ -182,24 +186,21 @@ easier to navigate.
182
186
183
187
184
188
==== Manual Installation with M2Eclipse
185
- If you prefer to install Eclipse yourself we recommend that you use the
189
+ If you prefer to install Eclipse yourself you should use the
186
190
http://eclipse.org/m2e/[M2Eclipse] eclipse plugin. If you don't already have m2eclipse
187
191
installed it is available from the "Eclipse marketplace".
188
192
189
193
Spring Boot includes project specific source formatting settings, in order to have these
190
- work with m2eclipse, we provide additional Eclipse plugins that you can install:
194
+ work with m2eclipse, we provide an additional Eclipse plugin that you can install:
195
+
191
196
192
- ===== Install the m2eclipse-maveneclipse plugin
193
- * Select "`Help`" -> "`Install New Software`".
194
- * Add `https://dl.bintray.com/philwebb/m2eclipse-maveneclipse` as a site.
195
- * Install "Maven Integration for the maven-eclipse-plugin"
196
197
197
198
===== Install the Spring Formatter plugin
198
199
* Select "`Help`" -> "`Install New Software`".
199
- * Add `https://dl.bintray.com/philwebb/ spring-eclipse-code-formatter /` as a site.
200
- * Install "Spring Code Formatter "
200
+ * Add `https://dl.bintray.com/spring/javaformat -eclipse/` as a site.
201
+ * Install "Spring Java Format "
201
202
202
- NOTE: These plugins are optional. Projects can be imported without the plugins, your code
203
+ NOTE: The plugin is optional. Projects can be imported without the plugins, your code
203
204
changes just won't be automatically formatted.
204
205
205
206
With the requisite eclipse plugins installed you can select
@@ -208,28 +209,14 @@ need to import the root `spring-boot` pom and the `spring-boot-samples` pom sepa
208
209
209
210
210
211
211
- ==== Importing into Eclipse without M2Eclipse
212
- If you prefer not to use m2eclipse you can generate eclipse project metadata using the
213
- following command:
214
-
215
- [indent=0]
216
- ----
217
- $ ./mvnw eclipse:eclipse
218
- ----
219
-
220
- The generated eclipse projects can be imported by selecting `import existing projects`
221
- from the `file` menu.
222
-
223
-
224
-
225
212
=== Importing into Other IDEs
226
213
Maven is well supported by most Java IDEs. Refer to your vendor documentation.
227
214
228
215
229
216
230
217
== Integration Tests
231
218
The sample applications are used as integration tests during the build (when you
232
- `mvn install`). Due to the fact that they make use of the `spring-boot-maven-plugin`
219
+ `./mvnw install`). Due to the fact that they make use of the `spring-boot-maven-plugin`
233
220
they cannot be called directly, and so instead are launched via the
234
221
`maven-invoker-plugin`. If you encounter build failures running the integration tests,
235
222
check the `build.log` file in the appropriate sample directory.
0 commit comments