From 4904e0825ae265f5d152a9f0d7eebbcc038c55c9 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Fri, 12 Jul 2024 23:15:23 +0200 Subject: [PATCH] [MJAVADOC-802] Set default value of defaultAuthor parameter in fix goals to ${user.name} This closes #297 --- .../maven/plugins/javadoc/AbstractFixJavadocMojo.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractFixJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractFixJavadocMojo.java index 2b12dc7c2..84d51f60a 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractFixJavadocMojo.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractFixJavadocMojo.java @@ -231,10 +231,8 @@ public abstract class AbstractFixJavadocMojo extends AbstractMojo { /** * Default value for the Javadoc tag @author. - *
- * If not specified, the user.name defined in the System properties will be used. */ - @Parameter(property = "defaultAuthor") + @Parameter(property = "defaultAuthor", defaultValue = "${user.name}") private String defaultAuthor; /** @@ -494,11 +492,6 @@ protected static String getJavaMethodAsString(JavaExecutable javaExecutable) { * Init goal parameters. */ private void init() { - // defaultAuthor - if (defaultAuthor == null || defaultAuthor.isEmpty()) { - defaultAuthor = System.getProperty("user.name"); - } - // defaultSince int i = defaultSince.indexOf("-" + Artifact.SNAPSHOT_VERSION); if (i != -1) {