1
2
3
4
5
6
7
8 package org.apache.maven.model;
9
10
11
12
13
14
15
16
17
18
19
20 public class ModelBase
21 implements java.io.Serializable
22 {
23
24
25
26
27
28
29
30
31
32
33
34 private DistributionManagement distributionManagement;
35
36
37
38
39 private java.util.List<String> modules;
40
41
42
43
44 private java.util.List<Repository> repositories;
45
46
47
48
49 private java.util.List<Repository> pluginRepositories;
50
51
52
53
54 private java.util.List<Dependency> dependencies;
55
56
57
58
59
60
61
62
63 private Object reports;
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79 private Reporting reporting;
80
81
82
83
84
85
86
87
88
89
90
91
92 private DependencyManagement dependencyManagement;
93
94
95
96
97 private java.util.Properties properties;
98
99
100
101
102
103
104
105
106
107
108
109 public void addDependency( Dependency dependency )
110 {
111 if ( !(dependency instanceof Dependency) )
112 {
113 throw new ClassCastException( "ModelBase.addDependencies(dependency) parameter must be instanceof " + Dependency.class.getName() );
114 }
115 getDependencies().add( dependency );
116 }
117
118
119
120
121
122
123 public void addModule( String string )
124 {
125 if ( !(string instanceof String) )
126 {
127 throw new ClassCastException( "ModelBase.addModules(string) parameter must be instanceof " + String.class.getName() );
128 }
129 getModules().add( string );
130 }
131
132
133
134
135
136
137 public void addPluginRepository( Repository repository )
138 {
139 if ( !(repository instanceof Repository) )
140 {
141 throw new ClassCastException( "ModelBase.addPluginRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
142 }
143 getPluginRepositories().add( repository );
144 }
145
146
147
148
149
150
151
152 public void addProperty( String key, String value )
153 {
154 getProperties().put( key, value );
155 }
156
157
158
159
160
161
162 public void addRepository( Repository repository )
163 {
164 if ( !(repository instanceof Repository) )
165 {
166 throw new ClassCastException( "ModelBase.addRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
167 }
168 getRepositories().add( repository );
169 }
170
171
172
173
174
175
176 public java.util.List<Dependency> getDependencies()
177 {
178 if ( this.dependencies == null )
179 {
180 this.dependencies = new java.util.ArrayList<Dependency>();
181 }
182
183 return this.dependencies;
184 }
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199 public DependencyManagement getDependencyManagement()
200 {
201 return this.dependencyManagement;
202 }
203
204
205
206
207
208
209
210
211
212 public DistributionManagement getDistributionManagement()
213 {
214 return this.distributionManagement;
215 }
216
217
218
219
220
221
222 public java.util.List<String> getModules()
223 {
224 if ( this.modules == null )
225 {
226 this.modules = new java.util.ArrayList<String>();
227 }
228
229 return this.modules;
230 }
231
232
233
234
235
236
237 public java.util.List<Repository> getPluginRepositories()
238 {
239 if ( this.pluginRepositories == null )
240 {
241 this.pluginRepositories = new java.util.ArrayList<Repository>();
242 }
243
244 return this.pluginRepositories;
245 }
246
247
248
249
250
251
252 public java.util.Properties getProperties()
253 {
254 if ( this.properties == null )
255 {
256 this.properties = new java.util.Properties();
257 }
258
259 return this.properties;
260 }
261
262
263
264
265
266
267
268
269
270
271
272
273
274 public Reporting getReporting()
275 {
276 return this.reporting;
277 }
278
279
280
281
282
283
284 public Object getReports()
285 {
286 return this.reports;
287 }
288
289
290
291
292
293
294 public java.util.List<Repository> getRepositories()
295 {
296 if ( this.repositories == null )
297 {
298 this.repositories = new java.util.ArrayList<Repository>();
299 }
300
301 return this.repositories;
302 }
303
304
305
306
307
308
309 public void removeDependency( Dependency dependency )
310 {
311 if ( !(dependency instanceof Dependency) )
312 {
313 throw new ClassCastException( "ModelBase.removeDependencies(dependency) parameter must be instanceof " + Dependency.class.getName() );
314 }
315 getDependencies().remove( dependency );
316 }
317
318
319
320
321
322
323 public void removeModule( String string )
324 {
325 if ( !(string instanceof String) )
326 {
327 throw new ClassCastException( "ModelBase.removeModules(string) parameter must be instanceof " + String.class.getName() );
328 }
329 getModules().remove( string );
330 }
331
332
333
334
335
336
337 public void removePluginRepository( Repository repository )
338 {
339 if ( !(repository instanceof Repository) )
340 {
341 throw new ClassCastException( "ModelBase.removePluginRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
342 }
343 getPluginRepositories().remove( repository );
344 }
345
346
347
348
349
350
351 public void removeRepository( Repository repository )
352 {
353 if ( !(repository instanceof Repository) )
354 {
355 throw new ClassCastException( "ModelBase.removeRepositories(repository) parameter must be instanceof " + Repository.class.getName() );
356 }
357 getRepositories().remove( repository );
358 }
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375 public void setDependencies( java.util.List<Dependency> dependencies )
376 {
377 this.dependencies = dependencies;
378 }
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393 public void setDependencyManagement( DependencyManagement dependencyManagement )
394 {
395 this.dependencyManagement = dependencyManagement;
396 }
397
398
399
400
401
402
403
404
405
406 public void setDistributionManagement( DistributionManagement distributionManagement )
407 {
408 this.distributionManagement = distributionManagement;
409 }
410
411
412
413
414
415
416
417
418
419 public void setModules( java.util.List<String> modules )
420 {
421 this.modules = modules;
422 }
423
424
425
426
427
428
429
430
431 public void setPluginRepositories( java.util.List<Repository> pluginRepositories )
432 {
433 this.pluginRepositories = pluginRepositories;
434 }
435
436
437
438
439
440
441
442
443
444
445 public void setProperties( java.util.Properties properties )
446 {
447 this.properties = properties;
448 }
449
450
451
452
453
454
455
456
457
458
459
460
461
462 public void setReporting( Reporting reporting )
463 {
464 this.reporting = reporting;
465 }
466
467
468
469
470
471
472 public void setReports( Object reports )
473 {
474 this.reports = reports;
475 }
476
477
478
479
480
481
482
483
484 public void setRepositories( java.util.List<Repository> repositories )
485 {
486 this.repositories = repositories;
487 }
488
489
490 }