1 package org.apache.maven.execution;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.File;
23 import java.util.Date;
24 import java.util.List;
25 import java.util.Map;
26 import java.util.Properties;
27
28 import org.apache.maven.artifact.repository.ArtifactRepository;
29 import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
30 import org.apache.maven.eventspy.internal.EventSpyDispatcher;
31 import org.apache.maven.model.Profile;
32 import org.apache.maven.project.ProjectBuildingRequest;
33
34
35
36 import org.apache.maven.settings.Mirror;
37 import org.apache.maven.settings.Proxy;
38 import org.apache.maven.settings.Server;
39
40 import org.apache.maven.toolchain.model.ToolchainModel;
41 import org.codehaus.plexus.logging.Logger;
42 import org.eclipse.aether.RepositoryCache;
43 import org.eclipse.aether.repository.WorkspaceReader;
44 import org.eclipse.aether.transfer.TransferListener;
45
46
47
48
49 public interface MavenExecutionRequest
50 {
51
52
53
54
55 int LOGGING_LEVEL_DEBUG = Logger.LEVEL_DEBUG;
56
57 int LOGGING_LEVEL_INFO = Logger.LEVEL_INFO;
58
59 int LOGGING_LEVEL_WARN = Logger.LEVEL_WARN;
60
61 int LOGGING_LEVEL_ERROR = Logger.LEVEL_ERROR;
62
63 int LOGGING_LEVEL_FATAL = Logger.LEVEL_FATAL;
64
65 int LOGGING_LEVEL_DISABLED = Logger.LEVEL_DISABLED;
66
67
68
69
70
71 String REACTOR_FAIL_FAST = "FAIL_FAST";
72
73 String REACTOR_FAIL_AT_END = "FAIL_AT_END";
74
75 String REACTOR_FAIL_NEVER = "FAIL_NEVER";
76
77
78
79
80
81 String REACTOR_MAKE_UPSTREAM = "make-upstream";
82
83 String REACTOR_MAKE_DOWNSTREAM = "make-downstream";
84
85 String REACTOR_MAKE_BOTH = "make-both";
86
87
88
89
90
91 String CHECKSUM_POLICY_FAIL = ArtifactRepositoryPolicy.CHECKSUM_POLICY_FAIL;
92
93 String CHECKSUM_POLICY_WARN = ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN;
94
95
96
97
98
99
100 MavenExecutionRequest setBaseDirectory( File basedir );
101
102 String getBaseDirectory();
103
104
105 MavenExecutionRequest setStartTime( Date start );
106
107 Date getStartTime();
108
109
110 MavenExecutionRequest setGoals( List<String> goals );
111
112 List<String> getGoals();
113
114
115
116
117
118
119
120
121
122
123 MavenExecutionRequest setSystemProperties( Properties systemProperties );
124
125
126
127
128
129
130
131 Properties getSystemProperties();
132
133
134
135
136
137
138
139
140
141 MavenExecutionRequest setUserProperties( Properties userProperties );
142
143
144
145
146
147
148
149
150 Properties getUserProperties();
151
152
153 MavenExecutionRequest setReactorFailureBehavior( String failureBehavior );
154
155 String getReactorFailureBehavior();
156
157
158
159
160 @Deprecated
161 MavenExecutionRequest setSelectedProjects( List<String> projects );
162
163
164
165
166 @Deprecated
167 List<String> getSelectedProjects();
168
169
170
171
172
173
174
175 @Deprecated
176 MavenExecutionRequest setExcludedProjects( List<String> projects );
177
178
179
180
181
182
183 @Deprecated
184 List<String> getExcludedProjects();
185
186
187
188
189
190
191 MavenExecutionRequest setResume( boolean resume );
192
193
194
195
196 boolean isResume();
197
198 MavenExecutionRequest setResumeFrom( String project );
199
200 String getResumeFrom();
201
202 MavenExecutionRequest setMakeBehavior( String makeBehavior );
203
204 String getMakeBehavior();
205
206
207
208
209
210
211 void setDegreeOfConcurrency( int degreeOfConcurrency );
212
213
214
215
216 int getDegreeOfConcurrency();
217
218
219 MavenExecutionRequest setRecursive( boolean recursive );
220
221 boolean isRecursive();
222
223 MavenExecutionRequest setPom( File pom );
224
225 File getPom();
226
227
228 MavenExecutionRequest setShowErrors( boolean showErrors );
229
230 boolean isShowErrors();
231
232
233 MavenExecutionRequest setTransferListener( TransferListener transferListener );
234
235 TransferListener getTransferListener();
236
237
238 MavenExecutionRequest setLoggingLevel( int loggingLevel );
239
240 int getLoggingLevel();
241
242
243 MavenExecutionRequest setUpdateSnapshots( boolean updateSnapshots );
244
245 boolean isUpdateSnapshots();
246
247 MavenExecutionRequest setNoSnapshotUpdates( boolean noSnapshotUpdates );
248
249 boolean isNoSnapshotUpdates();
250
251
252 MavenExecutionRequest setGlobalChecksumPolicy( String globalChecksumPolicy );
253
254 String getGlobalChecksumPolicy();
255
256
257 MavenExecutionRequest setLocalRepositoryPath( String localRepository );
258
259 MavenExecutionRequest setLocalRepositoryPath( File localRepository );
260
261 File getLocalRepositoryPath();
262
263 MavenExecutionRequest setLocalRepository( ArtifactRepository repository );
264
265 ArtifactRepository getLocalRepository();
266
267
268 MavenExecutionRequest setInteractiveMode( boolean interactive );
269
270 boolean isInteractiveMode();
271
272
273 MavenExecutionRequest setOffline( boolean offline );
274
275 boolean isOffline();
276
277 boolean isCacheTransferError();
278
279 MavenExecutionRequest setCacheTransferError( boolean cacheTransferError );
280
281 boolean isCacheNotFound();
282
283 MavenExecutionRequest setCacheNotFound( boolean cacheNotFound );
284
285
286 List<Profile> getProfiles();
287
288 MavenExecutionRequest addProfile( Profile profile );
289
290 MavenExecutionRequest setProfiles( List<Profile> profiles );
291
292
293
294
295 @Deprecated
296 MavenExecutionRequest addActiveProfile( String profile );
297
298
299
300
301 @Deprecated
302 MavenExecutionRequest addActiveProfiles( List<String> profiles );
303
304
305
306
307 @Deprecated
308 MavenExecutionRequest setActiveProfiles( List<String> profiles );
309
310
311
312
313
314 @Deprecated
315 List<String> getActiveProfiles();
316
317
318
319
320 @Deprecated
321 MavenExecutionRequest addInactiveProfile( String profile );
322
323
324
325
326 @Deprecated
327 MavenExecutionRequest addInactiveProfiles( List<String> profiles );
328
329
330
331
332 @Deprecated
333 MavenExecutionRequest setInactiveProfiles( List<String> profiles );
334
335
336
337
338
339 @Deprecated
340 List<String> getInactiveProfiles();
341
342
343
344
345
346 ProjectActivation getProjectActivation();
347
348
349
350
351
352 ProfileActivation getProfileActivation();
353
354
355 List<Proxy> getProxies();
356
357 MavenExecutionRequest setProxies( List<Proxy> proxies );
358
359 MavenExecutionRequest addProxy( Proxy proxy );
360
361
362 List<Server> getServers();
363
364 MavenExecutionRequest setServers( List<Server> servers );
365
366 MavenExecutionRequest addServer( Server server );
367
368
369 List<Mirror> getMirrors();
370
371 MavenExecutionRequest setMirrors( List<Mirror> mirrors );
372
373 MavenExecutionRequest addMirror( Mirror mirror );
374
375
376 List<String> getPluginGroups();
377
378 MavenExecutionRequest setPluginGroups( List<String> pluginGroups );
379
380 MavenExecutionRequest addPluginGroup( String pluginGroup );
381
382 MavenExecutionRequest addPluginGroups( List<String> pluginGroups );
383
384 boolean isProjectPresent();
385
386 MavenExecutionRequest setProjectPresent( boolean isProjectPresent );
387
388 File getUserSettingsFile();
389
390 MavenExecutionRequest setUserSettingsFile( File userSettingsFile );
391
392 File getGlobalSettingsFile();
393
394 MavenExecutionRequest setGlobalSettingsFile( File globalSettingsFile );
395
396 MavenExecutionRequest addRemoteRepository( ArtifactRepository repository );
397
398 MavenExecutionRequest addPluginArtifactRepository( ArtifactRepository repository );
399
400
401
402
403
404
405
406
407
408 MavenExecutionRequest setRemoteRepositories( List<ArtifactRepository> repositories );
409
410 List<ArtifactRepository> getRemoteRepositories();
411
412 MavenExecutionRequest setPluginArtifactRepositories( List<ArtifactRepository> repositories );
413
414 List<ArtifactRepository> getPluginArtifactRepositories();
415
416 MavenExecutionRequest setRepositoryCache( RepositoryCache repositoryCache );
417
418 RepositoryCache getRepositoryCache();
419
420 WorkspaceReader getWorkspaceReader();
421
422 MavenExecutionRequest setWorkspaceReader( WorkspaceReader workspaceReader );
423
424 File getUserToolchainsFile();
425
426 MavenExecutionRequest setUserToolchainsFile( File userToolchainsFile );
427
428
429
430
431
432
433
434 File getGlobalToolchainsFile();
435
436
437
438
439
440
441
442 MavenExecutionRequest setGlobalToolchainsFile( File globalToolchainsFile );
443
444 ExecutionListener getExecutionListener();
445
446 MavenExecutionRequest setExecutionListener( ExecutionListener executionListener );
447
448 ProjectBuildingRequest getProjectBuildingRequest();
449
450
451
452
453 boolean isUseLegacyLocalRepository();
454
455
456
457
458 MavenExecutionRequest setUseLegacyLocalRepository( boolean useLegacyLocalRepository );
459
460
461
462
463
464
465
466 MavenExecutionRequest setBuilderId( String builderId );
467
468
469
470
471
472
473
474 String getBuilderId();
475
476
477
478
479
480
481
482 MavenExecutionRequest setToolchains( Map<String, List<ToolchainModel>> toolchains );
483
484
485
486
487
488
489 Map<String, List<ToolchainModel>> getToolchains();
490
491
492
493
494 void setMultiModuleProjectDirectory( File file );
495
496
497
498
499 File getMultiModuleProjectDirectory();
500
501
502
503
504 MavenExecutionRequest setEventSpyDispatcher( EventSpyDispatcher eventSpyDispatcher );
505
506
507
508
509 EventSpyDispatcher getEventSpyDispatcher();
510
511
512
513
514 Map<String, Object> getData();
515 }