1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.tools.plugin.extractor.annotations.scanner;
20
21 import java.util.Arrays;
22 import java.util.List;
23 import java.util.Map;
24
25 import org.apache.maven.plugins.annotations.Component;
26 import org.apache.maven.plugins.annotations.Execute;
27 import org.apache.maven.plugins.annotations.Mojo;
28 import org.apache.maven.plugins.annotations.Parameter;
29 import org.apache.maven.tools.plugin.extractor.ExtractionException;
30
31
32
33
34
35 public interface MojoAnnotationsScanner {
36 String ROLE = MojoAnnotationsScanner.class.getName();
37
38 String V4_API_PLUGIN_PACKAGE = "org.apache.maven.api.plugin";
39
40 String V4_API_ANNOTATIONS_PACKAGE = V4_API_PLUGIN_PACKAGE + ".annotations";
41
42 List<String> CLASS_LEVEL_ANNOTATIONS = Arrays.asList(
43 Mojo.class.getName(),
44 Execute.class.getName(),
45 Deprecated.class.getName(),
46 V4_API_ANNOTATIONS_PACKAGE + ".Mojo",
47 V4_API_ANNOTATIONS_PACKAGE + ".Execute");
48
49 List<String> FIELD_LEVEL_ANNOTATIONS = Arrays.asList(
50 Parameter.class.getName(),
51 Component.class.getName(),
52 Deprecated.class.getName(),
53 V4_API_ANNOTATIONS_PACKAGE + ".Parameter",
54 V4_API_ANNOTATIONS_PACKAGE + ".Component");
55
56 List<String> METHOD_LEVEL_ANNOTATIONS = Arrays.asList(
57 Parameter.class.getName(), Deprecated.class.getName(), V4_API_ANNOTATIONS_PACKAGE + ".Parameter");
58
59
60
61
62
63
64
65
66 Map<String, MojoAnnotatedClass> scan(MojoAnnotationsScannerRequest request) throws ExtractionException;
67 }