001    package org.apache.maven.tools.plugin.extractor.java;
002    
003    /*
004     * Licensed to the Apache Software Foundation (ASF) under one
005     * or more contributor license agreements.  See the NOTICE file
006     * distributed with this work for additional information
007     * regarding copyright ownership.  The ASF licenses this file
008     * to you under the Apache License, Version 2.0 (the
009     * "License"); you may not use this file except in compliance
010     * with the License.  You may obtain a copy of the License at
011     *
012     *   http://www.apache.org/licenses/LICENSE-2.0
013     *
014     * Unless required by applicable law or agreed to in writing,
015     * software distributed under the License is distributed on an
016     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017     * KIND, either express or implied.  See the License for the
018     * specific language governing permissions and limitations
019     * under the License.
020     */
021    
022    /**
023     * List of all Javadoc annotations used to describe a java Mojo.
024     *
025     * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
026     * @version $Id: JavaMojoAnnotation.java 1340574 2012-05-19 21:53:49Z hboutemy $
027     * @since 2.4
028     */
029    public interface JavaMojoAnnotation
030    {
031        // ----------------------------------------------------------------------
032        // Descriptor for type i.e. Mojo
033        // ----------------------------------------------------------------------
034    
035        /**
036         * Flags this Mojo to run it in a multi module way, i.e. aggregate the build with the set of projects listed
037         * as modules.
038         * <br/>
039         * Refer to <code>&#64;aggregator</code>.
040         * <br/>
041         * <b>Note</b>: Should be defined in a Mojo Type.
042         */
043        String AGGREGATOR = "aggregator";
044    
045        /**
046         * The configurator type to use when injecting parameter values into this Mojo. The value is normally deduced
047         * from the Mojo's implementation language, but can be specified to allow a custom ComponentConfigurator
048         * implementation to be used.
049         * <br/>
050         * Refer to <code>&#64;configurator &lt;roleHint&gt;</code>.
051         * <br/>
052         * <b>Note</b>: Should be defined in a Mojo Type.
053         */
054        String CONFIGURATOR = "configurator";
055    
056        /**
057         * The description for the Mojo.
058         * <br/>
059         * Refer to <code>&#64;description</code>.
060         * <br/>
061         * <b>Note</b>: Should be defined in a Mojo Type.
062         * <br/>
063         * <b>Note</b>: Mojo's description is auto-detected.
064         */
065        String DESCRIPTION = "description";
066    
067        /**
068         * Refer to <code>&#64;execute ...</code>.
069         * <br/>
070         * <b>Note</b>: Should be defined in a Mojo Type.
071         */
072        String EXECUTE = "execute";
073    
074        /**
075         * The Mojo goal will be executed in isolation.
076         * <br/>
077         * Refer to <code>&#64;execute goal="&lt;goalName&gt;"</code>.
078         * <br/>
079         * <b>Note</b>: Should be defined in a Mojo Type.
080         */
081        String EXECUTE_GOAL = "goal";
082    
083        /**
084         * The Mojo will be invoked in a parallel lifecycle.
085         * <br/>
086         * Refer to <code>&#64;execute lifecycle="&lt;lifecycleId&gt;"</code>.
087         * <br/>
088         * <b>Note</b>: Should be defined in a Mojo Type.
089         */
090        String EXECUTE_LIFECYCLE = "lifecycle";
091    
092        /**
093         * The Mojo will be invoked in a parallel lifecycle, ending at the given phase.
094         * <br/>
095         * Refer to <code>&#64;execute phase="&lt;phaseName&gt;"</code>.
096         * <br/>
097         * Refer to <code>&#64;execute lifecycle="&lt;lifecycleId&gt;" phase="&lt;phaseName&gt;"</code>.
098         * <br/>
099         * <b>Note</b>: Should be defined in a Mojo Type.
100         */
101        String EXECUTE_PHASE = "phase";
102    
103        /**
104         * Refer to <code>&#64;executionStrategy &lt;strategy&gt;</code>.
105         * <br/>
106         * <b>Note</b>: Should be defined in a Mojo Type.
107         */
108        String EXECUTION_STATEGY = "executionStrategy";
109    
110        /**
111         * The name for the Mojo that users will reference to execute it.
112         * <br/>
113         * Refer to <code>&#64;goal &lt;goalName&gt;</code>.
114         * <br/>
115         * <b>Note</b>: Should be defined in a Mojo Type.
116         */
117        String GOAL = "goal";
118    
119        /**
120         * The Mojo's fully-qualified class name.
121         * <br/>
122         * Refer to <code>&#64;implementation</code>.
123         * <br/>
124         * <b>Note</b>: Should be defined in a Mojo Type.
125         * <br/>
126         * <b>Note</b>: Mojo's implementation is auto-detected.
127         */
128        String IMPLEMENTATION = "implementation";
129    
130        /**
131         * Allow Mojo inheritance.
132         * <br/>
133         * Refer to <code>&#64;inheritByDefault &lt;true|false&gt;</code>.
134         * <br/>
135         * <b>Note</b>: Should be defined in a Mojo Type.
136         */
137        String INHERIT_BY_DEFAULT = "inheritByDefault";
138    
139        /**
140         * Refer to <code>&#64;instantiationStrategy &lt;per-lookup&gt;</code>.
141         * <br/>
142         * <b>Note</b>: Should be defined in a Mojo Type.
143         */
144        String INSTANTIATION_STRATEGY = "instantiationStrategy";
145    
146        /**
147         * The implementation language for the Mojo.
148         * <br/>
149         * Refer to <code>&#64;language</code>.
150         * <br/>
151         * <b>Note</b>: Should be defined in a Mojo Type.
152         * <br/>
153         * <b>Note</b>: Mojo's implementation is auto-detected.
154         */
155        String LANGUAGE = "language";
156    
157        /**
158         * Specifies the execution strategy.
159         * <br/>
160         * Refer to <code>&#64;attainAlways</code>.
161         * <br/>
162         * <b>Note</b>: Should be defined in a Mojo Type.
163         * @deprecated use <code>&#64executionStrategy always</code> instead
164         */
165        String MULTI_EXECUTION_STRATEGY = "attainAlways";
166    
167        /**
168         * Refer to <code>&#64;phase &lt;phaseName&gt;</code>.
169         * <br/>
170         * <b>Note</b>: Should be defined in a Mojo Type.
171         */
172        String PHASE = "phase";
173    
174        /**
175         * Flags this Mojo as requiring the dependencies in the specified scope (or an implied scope) to be resolved
176         * before it can execute. Currently supports <code>compile</code>, <code>runtime</code>,
177         * <code>compile+runtime</code> and <code>test</code> scopes.
178         * <br/>
179         * Refer to <code>&#64;requiresDependencyResolution &lt;requiredScope&gt;</code>.
180         * <br/>
181         * <b>Note</b>: Should be defined in a Mojo Type.
182         */
183        String REQUIRES_DEPENDENCY_RESOLUTION = "requiresDependencyResolution";
184    
185        /**
186         * Flags this Mojo as requiring the dependencies in the specified scope (or an implied scope) to be collected
187         * before it can execute. Currently supports <code>compile</code>, <code>runtime</code>,
188         * <code>compile+runtime</code> and <code>test</code> scopes.
189         * <br/>
190         * Refer to <code>&#64;requiresDependencyCollection &lt;requiredScope&gt;</code>.
191         * <br/>
192         * <b>Note</b>: Should be defined in a Mojo Type.
193         */
194        String REQUIRES_DEPENDENCY_COLLECTION = "requiresDependencyCollection";
195    
196    
197        /**
198         * Refer to <code>&#64;requiresDirectInvocation &lt;true|false&gt;</code>.
199         * <br/>
200         * <b>Note</b>: Should be defined in a Mojo Type.
201         */
202        String REQUIRES_DIRECT_INVOCATION = "requiresDirectInvocation";
203    
204        /**
205         * Flags this Mojo to run online.
206         * <br/>
207         * Refer to <code>&#64;requiresOnline &lt;true|false&gt;</code>.
208         * <br/>
209         * <b>Note</b>: Should be defined in a Mojo Type.
210         */
211        String REQUIRES_ONLINE = "requiresOnline";
212    
213        /**
214         * Flags this Mojo to run inside of a project.
215         * <br/>
216         * Refer to <code>&#64;requiresProject &lt;true|false&gt;</code>.
217         * <br/>
218         * <b>Note</b>: Should be defined in a Mojo Type.
219         */
220        String REQUIRES_PROJECT = "requiresProject";
221    
222        /**
223         * Flags this Mojo to run inside reports.
224         * <br/>
225         * Refer to <code>&#64;requiresReports &lt;true|false&gt;</code>.
226         * <br/>
227         * <b>Note</b>: Should be defined in a Mojo Type.
228         */
229        String REQUIRES_REPORTS = "requiresReports";
230    
231        /**
232         * Indicates that this mojo is thread-safe and can be run in parallel.
233         *
234         * <b>Note</b>: Should be defined in a Mojo Type.
235         */
236        String THREAD_SAFE = "threadSafe";
237    
238    
239        // ----------------------------------------------------------------------
240        // Descriptor for fields i.e. parameters
241        // ----------------------------------------------------------------------
242    
243        /**
244         * Populate the field with an instance of a Plexus component. This is like declaring a requirement in a
245         * Plexus component.
246         * <br/>
247         * Refer to <code>&#64;component ...</code>.
248         * <br/>
249         * <b>Note</b>: Should be defined in a Mojo Field.
250         */
251        String COMPONENT = "component";
252    
253        /**
254         * Refer to <code>&#64;component role="..."</code>.
255         * <br/>
256         * <b>Note</b>: Should be defined in a Mojo Field.
257         */
258        String COMPONENT_ROLE = "role";
259    
260        /**
261         * Refer to <code>&#64;component roleHint="..."</code>.
262         * <br/>
263         * <b>Note</b>: Should be defined in a Mojo Field.
264         */
265        String COMPONENT_ROLEHINT = "roleHint";
266    
267        /**
268         * Refer to <code>&#64;parameter ...</code>
269         * <br/>
270         * <b>Note</b>: Should be defined in a Mojo Field.
271         */
272        String PARAMETER = "parameter";
273    
274        /**
275         * This defines an alias which can be used to configure a parameter. This is primarily useful to improve
276         * user-friendliness.
277         * <br/>
278         * Refer to <code>&#64;parameter alias="..."</code>.
279         * <br/>
280         * <b>Note</b>: Should be defined in a Mojo Field.
281         */
282        String PARAMETER_ALIAS = "alias";
283    
284        /**
285         * This defines the default value to be injected into this parameter of the Mojo at build time.
286         * <br/>
287         * Refer to <code>&#64;parameter default-value="..."</code>.
288         * <br/>
289         * <b>Note</b>: Should be defined in a Mojo Field.
290         */
291        String PARAMETER_DEFAULT_VALUE = "default-value";
292    
293        /**
294         * This defines the expression used to calculate the value to be injected into this parameter of the
295         * Mojo at build time.
296         * <br/>
297         * Refer to <code>&#64;parameter expression="..."</code>.
298         * <br/>
299         * <b>Note</b>: Should be defined in a Mojo Field.
300         * @deprecated use PARAMETER_PROPERTY instead
301         */
302        String PARAMETER_EXPRESSION = "expression";
303    
304        /**
305         * This defines the property used to calculate the value to be injected into this parameter of the
306         * Mojo at build time, which can come from <code>-D</code> execution, setting properties or pom properties.
307         * <br/>
308         * Refer to <code>&#64;parameter property="..."</code>.
309         * <br/>
310         * <b>Note</b>: Should be defined in a Mojo Field.
311         */
312        String PARAMETER_PROPERTY = "property";
313    
314        /**
315         * This defines the default implementation in the case the parameter type is an interface.
316         * <br/>
317         * Refer to <code>&#64;parameter implementation="..."</code>.
318         * <br/>
319         * <b>Note</b>: Should be defined in a Mojo Field.
320         */
321        String PARAMETER_IMPLEMENTATION = "implementation";
322    
323        /**
324         * Specifies that this parameter cannot be configured directly by the user (as in the case of POM-specified
325         * configuration).
326         * <br/>
327         * Refer to <code>&#64;readonly</code>.
328         * <br/>
329         * <b>Note</b>: Should be defined in a Mojo Field.
330         */
331        String READONLY = "readonly";
332    
333        /**
334         * Specifies that this parameter is required for the Mojo to function.
335         * <br/>
336         * Refer to <code>&#64;required</code>.
337         * <br/>
338         * <b>Note</b>: Should be defined in a Mojo Field.
339         */
340        String REQUIRED = "required";
341    
342        // ----------------------------------------------------------------------
343        // Descriptor for type and fields
344        // ----------------------------------------------------------------------
345    
346        /**
347         * Refer to <code>&#64;since &lt;deprecated-text&gt;</code>
348         * <br/>
349         * <b>Note</b>: Could be defined in a Mojo Type or a Mojo Field.
350         */
351        String SINCE = "since";
352    
353        /**
354         * Refer to <code>&#64;deprecated &lt;since-text&gt;</code>
355         * <br/>
356         * <b>Note</b>: Could be defined in a Mojo Type or a Mojo Field.
357         */
358        String DEPRECATED = "deprecated";
359    
360    }