Skip to content

Commit 7b03f49

Browse files
authored
Replace javadoc tags with Java Annotations (#165)
Co-authored-by: Marvin Froeder <[email protected]>
1 parent 6384639 commit 7b03f49

File tree

9 files changed

+183
-418
lines changed

9 files changed

+183
-418
lines changed

querydsl-maven-plugin/pom.xml

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
<name>Querydsl - Maven plugin</name>
1414
<description>Querydsl Maven plugin</description>
1515

16+
<properties>
17+
<maven-plugin.version>3.10.2</maven-plugin.version>
18+
</properties>
19+
1620
<dependencyManagement>
1721
<dependencies>
1822
<dependency>
@@ -34,20 +38,29 @@
3438
</dependencyManagement>
3539

3640
<dependencies>
41+
<dependency>
42+
<groupId>org.apache.maven.plugin-tools</groupId>
43+
<artifactId>maven-plugin-annotations</artifactId>
44+
<version>${maven-plugin.version}</version>
45+
<scope>provided</scope>
46+
</dependency>
3747
<dependency>
3848
<groupId>org.apache.maven</groupId>
3949
<artifactId>maven-plugin-api</artifactId>
4050
<version>${mvn.version}</version>
51+
<scope>provided</scope>
4152
</dependency>
4253
<dependency>
4354
<groupId>org.apache.maven</groupId>
4455
<artifactId>maven-model</artifactId>
4556
<version>${mvn.version}</version>
57+
<scope>provided</scope>
4658
</dependency>
4759
<dependency>
4860
<groupId>org.apache.maven</groupId>
4961
<artifactId>maven-compat</artifactId>
5062
<version>${mvn.version}</version>
63+
<scope>provided</scope>
5164
</dependency>
5265

5366
<dependency>
@@ -96,37 +109,13 @@
96109
</dependencies>
97110

98111
<build>
99-
<pluginManagement>
100-
<plugins>
101-
<plugin>
102-
<groupId>org.apache.maven.plugins</groupId>
103-
<artifactId>maven-plugin-plugin</artifactId>
104-
<version>3.10.2</version>
105-
</plugin>
106-
</plugins>
107-
</pluginManagement>
112+
<plugins>
113+
<plugin>
114+
<groupId>org.apache.maven.plugins</groupId>
115+
<artifactId>maven-plugin-plugin</artifactId>
116+
<version>${maven-plugin.version}</version>
117+
</plugin>
118+
</plugins>
108119
</build>
109120

110-
<profiles>
111-
<profile>
112-
<!-- See http://stackoverflow.com/a/22296107/14731 -->
113-
<id>doclint-java8-disable</id>
114-
<activation>
115-
<jdk>[1.8,)</jdk>
116-
</activation>
117-
118-
<build>
119-
<plugins>
120-
<plugin>
121-
<groupId>org.apache.maven.plugins</groupId>
122-
<artifactId>maven-javadoc-plugin</artifactId>
123-
<configuration>
124-
<additionalparam>-Xdoclint:none</additionalparam>
125-
</configuration>
126-
</plugin>
127-
</plugins>
128-
</build>
129-
</profile>
130-
</profiles>
131-
132121
</project>

querydsl-maven-plugin/src/main/java/com/querydsl/maven/AbstractExporterMojo.java

Lines changed: 27 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
import org.apache.maven.plugin.AbstractMojo;
2828
import org.apache.maven.plugin.MojoExecutionException;
2929
import org.apache.maven.plugin.MojoFailureException;
30+
import org.apache.maven.plugins.annotations.Component;
31+
import org.apache.maven.plugins.annotations.Parameter;
3032
import org.apache.maven.project.MavenProject;
3133
import org.sonatype.plexus.build.incremental.BuildContext;
3234

@@ -36,77 +38,43 @@
3638
*/
3739
public 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

Comments
 (0)