View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.tools.plugin.extractor.javadoc;
20  
21  /**
22   * List of all Javadoc annotations used to describe a java Mojo.
23   *
24   * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
25   * @since 2.4
26   */
27  @SuppressWarnings("checkstyle:interfaceistype")
28  public interface JavadocMojoAnnotation {
29      // ----------------------------------------------------------------------
30      // Descriptor for type i.e. Mojo
31      // ----------------------------------------------------------------------
32  
33      /**
34       * <p>
35       * Flags this Mojo to run it in a multi module way, i.e. aggregate the build with the set of projects listed
36       * as modules.
37       * </p>
38       * <p>
39       * Refer to <code>&#64;aggregator</code>.
40       * </p>
41       * <p>
42       * <b>Note</b>: Should be defined in a Mojo Type.
43       * </p>
44       */
45      String AGGREGATOR = "aggregator";
46  
47      /**
48       * <p>
49       * The configurator type to use when injecting parameter values into this Mojo. The value is normally deduced
50       * from the Mojo's implementation language, but can be specified to allow a custom ComponentConfigurator
51       * implementation to be used.
52       * </p>
53       * <p>
54       * Refer to <code>&#64;configurator &lt;roleHint&gt;</code>.
55       * </p>
56       * <p>
57       * <b>Note</b>: Should be defined in a Mojo Type.
58       * </p>
59       */
60      String CONFIGURATOR = "configurator";
61  
62      /**
63       * <p>
64       * The description for the Mojo.
65       * </p>
66       * <p>
67       * Refer to <code>&#64;description</code>.
68       * </p>
69       * <p>
70       * <b>Note</b>: Should be defined in a Mojo Type.
71       * </p>
72       * <p>
73       * <b>Note</b>: Mojo's description is auto-detected.
74       * </p>
75       */
76      String DESCRIPTION = "description";
77  
78      /**
79       * <p>
80       * Refer to <code>&#64;execute ...</code>.
81       * </p>
82       * <p>
83       * <b>Note</b>: Should be defined in a Mojo Type.
84       * </p>
85       */
86      String EXECUTE = "execute";
87  
88      /**
89       * <p>
90       * The Mojo goal will be executed in isolation.
91       * </p>
92       * <p>
93       * Refer to <code>&#64;execute goal="&lt;goalName&gt;"</code>.
94       * </p>
95       * <p>
96       * <b>Note</b>: Should be defined in a Mojo Type.
97       * </p>
98       */
99      String EXECUTE_GOAL = "goal";
100 
101     /**
102      * <p>
103      * The Mojo will be invoked in a parallel lifecycle.
104      * </p>
105      * <p>
106      * Refer to <code>&#64;execute lifecycle="&lt;lifecycleId&gt;"</code>.
107      * </p>
108      * <p>
109      * <b>Note</b>: Should be defined in a Mojo Type.
110      * </p>
111      */
112     String EXECUTE_LIFECYCLE = "lifecycle";
113 
114     /**
115      * <p>
116      * The Mojo will be invoked in a parallel lifecycle, ending at the given phase.
117      * </p>
118      * <p>
119      * Refer to <code>&#64;execute phase="&lt;phaseName&gt;"</code>.
120      * </p>
121      * <p>
122      * Refer to <code>&#64;execute lifecycle="&lt;lifecycleId&gt;" phase="&lt;phaseName&gt;"</code>.
123      * </p>
124      * <p>
125      * <b>Note</b>: Should be defined in a Mojo Type.
126      * </p>
127      */
128     String EXECUTE_PHASE = "phase";
129 
130     /**
131      * <p>
132      * Refer to <code>&#64;executionStrategy &lt;strategy&gt;</code>.
133      * </p>
134      * <p>
135      * <b>Note</b>: Should be defined in a Mojo Type.
136      * </p>
137      */
138     String EXECUTION_STATEGY = "executionStrategy";
139 
140     /**
141      * <p>
142      * The name for the Mojo that users will reference to execute it.
143      * </p>
144      * <p>
145      * Refer to <code>&#64;goal &lt;goalName&gt;</code>.
146      * </p>
147      * <p>
148      * <b>Note</b>: Should be defined in a Mojo Type.
149      * </p>
150      */
151     String GOAL = "goal";
152 
153     /**
154      * <p>
155      * The Mojo's fully-qualified class name.
156      * </p>
157      * <p>
158      * Refer to <code>&#64;implementation</code>.
159      * </p>
160      * <p>
161      * <b>Note</b>: Should be defined in a Mojo Type.
162      * </p>
163      * <p>
164      * <b>Note</b>: Mojo's implementation is auto-detected.
165      * </p>
166      */
167     String IMPLEMENTATION = "implementation";
168 
169     /**
170      * <p>
171      * Allow Mojo inheritance.
172      * </p>
173      * <p>
174      * Refer to <code>&#64;inheritByDefault &lt;true|false&gt;</code>.
175      * </p>
176      * <p>
177      * <b>Note</b>: Should be defined in a Mojo Type.
178      * </p>
179      */
180     String INHERIT_BY_DEFAULT = "inheritByDefault";
181 
182     /**
183      * <p>
184      * Refer to <code>&#64;instantiationStrategy &lt;per-lookup&gt;</code>.
185      * </p>
186      * <p>
187      * <b>Note</b>: Should be defined in a Mojo Type.
188      * </p>
189      */
190     String INSTANTIATION_STRATEGY = "instantiationStrategy";
191 
192     /**
193      * <p>
194      * The implementation language for the Mojo.
195      * </p>
196      * <p>
197      * Refer to <code>&#64;language</code>.
198      * </p>
199      * <p>
200      * <b>Note</b>: Should be defined in a Mojo Type.
201      * </p>
202      * <p>
203      * <b>Note</b>: Mojo's implementation is auto-detected.
204      * </p>
205      */
206     String LANGUAGE = "language";
207 
208     /**
209      * <p>
210      * Specifies the execution strategy.
211      * </p>
212      * <p>
213      * Refer to <code>&#64;attainAlways</code>.
214      * </p>
215      * <p>
216      * <b>Note</b>: Should be defined in a Mojo Type.
217      * </p>
218      * @deprecated use <code>&#64;executionStrategy always</code> instead
219      */
220     @Deprecated
221     String MULTI_EXECUTION_STRATEGY = "attainAlways";
222 
223     /**
224      * <p>
225      * Refer to <code>&#64;phase &lt;phaseName&gt;</code>.
226      * </p>
227      * <p>
228      * <b>Note</b>: Should be defined in a Mojo Type.
229      * </p>
230      */
231     String PHASE = "phase";
232 
233     /**
234      * <p>
235      * Flags this Mojo as requiring the dependencies in the specified scope (or an implied scope) to be resolved
236      * before it can execute. Currently supports <code>compile</code>, <code>runtime</code>,
237      * <code>compile+runtime</code> and <code>test</code> scopes.
238      * </p>
239      * <p>
240      * Refer to <code>&#64;requiresDependencyResolution &lt;requiredScope&gt;</code>.
241      * </p>
242      * <p>
243      * <b>Note</b>: Should be defined in a Mojo Type.
244      * </p>
245      */
246     String REQUIRES_DEPENDENCY_RESOLUTION = "requiresDependencyResolution";
247 
248     /**
249      * <p>
250      * Flags this Mojo as requiring the dependencies in the specified scope (or an implied scope) to be collected
251      * before it can execute. Currently supports <code>compile</code>, <code>runtime</code>,
252      * <code>compile+runtime</code> and <code>test</code> scopes.
253      * </p>
254      * <p>
255      * Refer to <code>&#64;requiresDependencyCollection &lt;requiredScope&gt;</code>.
256      * </p>
257      * <p>
258      * <b>Note</b>: Should be defined in a Mojo Type.
259      * </p>
260      */
261     String REQUIRES_DEPENDENCY_COLLECTION = "requiresDependencyCollection";
262 
263     /**
264      * <p>
265      * Refer to <code>&#64;requiresDirectInvocation &lt;true|false&gt;</code>.
266      * </p>
267      * <p>
268      * <b>Note</b>: Should be defined in a Mojo Type.
269      * </p>
270      */
271     String REQUIRES_DIRECT_INVOCATION = "requiresDirectInvocation";
272 
273     /**
274      * <p>
275      * Flags this Mojo to run online.
276      * </p>
277      * <p>
278      * Refer to <code>&#64;requiresOnline &lt;true|false&gt;</code>.
279      * </p>
280      * <p>
281      * <b>Note</b>: Should be defined in a Mojo Type.
282      * </p>
283      */
284     String REQUIRES_ONLINE = "requiresOnline";
285 
286     /**
287      * <p>
288      * Flags this Mojo to run inside of a project.
289      * </p>
290      * <p>
291      * Refer to <code>&#64;requiresProject &lt;true|false&gt;</code>.
292      * </p>
293      * <p>
294      * <b>Note</b>: Should be defined in a Mojo Type.
295      * </p>
296      */
297     String REQUIRES_PROJECT = "requiresProject";
298 
299     /**
300      * <p>
301      * Flags this Mojo to run inside reports.
302      * </p>
303      * <p>
304      * Refer to <code>&#64;requiresReports &lt;true|false&gt;</code>.
305      * </p>
306      * <p>
307      * <b>Note</b>: Should be defined in a Mojo Type.
308      * </p>
309      */
310     String REQUIRES_REPORTS = "requiresReports";
311 
312     /**
313      * <p>
314      * Indicates that this mojo is thread-safe and can be run in parallel.
315      * </p>
316      * <p>
317      * <b>Note</b>: Should be defined in a Mojo Type.
318      * </p>
319      */
320     String THREAD_SAFE = "threadSafe";
321 
322     // ----------------------------------------------------------------------
323     // Descriptor for fields i.e. parameters
324     // ----------------------------------------------------------------------
325 
326     /**
327      * <p>
328      * Populate the field with an instance of a Plexus component. This is like declaring a requirement in a
329      * Plexus component.
330      * </p>
331      * <p>
332      * Refer to <code>&#64;component ...</code>.
333      * </p>
334      * <p>
335      * <b>Note</b>: Should be defined in a Mojo Field.
336      * </p>
337      */
338     String COMPONENT = "component";
339 
340     /**
341      * <p>
342      * Refer to <code>&#64;component role="..."</code>.
343      * </p>
344      * <p>
345      * <b>Note</b>: Should be defined in a Mojo Field.
346      * </p>
347      */
348     String COMPONENT_ROLE = "role";
349 
350     /**
351      * <p>
352      * Refer to <code>&#64;component roleHint="..."</code>.
353      * </p>
354      * <p>
355      * <b>Note</b>: Should be defined in a Mojo Field.
356      * </p>
357      */
358     String COMPONENT_ROLEHINT = "roleHint";
359 
360     /**
361      * <p>
362      * Refer to <code>&#64;parameter ...</code>
363      * </p>
364      * <p>
365      * <b>Note</b>: Should be defined in a Mojo Field.
366      * </p>
367      */
368     String PARAMETER = "parameter";
369 
370     /**
371      * <p>
372      * This defines the name of the bean property used to get/set the field: by default, field name is used.
373      * </p>
374      * <p>
375      * Refer to <code>&#64;parameter name="..."</code>.
376      * </p>
377      * <p>
378      * <b>Note</b>: Should be defined in a Mojo Field.
379      * </p>
380      */
381     String PARAMETER_NAME = "name";
382 
383     /**
384      * <p>
385      * This defines an alias which can be used to configure a parameter. This is primarily useful to improve
386      * user-friendliness.
387      * </p>
388      * <p>
389      * Refer to <code>&#64;parameter alias="..."</code>.
390      * </p>
391      * <p>
392      * <b>Note</b>: Should be defined in a Mojo Field.
393      * </p>
394      */
395     String PARAMETER_ALIAS = "alias";
396 
397     /**
398      * <p>
399      * This defines the default value to be injected into this parameter of the Mojo at build time.
400      * </p>
401      * <p>
402      * Refer to <code>&#64;parameter default-value="..."</code>.
403      * </p>
404      * <p>
405      * <b>Note</b>: Should be defined in a Mojo Field.
406      * </p>
407      */
408     String PARAMETER_DEFAULT_VALUE = "default-value";
409 
410     /**
411      * <p>
412      * This defines the expression used to calculate the value to be injected into this parameter of the
413      * Mojo at build time.
414      * </p>
415      * <p>
416      * Refer to <code>&#64;parameter expression="..."</code>.
417      * </p>
418      * <p>
419      * <b>Note</b>: Should be defined in a Mojo Field.
420      * </p>
421      * @deprecated use PARAMETER_PROPERTY instead
422      */
423     @Deprecated
424     String PARAMETER_EXPRESSION = "expression";
425 
426     /**
427      * <p>
428      * This defines the property used to calculate the value to be injected into this parameter of the
429      * Mojo at build time, which can come from <code>-D</code> execution, setting properties or pom properties.
430      * </p>
431      * <p>
432      * Refer to <code>&#64;parameter property="..."</code>.
433      * </p>
434      * <p>
435      * <b>Note</b>: Should be defined in a Mojo Field.
436      * </p>
437      */
438     String PARAMETER_PROPERTY = "property";
439 
440     /**
441      * <p>
442      * This defines the default implementation in the case the parameter type is an interface.
443      * </p>
444      * <p>
445      * Refer to <code>&#64;parameter implementation="..."</code>.
446      * </p>
447      * <p>
448      * <b>Note</b>: Should be defined in a Mojo Field.
449      * </p>
450      */
451     String PARAMETER_IMPLEMENTATION = "implementation";
452 
453     /**
454      * <p>
455      * Specifies that this parameter cannot be configured directly by the user (as in the case of POM-specified
456      * configuration).
457      * </p>
458      * <p>
459      * Refer to <code>&#64;readonly</code>.
460      * </p>
461      * <p>
462      * <b>Note</b>: Should be defined in a Mojo Field.
463      * </p>
464      */
465     String READONLY = "readonly";
466 
467     /**
468      * <p>
469      * Specifies that this parameter is required for the Mojo to function.
470      * </p>
471      * <p>
472      * Refer to <code>&#64;required</code>.
473      * </p>
474      * <p>
475      * <b>Note</b>: Should be defined in a Mojo Field.
476      * </p>
477      */
478     String REQUIRED = "required";
479 
480     // ----------------------------------------------------------------------
481     // Descriptor for type and fields
482     // ----------------------------------------------------------------------
483 
484     /**
485      * <p>
486      * Refer to <code>&#64;since &lt;deprecated-text&gt;</code>
487      * </p>
488      * <p>
489      * <b>Note</b>: Could be defined in a Mojo Type or a Mojo Field.
490      * </p>
491      */
492     String SINCE = "since";
493 
494     /**
495      * <p>
496      * Refer to <code>&#64;deprecated &lt;since-text&gt;</code>
497      * </p>
498      * <p>
499      * <b>Note</b>: Could be defined in a Mojo Type or a Mojo Field.
500      * </p>
501      */
502     String DEPRECATED = "deprecated";
503 }