Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Mojo |
|
| 1.0588235294117647;1,059 |
1 | /* | |
2 | =================== DO NOT EDIT THIS FILE ==================== | |
3 | Generated by Modello 1.4.1 on 2012-05-28 13:23:01, | |
4 | any modifications will be overwritten. | |
5 | ============================================================== | |
6 | */ | |
7 | ||
8 | package org.apache.maven.plugin.tools.model; | |
9 | ||
10 | /** | |
11 | * Mojo descriptor definition. | |
12 | * | |
13 | * @version $Revision$ $Date$ | |
14 | */ | |
15 | @SuppressWarnings( "all" ) | |
16 | 2 | public class Mojo |
17 | implements java.io.Serializable | |
18 | { | |
19 | ||
20 | //--------------------------/ | |
21 | //- Class/Member Variables -/ | |
22 | //--------------------------/ | |
23 | ||
24 | /** | |
25 | * The name of the goal used to invoke this mojo. | |
26 | */ | |
27 | private String goal; | |
28 | ||
29 | /** | |
30 | * The phase to which this mojo should be bound by default. | |
31 | */ | |
32 | private String phase; | |
33 | ||
34 | /** | |
35 | * Whether this mojo operates as an aggregator when the reactor | |
36 | * is run. That is, only runs once. | |
37 | * | |
38 | */ | |
39 | 2 | private boolean aggregator = false; |
40 | ||
41 | /** | |
42 | * The scope of dependencies that this mojo requires to have | |
43 | * resolved. | |
44 | */ | |
45 | private String requiresDependencyResolution; | |
46 | ||
47 | /** | |
48 | * Whether this mojo requires a project instance in order to | |
49 | * execute. | |
50 | */ | |
51 | 2 | private boolean requiresProject = false; |
52 | ||
53 | /** | |
54 | * Whether this mojo requires a reports section in the POM. | |
55 | */ | |
56 | 2 | private boolean requiresReports = false; |
57 | ||
58 | /** | |
59 | * Whether this mojo requires online mode to operate normally. | |
60 | */ | |
61 | 2 | private boolean requiresOnline = false; |
62 | ||
63 | /** | |
64 | * Whether this mojo's configuration should propagate down the | |
65 | * POM inheritance chain by default. | |
66 | * | |
67 | */ | |
68 | 2 | private boolean inheritByDefault = false; |
69 | ||
70 | /** | |
71 | * If true, this mojo can only be directly invoked (eg. | |
72 | * specified directly on the command line). | |
73 | * | |
74 | */ | |
75 | 2 | private boolean requiresDirectInvocation = false; |
76 | ||
77 | /** | |
78 | * Information about a sub-execution of the Maven lifecycle | |
79 | * which should be processed. | |
80 | */ | |
81 | private LifecycleExecution execution; | |
82 | ||
83 | /** | |
84 | * Field components. | |
85 | */ | |
86 | private java.util.List<Component> components; | |
87 | ||
88 | /** | |
89 | * Field parameters. | |
90 | */ | |
91 | private java.util.List<Parameter> parameters; | |
92 | ||
93 | /** | |
94 | * The description for this parameter. | |
95 | */ | |
96 | private String description; | |
97 | ||
98 | /** | |
99 | * A deprecation message for this mojo parameter. | |
100 | */ | |
101 | private String deprecation; | |
102 | ||
103 | /** | |
104 | * The target/method within the script to call when this mojo | |
105 | * executes. | |
106 | */ | |
107 | private String call; | |
108 | ||
109 | ||
110 | //-----------/ | |
111 | //- Methods -/ | |
112 | //-----------/ | |
113 | ||
114 | /** | |
115 | * Method addComponent. | |
116 | * | |
117 | * @param component | |
118 | */ | |
119 | public void addComponent( Component component ) | |
120 | { | |
121 | 0 | getComponents().add( component ); |
122 | 0 | } //-- void addComponent( Component ) |
123 | ||
124 | /** | |
125 | * Method addParameter. | |
126 | * | |
127 | * @param parameter | |
128 | */ | |
129 | public void addParameter( Parameter parameter ) | |
130 | { | |
131 | 0 | getParameters().add( parameter ); |
132 | 0 | } //-- void addParameter( Parameter ) |
133 | ||
134 | /** | |
135 | * Get the target/method within the script to call when this | |
136 | * mojo executes. | |
137 | * | |
138 | * @return String | |
139 | */ | |
140 | public String getCall() | |
141 | { | |
142 | 3 | return this.call; |
143 | } //-- String getCall() | |
144 | ||
145 | /** | |
146 | * Method getComponents. | |
147 | * | |
148 | * @return List | |
149 | */ | |
150 | public java.util.List<Component> getComponents() | |
151 | { | |
152 | 2 | if ( this.components == null ) |
153 | { | |
154 | 2 | this.components = new java.util.ArrayList<Component>(); |
155 | } | |
156 | ||
157 | 2 | return this.components; |
158 | } //-- java.util.List<Component> getComponents() | |
159 | ||
160 | /** | |
161 | * Get a deprecation message for this mojo parameter. | |
162 | * | |
163 | * @return String | |
164 | */ | |
165 | public String getDeprecation() | |
166 | { | |
167 | 2 | return this.deprecation; |
168 | } //-- String getDeprecation() | |
169 | ||
170 | /** | |
171 | * Get the description for this parameter. | |
172 | * | |
173 | * @return String | |
174 | */ | |
175 | public String getDescription() | |
176 | { | |
177 | 2 | return this.description; |
178 | } //-- String getDescription() | |
179 | ||
180 | /** | |
181 | * Get information about a sub-execution of the Maven lifecycle | |
182 | * which should be processed. | |
183 | * | |
184 | * @return LifecycleExecution | |
185 | */ | |
186 | public LifecycleExecution getExecution() | |
187 | { | |
188 | 2 | return this.execution; |
189 | } //-- LifecycleExecution getExecution() | |
190 | ||
191 | /** | |
192 | * Get the name of the goal used to invoke this mojo. | |
193 | * | |
194 | * @return String | |
195 | */ | |
196 | public String getGoal() | |
197 | { | |
198 | 2 | return this.goal; |
199 | } //-- String getGoal() | |
200 | ||
201 | /** | |
202 | * Method getParameters. | |
203 | * | |
204 | * @return List | |
205 | */ | |
206 | public java.util.List<Parameter> getParameters() | |
207 | { | |
208 | 2 | if ( this.parameters == null ) |
209 | { | |
210 | 0 | this.parameters = new java.util.ArrayList<Parameter>(); |
211 | } | |
212 | ||
213 | 2 | return this.parameters; |
214 | } //-- java.util.List<Parameter> getParameters() | |
215 | ||
216 | /** | |
217 | * Get the phase to which this mojo should be bound by default. | |
218 | * | |
219 | * @return String | |
220 | */ | |
221 | public String getPhase() | |
222 | { | |
223 | 2 | return this.phase; |
224 | } //-- String getPhase() | |
225 | ||
226 | /** | |
227 | * Get the scope of dependencies that this mojo requires to | |
228 | * have resolved. | |
229 | * | |
230 | * @return String | |
231 | */ | |
232 | public String getRequiresDependencyResolution() | |
233 | { | |
234 | 2 | return this.requiresDependencyResolution; |
235 | } //-- String getRequiresDependencyResolution() | |
236 | ||
237 | /** | |
238 | * Get whether this mojo operates as an aggregator when the | |
239 | * reactor is run. That is, only runs once. | |
240 | * | |
241 | * @return boolean | |
242 | */ | |
243 | public boolean isAggregator() | |
244 | { | |
245 | 2 | return this.aggregator; |
246 | } //-- boolean isAggregator() | |
247 | ||
248 | /** | |
249 | * Get whether this mojo's configuration should propagate down | |
250 | * the POM inheritance chain by default. | |
251 | * | |
252 | * @return boolean | |
253 | */ | |
254 | public boolean isInheritByDefault() | |
255 | { | |
256 | 2 | return this.inheritByDefault; |
257 | } //-- boolean isInheritByDefault() | |
258 | ||
259 | /** | |
260 | * Get if true, this mojo can only be directly invoked (eg. | |
261 | * specified directly on the command line). | |
262 | * | |
263 | * @return boolean | |
264 | */ | |
265 | public boolean isRequiresDirectInvocation() | |
266 | { | |
267 | 2 | return this.requiresDirectInvocation; |
268 | } //-- boolean isRequiresDirectInvocation() | |
269 | ||
270 | /** | |
271 | * Get whether this mojo requires online mode to operate | |
272 | * normally. | |
273 | * | |
274 | * @return boolean | |
275 | */ | |
276 | public boolean isRequiresOnline() | |
277 | { | |
278 | 2 | return this.requiresOnline; |
279 | } //-- boolean isRequiresOnline() | |
280 | ||
281 | /** | |
282 | * Get whether this mojo requires a project instance in order | |
283 | * to execute. | |
284 | * | |
285 | * @return boolean | |
286 | */ | |
287 | public boolean isRequiresProject() | |
288 | { | |
289 | 2 | return this.requiresProject; |
290 | } //-- boolean isRequiresProject() | |
291 | ||
292 | /** | |
293 | * Get whether this mojo requires a reports section in the POM. | |
294 | * | |
295 | * @return boolean | |
296 | */ | |
297 | public boolean isRequiresReports() | |
298 | { | |
299 | 2 | return this.requiresReports; |
300 | } //-- boolean isRequiresReports() | |
301 | ||
302 | /** | |
303 | * Method removeComponent. | |
304 | * | |
305 | * @param component | |
306 | */ | |
307 | public void removeComponent( Component component ) | |
308 | { | |
309 | 0 | getComponents().remove( component ); |
310 | 0 | } //-- void removeComponent( Component ) |
311 | ||
312 | /** | |
313 | * Method removeParameter. | |
314 | * | |
315 | * @param parameter | |
316 | */ | |
317 | public void removeParameter( Parameter parameter ) | |
318 | { | |
319 | 0 | getParameters().remove( parameter ); |
320 | 0 | } //-- void removeParameter( Parameter ) |
321 | ||
322 | /** | |
323 | * Set whether this mojo operates as an aggregator when the | |
324 | * reactor is run. That is, only runs once. | |
325 | * | |
326 | * @param aggregator | |
327 | */ | |
328 | public void setAggregator( boolean aggregator ) | |
329 | { | |
330 | 0 | this.aggregator = aggregator; |
331 | 0 | } //-- void setAggregator( boolean ) |
332 | ||
333 | /** | |
334 | * Set the target/method within the script to call when this | |
335 | * mojo executes. | |
336 | * | |
337 | * @param call | |
338 | */ | |
339 | public void setCall( String call ) | |
340 | { | |
341 | 1 | this.call = call; |
342 | 1 | } //-- void setCall( String ) |
343 | ||
344 | /** | |
345 | * Set list of plexus components required by this mojo. | |
346 | * | |
347 | * @param components | |
348 | */ | |
349 | public void setComponents( java.util.List<Component> components ) | |
350 | { | |
351 | 0 | this.components = components; |
352 | 0 | } //-- void setComponents( java.util.List ) |
353 | ||
354 | /** | |
355 | * Set a deprecation message for this mojo parameter. | |
356 | * | |
357 | * @param deprecation | |
358 | */ | |
359 | public void setDeprecation( String deprecation ) | |
360 | { | |
361 | 0 | this.deprecation = deprecation; |
362 | 0 | } //-- void setDeprecation( String ) |
363 | ||
364 | /** | |
365 | * Set the description for this parameter. | |
366 | * | |
367 | * @param description | |
368 | */ | |
369 | public void setDescription( String description ) | |
370 | { | |
371 | 2 | this.description = description; |
372 | 2 | } //-- void setDescription( String ) |
373 | ||
374 | /** | |
375 | * Set information about a sub-execution of the Maven lifecycle | |
376 | * which should be processed. | |
377 | * | |
378 | * @param execution | |
379 | */ | |
380 | public void setExecution( LifecycleExecution execution ) | |
381 | { | |
382 | 0 | this.execution = execution; |
383 | 0 | } //-- void setExecution( LifecycleExecution ) |
384 | ||
385 | /** | |
386 | * Set the name of the goal used to invoke this mojo. | |
387 | * | |
388 | * @param goal | |
389 | */ | |
390 | public void setGoal( String goal ) | |
391 | { | |
392 | 2 | this.goal = goal; |
393 | 2 | } //-- void setGoal( String ) |
394 | ||
395 | /** | |
396 | * Set whether this mojo's configuration should propagate down | |
397 | * the POM inheritance chain by default. | |
398 | * | |
399 | * @param inheritByDefault | |
400 | */ | |
401 | public void setInheritByDefault( boolean inheritByDefault ) | |
402 | { | |
403 | 0 | this.inheritByDefault = inheritByDefault; |
404 | 0 | } //-- void setInheritByDefault( boolean ) |
405 | ||
406 | /** | |
407 | * Set list of parameters used by this mojo. | |
408 | * | |
409 | * @param parameters | |
410 | */ | |
411 | public void setParameters( java.util.List<Parameter> parameters ) | |
412 | { | |
413 | 2 | this.parameters = parameters; |
414 | 2 | } //-- void setParameters( java.util.List ) |
415 | ||
416 | /** | |
417 | * Set the phase to which this mojo should be bound by default. | |
418 | * | |
419 | * @param phase | |
420 | */ | |
421 | public void setPhase( String phase ) | |
422 | { | |
423 | 0 | this.phase = phase; |
424 | 0 | } //-- void setPhase( String ) |
425 | ||
426 | /** | |
427 | * Set the scope of dependencies that this mojo requires to | |
428 | * have resolved. | |
429 | * | |
430 | * @param requiresDependencyResolution | |
431 | */ | |
432 | public void setRequiresDependencyResolution( String requiresDependencyResolution ) | |
433 | { | |
434 | 0 | this.requiresDependencyResolution = requiresDependencyResolution; |
435 | 0 | } //-- void setRequiresDependencyResolution( String ) |
436 | ||
437 | /** | |
438 | * Set if true, this mojo can only be directly invoked (eg. | |
439 | * specified directly on the command line). | |
440 | * | |
441 | * @param requiresDirectInvocation | |
442 | */ | |
443 | public void setRequiresDirectInvocation( boolean requiresDirectInvocation ) | |
444 | { | |
445 | 0 | this.requiresDirectInvocation = requiresDirectInvocation; |
446 | 0 | } //-- void setRequiresDirectInvocation( boolean ) |
447 | ||
448 | /** | |
449 | * Set whether this mojo requires online mode to operate | |
450 | * normally. | |
451 | * | |
452 | * @param requiresOnline | |
453 | */ | |
454 | public void setRequiresOnline( boolean requiresOnline ) | |
455 | { | |
456 | 0 | this.requiresOnline = requiresOnline; |
457 | 0 | } //-- void setRequiresOnline( boolean ) |
458 | ||
459 | /** | |
460 | * Set whether this mojo requires a project instance in order | |
461 | * to execute. | |
462 | * | |
463 | * @param requiresProject | |
464 | */ | |
465 | public void setRequiresProject( boolean requiresProject ) | |
466 | { | |
467 | 0 | this.requiresProject = requiresProject; |
468 | 0 | } //-- void setRequiresProject( boolean ) |
469 | ||
470 | /** | |
471 | * Set whether this mojo requires a reports section in the POM. | |
472 | * | |
473 | * @param requiresReports | |
474 | */ | |
475 | public void setRequiresReports( boolean requiresReports ) | |
476 | { | |
477 | 0 | this.requiresReports = requiresReports; |
478 | 0 | } //-- void setRequiresReports( boolean ) |
479 | ||
480 | } |