2727import org .apache .maven .plugin .AbstractMojo ;
2828import org .apache .maven .plugin .MojoExecutionException ;
2929import org .apache .maven .plugin .MojoFailureException ;
30+ import org .apache .maven .plugins .annotations .Component ;
31+ import org .apache .maven .plugins .annotations .Parameter ;
3032import org .apache .maven .project .MavenProject ;
3133import org .sonatype .plexus .build .incremental .BuildContext ;
3234
3638 */
3739public abstract class AbstractExporterMojo extends AbstractMojo {
3840
39- /**
40- * target folder for sources
41- *
42- * @parameter
43- * @required
44- */
41+ /** maven project */
42+ @ Parameter ( defaultValue = "${project}" , required = true , readonly = true )
43+ private MavenProject project ;
44+
45+ /** target folder for sources */
46+ @ Parameter ( required = true )
4547 private File targetFolder ;
4648
47- /**
48- * switch for scala source generation
49- *
50- * @parameter default-value=false
51- */
49+ /** switch for scala source generation */
50+ @ Parameter (defaultValue = "false" )
5251 private boolean scala ;
5352
54- /**
55- * packages to be exported
56- *
57- * @parameter
58- * @required
59- */
53+ /** packages to be exported */
54+ @ Parameter (required = true )
6055 private String [] packages ;
6156
62- /**
63- * switch for inspecting fields
64- *
65- * @parameter default-value=true
66- */
57+ /** switch for inspecting fields */
58+ @ Parameter (defaultValue = "true" )
6759 private boolean handleFields = true ;
6860
69- /**
70- * switch for inspecting getters
71- *
72- * @parameter default-value=true
73- */
61+ /** switch for inspecting getters */
62+ @ Parameter (defaultValue = "true" )
7463 private boolean handleMethods = true ;
7564
76- /**
77- * switch for usage of field types instead of getter types
78- *
79- * @parameter default-value=false
80- */
65+ /** switch for usage of field types instead of getter types */
66+ @ Parameter (defaultValue = "false" )
8167 private boolean useFieldTypes = false ;
8268
83- /**
84- * maven project
85- *
86- * @parameter default-value="${project}"
87- * @readonly
88- */
89- private MavenProject project ;
90-
91- /**
92- * source file encoding
93- *
94- * @parameter
95- */
96- private String sourceEncoding ;
69+ /** source file encoding */
70+ @ Parameter private String sourceEncoding ;
9771
98- /**
99- * test classpath usage switch
100- *
101- * @parameter default-value=false
102- */
72+ /** test classpath usage switch */
73+ @ Parameter (defaultValue = "false" )
10374 private boolean testClasspath ;
10475
105- /**
106- * Whether to skip the exporting execution
107- *
108- * @parameter default-value=false property="maven.querydsl.skip"
109- */
76+ /** Whether to skip the exporting execution */
77+ @ Parameter (defaultValue = "false" , property = "maven.querydsl.skip" )
11078 private boolean skip ;
11179
11280 /**
@@ -116,17 +84,11 @@ public abstract class AbstractExporterMojo extends AbstractMojo {
11684 * <em>See also</em> <a
11785 * href="https://docs.oracle.com/javase/specs/jls/se8/html/jls-9.html#jls-9.7.3">Single-Element
11886 * Annotation</a>
119- *
120- * @parameter
12187 */
122- private String generatedAnnotationClass ;
88+ @ Parameter private String generatedAnnotationClass ;
12389
124- /**
125- * build context
126- *
127- * @component
128- */
129- private BuildContext buildContext ;
90+ /** build context */
91+ @ Component private BuildContext buildContext ;
13092
13193 @ SuppressWarnings ("unchecked" )
13294 @ Override
0 commit comments