@@ -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
- https://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
----
@@ -134,9 +138,9 @@ can run this from the top-level directory:
134
138
135
139
136
140
=== Importing into Eclipse
137
- You can import the Spring Boot code into any Eclipse Mars based distribution. The easiest
141
+ You can import the Spring Boot code into any Eclipse Oxygen based distribution. The easiest
138
142
way to setup a new environment is to use the Eclipse Installer with the provided
139
- `.setup` file.
143
+ `.setup` file (in the `/eclipse` folder) .
140
144
141
145
142
146
==== Using the Eclipse Installer
@@ -165,24 +169,21 @@ easier to navigate.
165
169
166
170
167
171
==== Manual Installation with M2Eclipse
168
- If you prefer to install Eclipse yourself we recommend that you use the
172
+ If you prefer to install Eclipse yourself you should use the
169
173
http://eclipse.org/m2e/[M2Eclipse] eclipse plugin. If you don't already have m2eclipse
170
174
installed it is available from the "Eclipse marketplace".
171
175
172
176
Spring Boot includes project specific source formatting settings, in order to have these
173
- work with m2eclipse, we provide additional Eclipse plugins that you can install:
177
+ work with m2eclipse, we provide an additional Eclipse plugin that you can install:
178
+
174
179
175
- ===== Install the m2eclipse-maveneclipse plugin
176
- * Select "`Help`" -> "`Install New Software`".
177
- * Add `https://dl.bintray.com/philwebb/m2eclipse-maveneclipse` as a site.
178
- * Install "Maven Integration for the maven-eclipse-plugin"
179
180
180
181
===== Install the Spring Formatter plugin
181
182
* Select "`Help`" -> "`Install New Software`".
182
- * Add `https://dl.bintray.com/philwebb/ spring-eclipse-code-formatter /` as a site.
183
- * Install "Spring Code Formatter "
183
+ * Add `https://dl.bintray.com/spring/javaformat -eclipse/` as a site.
184
+ * Install "Spring Java Format "
184
185
185
- NOTE: These plugins are optional. Projects can be imported without the plugins, your code
186
+ NOTE: The plugin is optional. Projects can be imported without the plugins, your code
186
187
changes just won't be automatically formatted.
187
188
188
189
With the requisite eclipse plugins installed you can select
@@ -191,28 +192,14 @@ need to import the root `spring-boot` pom and the `spring-boot-samples` pom sepa
191
192
192
193
193
194
194
- ==== Importing into Eclipse without M2Eclipse
195
- If you prefer not to use m2eclipse you can generate eclipse project metadata using the
196
- following command:
197
-
198
- [indent=0]
199
- ----
200
- $ ./mvnw eclipse:eclipse
201
- ----
202
-
203
- The generated eclipse projects can be imported by selecting `import existing projects`
204
- from the `file` menu.
205
-
206
-
207
-
208
195
=== Importing into Other IDEs
209
196
Maven is well supported by most Java IDEs. Refer to your vendor documentation.
210
197
211
198
212
199
213
200
== Integration Tests
214
201
The sample applications are used as integration tests during the build (when you
215
- `mvn install`). Due to the fact that they make use of the `spring-boot-maven-plugin`
202
+ `./mvnw install`). Due to the fact that they make use of the `spring-boot-maven-plugin`
216
203
they cannot be called directly, and so instead are launched via the
217
204
`maven-invoker-plugin`. If you encounter build failures running the integration tests,
218
205
check the `build.log` file in the appropriate sample directory.
0 commit comments