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.Properties;
26
27 import org.apache.maven.artifact.repository.ArtifactRepository;
28 import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
29 import org.apache.maven.model.Profile;
30 import org.apache.maven.project.ProjectBuildingRequest;
31 import org.apache.maven.settings.Mirror;
32 import org.apache.maven.settings.Proxy;
33 import org.apache.maven.settings.Server;
34 import org.codehaus.plexus.logging.Logger;
35 import org.sonatype.aether.RepositoryCache;
36 import org.sonatype.aether.repository.WorkspaceReader;
37 import org.sonatype.aether.transfer.TransferListener;
38
39
40
41
42
43 public interface MavenExecutionRequest
44 {
45
46
47
48
49 final int LOGGING_LEVEL_DEBUG = Logger.LEVEL_DEBUG;
50
51 final int LOGGING_LEVEL_INFO = Logger.LEVEL_INFO;
52
53 final int LOGGING_LEVEL_WARN = Logger.LEVEL_WARN;
54
55 final int LOGGING_LEVEL_ERROR = Logger.LEVEL_ERROR;
56
57 final int LOGGING_LEVEL_FATAL = Logger.LEVEL_FATAL;
58
59 final int LOGGING_LEVEL_DISABLED = Logger.LEVEL_DISABLED;
60
61
62
63
64
65 final String REACTOR_FAIL_FAST = "FAIL_FAST";
66
67 final String REACTOR_FAIL_AT_END = "FAIL_AT_END";
68
69 final String REACTOR_FAIL_NEVER = "FAIL_NEVER";
70
71
72
73
74
75 final String REACTOR_MAKE_UPSTREAM = "make-upstream";
76
77 final String REACTOR_MAKE_DOWNSTREAM = "make-downstream";
78
79 final String REACTOR_MAKE_BOTH = "make-both";
80
81
82
83
84
85 final String CHECKSUM_POLICY_FAIL = ArtifactRepositoryPolicy.CHECKSUM_POLICY_FAIL;
86
87 final String CHECKSUM_POLICY_WARN = ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN;
88
89
90
91
92
93
94 MavenExecutionRequest setBaseDirectory( File basedir );
95 String getBaseDirectory();
96
97
98 MavenExecutionRequest setStartTime( Date start );
99 Date getStartTime();
100
101
102 MavenExecutionRequest setGoals( List<String> goals );
103 List<String> getGoals();
104
105
106
107
108
109
110
111
112
113
114 MavenExecutionRequest setSystemProperties( Properties systemProperties );
115
116
117
118
119
120
121
122 Properties getSystemProperties();
123
124
125
126
127
128
129
130
131
132 MavenExecutionRequest setUserProperties( Properties userProperties );
133
134
135
136
137
138
139
140
141 Properties getUserProperties();
142
143
144 MavenExecutionRequest setReactorFailureBehavior( String failureBehavior );
145 String getReactorFailureBehavior();
146
147 MavenExecutionRequest setSelectedProjects( List<String> projects );
148 List<String> getSelectedProjects();
149
150 MavenExecutionRequest setResumeFrom( String project );
151 String getResumeFrom();
152
153 MavenExecutionRequest setMakeBehavior( String makeBehavior );
154 String getMakeBehavior();
155
156 void setThreadCount( String threadCount );
157 String getThreadCount();
158 boolean isThreadConfigurationPresent();
159 void setPerCoreThreadCount( boolean perCoreThreadCount );
160 boolean isPerCoreThreadCount();
161
162
163 MavenExecutionRequest setRecursive( boolean recursive );
164 boolean isRecursive();
165
166 MavenExecutionRequest setPom( File pom );
167 File getPom();
168
169
170 MavenExecutionRequest setShowErrors( boolean showErrors );
171 boolean isShowErrors();
172
173
174 MavenExecutionRequest setTransferListener( TransferListener transferListener );
175 TransferListener getTransferListener();
176
177
178 MavenExecutionRequest setLoggingLevel( int loggingLevel );
179 int getLoggingLevel();
180
181
182 MavenExecutionRequest setUpdateSnapshots( boolean updateSnapshots );
183 boolean isUpdateSnapshots();
184
185 MavenExecutionRequest setNoSnapshotUpdates( boolean noSnapshotUpdates );
186 boolean isNoSnapshotUpdates();
187
188
189 MavenExecutionRequest setGlobalChecksumPolicy( String globalChecksumPolicy );
190 String getGlobalChecksumPolicy();
191
192
193 MavenExecutionRequest setLocalRepositoryPath( String localRepository );
194 MavenExecutionRequest setLocalRepositoryPath( File localRepository );
195 File getLocalRepositoryPath();
196 MavenExecutionRequest setLocalRepository( ArtifactRepository repository );
197 ArtifactRepository getLocalRepository();
198
199
200 MavenExecutionRequest setInteractiveMode( boolean interactive );
201 boolean isInteractiveMode();
202
203
204 MavenExecutionRequest setOffline( boolean offline );
205 boolean isOffline();
206
207 boolean isCacheTransferError();
208 MavenExecutionRequest setCacheTransferError( boolean cacheTransferError );
209
210 boolean isCacheNotFound();
211 MavenExecutionRequest setCacheNotFound( boolean cacheNotFound );
212
213
214 List<Profile> getProfiles();
215 MavenExecutionRequest addProfile( Profile profile );
216 MavenExecutionRequest setProfiles( List<Profile> profiles );
217 MavenExecutionRequest addActiveProfile( String profile );
218 MavenExecutionRequest addActiveProfiles( List<String> profiles );
219 MavenExecutionRequest setActiveProfiles( List<String> profiles );
220 List<String> getActiveProfiles();
221 MavenExecutionRequest addInactiveProfile( String profile );
222 MavenExecutionRequest addInactiveProfiles( List<String> profiles );
223 MavenExecutionRequest setInactiveProfiles( List<String> profiles );
224 List<String> getInactiveProfiles();
225
226
227 List<Proxy> getProxies();
228 MavenExecutionRequest setProxies( List<Proxy> proxies );
229 MavenExecutionRequest addProxy( Proxy proxy );
230
231
232 List<Server> getServers();
233 MavenExecutionRequest setServers( List<Server> servers );
234 MavenExecutionRequest addServer( Server server );
235
236
237 List<Mirror> getMirrors();
238 MavenExecutionRequest setMirrors( List<Mirror> mirrors );
239 MavenExecutionRequest addMirror( Mirror mirror );
240
241
242 List<String> getPluginGroups();
243 MavenExecutionRequest setPluginGroups( List<String> pluginGroups );
244 MavenExecutionRequest addPluginGroup( String pluginGroup );
245 MavenExecutionRequest addPluginGroups( List<String> pluginGroups );
246
247 boolean isProjectPresent();
248 MavenExecutionRequest setProjectPresent( boolean isProjectPresent );
249
250 File getUserSettingsFile();
251 MavenExecutionRequest setUserSettingsFile( File userSettingsFile );
252
253 File getGlobalSettingsFile();
254 MavenExecutionRequest setGlobalSettingsFile( File globalSettingsFile );
255
256 MavenExecutionRequest addRemoteRepository( ArtifactRepository repository );
257 MavenExecutionRequest addPluginArtifactRepository( ArtifactRepository repository );
258
259
260
261
262
263
264
265
266
267 MavenExecutionRequest setRemoteRepositories( List<ArtifactRepository> repositories );
268 List<ArtifactRepository> getRemoteRepositories();
269
270 MavenExecutionRequest setPluginArtifactRepositories( List<ArtifactRepository> repositories );
271 List<ArtifactRepository> getPluginArtifactRepositories();
272
273 MavenExecutionRequest setRepositoryCache( RepositoryCache repositoryCache );
274 RepositoryCache getRepositoryCache();
275
276 WorkspaceReader getWorkspaceReader();
277 MavenExecutionRequest setWorkspaceReader( WorkspaceReader workspaceReader );
278
279 File getUserToolchainsFile();
280 MavenExecutionRequest setUserToolchainsFile( File userToolchainsFile );
281
282 ExecutionListener getExecutionListener();
283 MavenExecutionRequest setExecutionListener( ExecutionListener executionListener );
284
285 ProjectBuildingRequest getProjectBuildingRequest();
286
287 }