Skip to content

Commit 8c6e856

Browse files
committed
Fix formatting
1 parent 661fcfe commit 8c6e856

File tree

1 file changed

+32
-36
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven

1 file changed

+32
-36
lines changed

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractRunMojo.java

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,11 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
8080
private ToolchainManager toolchainManager;
8181

8282
/**
83-
* Add maven resources to the classpath directly, this allows live in-place
84-
* editing of resources. Duplicate resources are removed from
85-
* {@code target/classes} to prevent them from appearing twice if
86-
* {@code ClassLoader.getResources()} is called. Please consider adding
87-
* {@code spring-boot-devtools} to your project instead as it provides this
88-
* feature and many more.
83+
* Add maven resources to the classpath directly, this allows live in-place editing of
84+
* resources. Duplicate resources are removed from {@code target/classes} to prevent
85+
* them from appearing twice if {@code ClassLoader.getResources()} is called. Please
86+
* consider adding {@code spring-boot-devtools} to your project instead as it provides
87+
* this feature and many more.
8988
*
9089
* @since 1.0.0
9190
*/
@@ -109,18 +108,17 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
109108
private boolean noverify = false;
110109

111110
/**
112-
* Current working directory to use for the application. If not specified,
113-
* basedir will be used.
111+
* Current working directory to use for the application. If not specified, basedir
112+
* will be used.
114113
*
115114
* @since 1.5.0
116115
*/
117116
@Parameter(property = "spring-boot.run.workingDirectory")
118117
private File workingDirectory;
119118

120119
/**
121-
* JVM arguments that should be associated with the forked process used to run
122-
* the application. On command line, make sure to wrap multiple values between
123-
* quotes.
120+
* JVM arguments that should be associated with the forked process used to run the
121+
* application. On command line, make sure to wrap multiple values between quotes.
124122
*
125123
* @since 1.1.0
126124
*/
@@ -136,8 +134,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
136134
private Map<String, String> systemPropertyVariables;
137135

138136
/**
139-
* List of Environment variables that should be associated with the forked
140-
* process used to run the application.
137+
* List of Environment variables that should be associated with the forked process
138+
* used to run the application.
141139
*
142140
* @since 2.1.0
143141
*/
@@ -154,8 +152,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
154152

155153
/**
156154
* Arguments from the command line that should be passed to the application. Use
157-
* spaces to separate multiple arguments and make sure to wrap multiple values
158-
* between quotes. When specified, takes precedence over {@link #arguments}.
155+
* spaces to separate multiple arguments and make sure to wrap multiple values between
156+
* quotes. When specified, takes precedence over {@link #arguments}.
159157
*
160158
* @since 2.2.3
161159
*/
@@ -164,35 +162,35 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
164162

165163
/**
166164
* The spring profiles to activate. Convenience shortcut of specifying the
167-
* 'spring.profiles.active' argument. On command line use commas to separate
168-
* multiple profiles.
165+
* 'spring.profiles.active' argument. On command line use commas to separate multiple
166+
* profiles.
169167
*
170168
* @since 1.3.0
171169
*/
172170
@Parameter(property = "spring-boot.run.profiles")
173171
private String[] profiles;
174172

175173
/**
176-
* The name of the main class. If not specified the first compiled class found
177-
* that contains a 'main' method will be used.
174+
* The name of the main class. If not specified the first compiled class found that
175+
* contains a 'main' method will be used.
178176
*
179177
* @since 1.0.0
180178
*/
181179
@Parameter(property = "spring-boot.run.main-class")
182180
private String mainClass;
183181

184182
/**
185-
* Additional classpath elements that should be added to the classpath. An
186-
* element can be a directory with classes and resources or a jar file.
183+
* Additional classpath elements that should be added to the classpath. An element can
184+
* be a directory with classes and resources or a jar file.
187185
*
188186
* @since 3.2.0
189187
*/
190188
@Parameter(property = "spring-boot.run.additional-classpath-elements")
191189
private String[] additionalClasspathElements;
192190

193191
/**
194-
* Directory containing the classes and resource files that should be used to
195-
* run the application.
192+
* Directory containing the classes and resource files that should be used to run the
193+
* application.
196194
*
197195
* @since 1.0.0
198196
*/
@@ -224,10 +222,9 @@ private String determineMainClass() throws MojoExecutionException {
224222
}
225223

226224
/**
227-
* Returns the directories that contain the application's classes and resources.
228-
* When the application's main class has not been configured, each directory is
229-
* searched in turn for an appropriate main class.
230-
*
225+
* Returns the directories that contain the application's classes and resources. When
226+
* the application's main class has not been configured, each directory is searched in
227+
* turn for an appropriate main class.
231228
* @return the directories that contain the application's classes and resources
232229
* @since 3.1.0
233230
*/
@@ -256,7 +253,6 @@ private void run(String startClassName) throws MojoExecutionException, MojoFailu
256253

257254
/**
258255
* Run the application.
259-
*
260256
* @param processExecutor the {@link JavaProcessExecutor} to use
261257
* @param workingDirectory the working directory of the forked JVM
262258
* @param args the arguments (JVM arguments and application arguments)
@@ -270,7 +266,6 @@ protected abstract void run(JavaProcessExecutor processExecutor, File workingDir
270266

271267
/**
272268
* Resolve the application arguments to use.
273-
*
274269
* @return a {@link RunArguments} defining the application arguments
275270
*/
276271
protected RunArguments resolveApplicationArguments() {
@@ -282,7 +277,6 @@ protected RunArguments resolveApplicationArguments() {
282277

283278
/**
284279
* Resolve the environment variables to use.
285-
*
286280
* @return an {@link EnvVariables} defining the environment variables
287281
*/
288282
protected EnvVariables resolveEnvVariables() {
@@ -303,15 +297,15 @@ private Map<String, String> determineEnvironmentVariables() {
303297

304298
/**
305299
* Resolve the JVM arguments to use.
306-
*
307300
* @return a {@link RunArguments} defining the JVM arguments
308301
*/
309302
protected RunArguments resolveJvmArguments() {
310303
StringBuilder stringBuilder = new StringBuilder();
311304
if (this.systemPropertyVariables != null) {
312-
stringBuilder.append(this.systemPropertyVariables.entrySet().stream()
313-
.map((e) -> SystemPropertyFormatter.format(e.getKey(), e.getValue()))
314-
.collect(Collectors.joining(" ")));
305+
stringBuilder.append(this.systemPropertyVariables.entrySet()
306+
.stream()
307+
.map((e) -> SystemPropertyFormatter.format(e.getKey(), e.getValue()))
308+
.collect(Collectors.joining(" ")));
315309
}
316310
if (this.jvmArguments != null) {
317311
stringBuilder.append(" ").append(this.jvmArguments);
@@ -360,7 +354,8 @@ private void addClasspath(List<String> args) throws MojoExecutionException {
360354
getLog().debug("Classpath for forked process: " + classpath);
361355
}
362356
args.addAll(classpath.args(true));
363-
} catch (Exception ex) {
357+
}
358+
catch (Exception ex) {
364359
throw new MojoExecutionException("Could not build classpath", ex);
365360
}
366361
}
@@ -373,7 +368,8 @@ protected URL[] getClassPathUrls() throws MojoExecutionException {
373368
addProjectClasses(urls);
374369
addDependencies(urls);
375370
return urls.toArray(new URL[0]);
376-
} catch (IOException ex) {
371+
}
372+
catch (IOException ex) {
377373
throw new MojoExecutionException("Unable to build classpath", ex);
378374
}
379375
}

0 commit comments

Comments
 (0)