You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2023/05/09 22:03:21 UTC
[maven-plugin-tools] 05/08: [MPLUGIN-471] Generated table by PluginXdocGenerator does not contain default attributes
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch fixes
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git
commit 946934f0371fa2fba308aa9b3c2bf2f0376c5714
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Tue May 9 23:30:26 2023 +0200
[MPLUGIN-471] Generated table by PluginXdocGenerator does not contain default attributes
---
.../maven/tools/plugin/generator/PluginXdocGenerator.java | 10 +++-------
.../src/test/resources/expected-testGoal-mojo.xml | 4 ++--
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
index 9e9c693b..b13598d0 100644
--- a/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
+++ b/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java
@@ -99,7 +99,7 @@ public class PluginXdocGenerator implements Generator {
/**
* @param project not null.
- * @param locale not null wanted locale.
+ * @param locale not null.
*/
public PluginXdocGenerator(
MavenProject project,
@@ -107,11 +107,7 @@ public class PluginXdocGenerator implements Generator {
File reportOutputDirectory,
boolean disableInternalJavadocLinkValidation) {
this.project = project;
- if (locale == null) {
- this.locale = Locale.ENGLISH;
- } else {
- this.locale = locale;
- }
+ this.locale = locale;
this.reportOutputDirectory = reportOutputDirectory;
this.disableInternalJavadocLinkValidation = disableInternalJavadocLinkValidation;
}
@@ -446,7 +442,6 @@ public class PluginXdocGenerator implements Generator {
w.startElement("div");
if (StringUtils.isNotEmpty(parameter.getDescription())) {
-
w.writeMarkup(getXhtmlWithValidatedLinks(parameter.getDescription(), context));
} else {
w.writeMarkup(getString("pluginxdoc.nodescription"));
@@ -631,6 +626,7 @@ public class PluginXdocGenerator implements Generator {
w.startElement("table");
w.addAttribute("border", "0");
+ w.addAttribute("class", "bodyTable");
w.startElement("tr");
w.startElement("th");
diff --git a/maven-plugin-tools-generators/src/test/resources/expected-testGoal-mojo.xml b/maven-plugin-tools-generators/src/test/resources/expected-testGoal-mojo.xml
index fcb20034..25c6c70b 100644
--- a/maven-plugin-tools-generators/src/test/resources/expected-testGoal-mojo.xml
+++ b/maven-plugin-tools-generators/src/test/resources/expected-testGoal-mojo.xml
@@ -47,7 +47,7 @@
</li>
</ul>
<subsection name="Required Parameters">
- <table border="0">
+ <table border="0" class="bodyTable">
<tr>
<th>Name</th>
<th>Type</th>
@@ -81,7 +81,7 @@
</table>
</subsection>
<subsection name="Optional Parameters">
- <table border="0">
+ <table border="0" class="bodyTable">
<tr>
<th>Name</th>
<th>Type</th>