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 MavenExecutionRequest setSelectedProjects( List<String> projects );
158
159 List<String> getSelectedProjects();
160
161
162
163
164
165
166 MavenExecutionRequest setExcludedProjects( List<String> projects );
167
168
169
170
171
172 List<String> getExcludedProjects();
173
174 MavenExecutionRequest setResumeFrom( String project );
175
176 String getResumeFrom();
177
178 MavenExecutionRequest setMakeBehavior( String makeBehavior );
179
180 String getMakeBehavior();
181
182
183
184
185
186
187 void setDegreeOfConcurrency( int degreeOfConcurrency );
188
189
190
191
192 int getDegreeOfConcurrency();
193
194
195 MavenExecutionRequest setRecursive( boolean recursive );
196
197 boolean isRecursive();
198
199 MavenExecutionRequest setPom( File pom );
200
201 File getPom();
202
203
204 MavenExecutionRequest setShowErrors( boolean showErrors );
205
206 boolean isShowErrors();
207
208
209 MavenExecutionRequest setTransferListener( TransferListener transferListener );
210
211 TransferListener getTransferListener();
212
213
214 MavenExecutionRequest setLoggingLevel( int loggingLevel );
215
216 int getLoggingLevel();
217
218
219 MavenExecutionRequest setUpdateSnapshots( boolean updateSnapshots );
220
221 boolean isUpdateSnapshots();
222
223 MavenExecutionRequest setNoSnapshotUpdates( boolean noSnapshotUpdates );
224
225 boolean isNoSnapshotUpdates();
226
227
228 MavenExecutionRequest setGlobalChecksumPolicy( String globalChecksumPolicy );
229
230 String getGlobalChecksumPolicy();
231
232
233 MavenExecutionRequest setLocalRepositoryPath( String localRepository );
234
235 MavenExecutionRequest setLocalRepositoryPath( File localRepository );
236
237 File getLocalRepositoryPath();
238
239 MavenExecutionRequest setLocalRepository( ArtifactRepository repository );
240
241 ArtifactRepository getLocalRepository();
242
243
244 MavenExecutionRequest setInteractiveMode( boolean interactive );
245
246 boolean isInteractiveMode();
247
248
249 MavenExecutionRequest setOffline( boolean offline );
250
251 boolean isOffline();
252
253 boolean isCacheTransferError();
254
255 MavenExecutionRequest setCacheTransferError( boolean cacheTransferError );
256
257 boolean isCacheNotFound();
258
259 MavenExecutionRequest setCacheNotFound( boolean cacheNotFound );
260
261
262 List<Profile> getProfiles();
263
264 MavenExecutionRequest addProfile( Profile profile );
265
266 MavenExecutionRequest setProfiles( List<Profile> profiles );
267
268 MavenExecutionRequest addActiveProfile( String profile );
269
270 MavenExecutionRequest addActiveProfiles( List<String> profiles );
271
272 MavenExecutionRequest setActiveProfiles( List<String> profiles );
273
274 List<String> getActiveProfiles();
275
276 MavenExecutionRequest addInactiveProfile( String profile );
277
278 MavenExecutionRequest addInactiveProfiles( List<String> profiles );
279
280 MavenExecutionRequest setInactiveProfiles( List<String> profiles );
281
282 List<String> getInactiveProfiles();
283
284
285 List<Proxy> getProxies();
286
287 MavenExecutionRequest setProxies( List<Proxy> proxies );
288
289 MavenExecutionRequest addProxy( Proxy proxy );
290
291
292 List<Server> getServers();
293
294 MavenExecutionRequest setServers( List<Server> servers );
295
296 MavenExecutionRequest addServer( Server server );
297
298
299 List<Mirror> getMirrors();
300
301 MavenExecutionRequest setMirrors( List<Mirror> mirrors );
302
303 MavenExecutionRequest addMirror( Mirror mirror );
304
305
306 List<String> getPluginGroups();
307
308 MavenExecutionRequest setPluginGroups( List<String> pluginGroups );
309
310 MavenExecutionRequest addPluginGroup( String pluginGroup );
311
312 MavenExecutionRequest addPluginGroups( List<String> pluginGroups );
313
314 boolean isProjectPresent();
315
316 MavenExecutionRequest setProjectPresent( boolean isProjectPresent );
317
318 File getUserSettingsFile();
319
320 MavenExecutionRequest setUserSettingsFile( File userSettingsFile );
321
322 File getGlobalSettingsFile();
323
324 MavenExecutionRequest setGlobalSettingsFile( File globalSettingsFile );
325
326 MavenExecutionRequest addRemoteRepository( ArtifactRepository repository );
327
328 MavenExecutionRequest addPluginArtifactRepository( ArtifactRepository repository );
329
330
331
332
333
334
335
336
337
338 MavenExecutionRequest setRemoteRepositories( List<ArtifactRepository> repositories );
339
340 List<ArtifactRepository> getRemoteRepositories();
341
342 MavenExecutionRequest setPluginArtifactRepositories( List<ArtifactRepository> repositories );
343
344 List<ArtifactRepository> getPluginArtifactRepositories();
345
346 MavenExecutionRequest setRepositoryCache( RepositoryCache repositoryCache );
347
348 RepositoryCache getRepositoryCache();
349
350 WorkspaceReader getWorkspaceReader();
351
352 MavenExecutionRequest setWorkspaceReader( WorkspaceReader workspaceReader );
353
354 File getUserToolchainsFile();
355
356 MavenExecutionRequest setUserToolchainsFile( File userToolchainsFile );
357
358
359
360
361
362
363
364 File getGlobalToolchainsFile();
365
366
367
368
369
370
371
372 MavenExecutionRequest setGlobalToolchainsFile( File globalToolchainsFile );
373
374 ExecutionListener getExecutionListener();
375
376 MavenExecutionRequest setExecutionListener( ExecutionListener executionListener );
377
378 ProjectBuildingRequest getProjectBuildingRequest();
379
380
381
382
383 boolean isUseLegacyLocalRepository();
384
385
386
387
388 MavenExecutionRequest setUseLegacyLocalRepository( boolean useLegacyLocalRepository );
389
390
391
392
393
394
395
396 MavenExecutionRequest setBuilderId( String builderId );
397
398
399
400
401
402
403
404 String getBuilderId();
405
406
407
408
409
410
411
412 MavenExecutionRequest setToolchains( Map<String, List<ToolchainModel>> toolchains );
413
414
415
416
417
418
419 Map<String, List<ToolchainModel>> getToolchains();
420
421
422
423
424 void setMultiModuleProjectDirectory( File file );
425
426
427
428
429 File getMultiModuleProjectDirectory();
430
431
432
433
434 MavenExecutionRequest setEventSpyDispatcher( EventSpyDispatcher eventSpyDispatcher );
435
436
437
438
439 EventSpyDispatcher getEventSpyDispatcher();
440
441
442
443
444 Map<String, Object> getData();
445 }