Skip to content

Commit 511d287

Browse files
authored
Clarify different descriptor formats (#224)
1 parent 0f837b5 commit 511d287

File tree

3 files changed

+36
-8
lines changed

3 files changed

+36
-8
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
* Serializes
5353
* <ol>
5454
* <li>a standard <a href="/ref/current/maven-plugin-api/plugin.html">Maven Plugin Descriptor XML file</a></li>
55-
* <li>a descriptor containing a limited set of attributes for {@link PluginHelpGenerator}</li>
55+
* <li>a descriptor containing a limited set of elements for {@link PluginHelpGenerator}</li>
5656
* <li>an enhanced descriptor containing HTML values for some elements (instead of plain text as for the other two)
5757
* for {@link PluginXdocGenerator}</li>
5858
* </ol>
@@ -116,10 +116,10 @@ public void writeDescriptor(File destinationFile, PluginToolsRequest request, De
116116
final String additionalInfo;
117117
switch (type) {
118118
case LIMITED_FOR_HELP_MOJO:
119-
additionalInfo = " (for help'mojo with additional elements)";
119+
additionalInfo = " (for help mojo with limited elements)";
120120
break;
121121
case XHTML:
122-
additionalInfo = " (enhanced XHTML version with additional elements (used for plugin:report))";
122+
additionalInfo = " (enhanced XHTML version (used for plugin:report))";
123123
break;
124124
default:
125125
additionalInfo = "";

src/site/xdoc/index.xml

+31-3
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,43 @@
122122
</table>
123123

124124
<subsection name="Plugin Descriptors">
125-
<p>The plugin descriptor is first being generated in memory finally containing some values in HTML format before being persisted into three different formats.
125+
<p>The plugin descriptor is first being generated in memory finally containing some values in HTML format before being persisted into three different XML files.
126126
The formats differ in
127127
<ul>
128-
<li>whether they contain extended attributes (not part of the <a href="https://maven.apache.org/ref/current/maven-plugin-api/plugin.html">Plugin Descriptor Spec</a></li>
129-
<li>whether descriptive values contain HTML or plain text</li>
128+
<li>whether they contain all elements or just a limited set of elements defined by the <a href="https://maven.apache.org/ref/current/maven-plugin-api/plugin.html">Plugin Descriptor Spec</a></li>
129+
<li>whether descriptive elements contain HTML or plain text values</li>
130+
<li>whether they are packaged in the resulting JAR or not</li>
130131
</ul>
131132
Javadoc tags are in general being resolved and replaced by their XHTML value before they end up in the according plugin descriptor attributes <code>description</code> and <code>deprecated</code>.
132133
Also javadoc code links via <code>{@link}</code> or <code>@see</code> are replaced by links to the according Javadoc pages if configured accordingly.
134+
Plaintext is afterwards being generated out of the XHTML (where most XHTML element are just stripped and links are emitted inside angle brackets).
133135
</p>
136+
<table>
137+
<tr>
138+
<th>File name</th>
139+
<th>Allows HTML</th>
140+
<th>Limited Elements</th>
141+
<th>Contained in JAR</th>
142+
</tr>
143+
<tr>
144+
<td>plugin.xml</td>
145+
<td>no</td>
146+
<td>no</td>
147+
<td>yes</td>
148+
</tr>
149+
<tr>
150+
<td>plugin-help.xml</td>
151+
<td>no</td>
152+
<td>yes</td>
153+
<td>yes</td>
154+
</tr>
155+
<tr>
156+
<td>plugin-enhanced.xml</td>
157+
<td>no</td>
158+
<td>yes</td>
159+
<td>no (volatile file)</td>
160+
</tr>
161+
</table>
134162
<p>
135163
<img src="images/plugin-descriptors.svg" width="759" border="0" />
136164
</p>

src/site/xdoc/plugin-descriptors.mmd

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ flowchart LR
88
P3 --> |populates| P4
99
subgraph output["Plugin Descriptors Serializations"]
1010
O1(["plugin.xml (plain text)"])
11-
O2(["plugin-help.xml (plain text)"])
12-
O3(["plugin-enhanced.xml (html)"])
11+
O2(["plugin-help.xml (plain text with extended elements)"])
12+
O3(["plugin-enhanced.xml (html, transient, not part of final JAR)"])
1313
end
1414
subgraph generators["maven-plugin-tools-generators"]
1515
G1["PluginXdocGenerator"] --> |generates| R2([XDoc])

0 commit comments

Comments
 (0)