@@ -80,12 +80,11 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
80
80
private ToolchainManager toolchainManager ;
81
81
82
82
/**
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.
89
88
*
90
89
* @since 1.0.0
91
90
*/
@@ -109,18 +108,17 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
109
108
private boolean noverify = false ;
110
109
111
110
/**
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.
114
113
*
115
114
* @since 1.5.0
116
115
*/
117
116
@ Parameter (property = "spring-boot.run.workingDirectory" )
118
117
private File workingDirectory ;
119
118
120
119
/**
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.
124
122
*
125
123
* @since 1.1.0
126
124
*/
@@ -136,8 +134,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
136
134
private Map <String , String > systemPropertyVariables ;
137
135
138
136
/**
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.
141
139
*
142
140
* @since 2.1.0
143
141
*/
@@ -154,8 +152,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
154
152
155
153
/**
156
154
* 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}.
159
157
*
160
158
* @since 2.2.3
161
159
*/
@@ -164,35 +162,35 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
164
162
165
163
/**
166
164
* 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.
169
167
*
170
168
* @since 1.3.0
171
169
*/
172
170
@ Parameter (property = "spring-boot.run.profiles" )
173
171
private String [] profiles ;
174
172
175
173
/**
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.
178
176
*
179
177
* @since 1.0.0
180
178
*/
181
179
@ Parameter (property = "spring-boot.run.main-class" )
182
180
private String mainClass ;
183
181
184
182
/**
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.
187
185
*
188
186
* @since 3.2.0
189
187
*/
190
188
@ Parameter (property = "spring-boot.run.additional-classpath-elements" )
191
189
private String [] additionalClasspathElements ;
192
190
193
191
/**
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.
196
194
*
197
195
* @since 1.0.0
198
196
*/
@@ -224,10 +222,9 @@ private String determineMainClass() throws MojoExecutionException {
224
222
}
225
223
226
224
/**
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.
231
228
* @return the directories that contain the application's classes and resources
232
229
* @since 3.1.0
233
230
*/
@@ -256,7 +253,6 @@ private void run(String startClassName) throws MojoExecutionException, MojoFailu
256
253
257
254
/**
258
255
* Run the application.
259
- *
260
256
* @param processExecutor the {@link JavaProcessExecutor} to use
261
257
* @param workingDirectory the working directory of the forked JVM
262
258
* @param args the arguments (JVM arguments and application arguments)
@@ -270,7 +266,6 @@ protected abstract void run(JavaProcessExecutor processExecutor, File workingDir
270
266
271
267
/**
272
268
* Resolve the application arguments to use.
273
- *
274
269
* @return a {@link RunArguments} defining the application arguments
275
270
*/
276
271
protected RunArguments resolveApplicationArguments () {
@@ -282,7 +277,6 @@ protected RunArguments resolveApplicationArguments() {
282
277
283
278
/**
284
279
* Resolve the environment variables to use.
285
- *
286
280
* @return an {@link EnvVariables} defining the environment variables
287
281
*/
288
282
protected EnvVariables resolveEnvVariables () {
@@ -303,15 +297,15 @@ private Map<String, String> determineEnvironmentVariables() {
303
297
304
298
/**
305
299
* Resolve the JVM arguments to use.
306
- *
307
300
* @return a {@link RunArguments} defining the JVM arguments
308
301
*/
309
302
protected RunArguments resolveJvmArguments () {
310
303
StringBuilder stringBuilder = new StringBuilder ();
311
304
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 (" " )));
315
309
}
316
310
if (this .jvmArguments != null ) {
317
311
stringBuilder .append (" " ).append (this .jvmArguments );
@@ -360,7 +354,8 @@ private void addClasspath(List<String> args) throws MojoExecutionException {
360
354
getLog ().debug ("Classpath for forked process: " + classpath );
361
355
}
362
356
args .addAll (classpath .args (true ));
363
- } catch (Exception ex ) {
357
+ }
358
+ catch (Exception ex ) {
364
359
throw new MojoExecutionException ("Could not build classpath" , ex );
365
360
}
366
361
}
@@ -373,7 +368,8 @@ protected URL[] getClassPathUrls() throws MojoExecutionException {
373
368
addProjectClasses (urls );
374
369
addDependencies (urls );
375
370
return urls .toArray (new URL [0 ]);
376
- } catch (IOException ex ) {
371
+ }
372
+ catch (IOException ex ) {
377
373
throw new MojoExecutionException ("Unable to build classpath" , ex );
378
374
}
379
375
}
0 commit comments