Skip to content

Commit 63a14f7

Browse files
committed
[MPLUGIN-471] Generated table by PluginXdocGenerator does not contain default attributes
1 parent ca911b2 commit 63a14f7

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginXdocGenerator.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,15 @@ public PluginXdocGenerator(MavenProject project) {
9999

100100
/**
101101
* @param project not null.
102-
* @param locale not null wanted locale.
102+
* @param locale not null.
103103
*/
104104
public PluginXdocGenerator(
105105
MavenProject project,
106106
Locale locale,
107107
File reportOutputDirectory,
108108
boolean disableInternalJavadocLinkValidation) {
109109
this.project = project;
110-
if (locale == null) {
111-
this.locale = Locale.ENGLISH;
112-
} else {
113-
this.locale = locale;
114-
}
110+
this.locale = locale;
115111
this.reportOutputDirectory = reportOutputDirectory;
116112
this.disableInternalJavadocLinkValidation = disableInternalJavadocLinkValidation;
117113
}
@@ -446,7 +442,6 @@ private void writeParameterDetails(List<Parameter> parameterList, XMLWriter w, S
446442

447443
w.startElement("div");
448444
if (StringUtils.isNotEmpty(parameter.getDescription())) {
449-
450445
w.writeMarkup(getXhtmlWithValidatedLinks(parameter.getDescription(), context));
451446
} else {
452447
w.writeMarkup(getString("pluginxdoc.nodescription"));
@@ -631,6 +626,7 @@ private void writeParameterList(String title, List<Parameter> parameterList, XML
631626

632627
w.startElement("table");
633628
w.addAttribute("border", "0");
629+
w.addAttribute("class", "bodyTable");
634630

635631
w.startElement("tr");
636632
w.startElement("th");

maven-plugin-tools-generators/src/test/resources/expected-testGoal-mojo.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</li>
4848
</ul>
4949
<subsection name="Required Parameters">
50-
<table border="0">
50+
<table border="0" class="bodyTable">
5151
<tr>
5252
<th>Name</th>
5353
<th>Type</th>
@@ -81,7 +81,7 @@
8181
</table>
8282
</subsection>
8383
<subsection name="Optional Parameters">
84-
<table border="0">
84+
<table border="0" class="bodyTable">
8585
<tr>
8686
<th>Name</th>
8787
<th>Type</th>

0 commit comments

Comments
 (0)