Author: svn-site-role
Date: Tue Jul  4 16:09:04 2023
New Revision: 1910783

Log:
Site checkin for project Apache Maven Site

Modified:
    maven/website/content/guides/mini/guide-configuring-plugins.html
    maven/website/content/maven-site-1.0-site.jar

Modified: maven/website/content/guides/mini/guide-configuring-plugins.html
==============================================================================
--- maven/website/content/guides/mini/guide-configuring-plugins.html (original)
+++ maven/website/content/guides/mini/guide-configuring-plugins.html Tue Jul  4 
16:09:04 2023
@@ -370,11 +370,25 @@ public class MyQueryMojo
 &lt;/project&gt;</pre></div>
 <p>Where each of the animals listed would be entries in the 
<code>animals</code> field. Unlike arrays, collections do not necessarily have 
a specific component type. In order to derive the type of a collection item, 
the following strategy is used:</p>
 <ol style="list-style-type: decimal">
-<li>If the XML element contains an <code>implementation</code> hint attribute, 
try to load the class with the given fully qualified class name from the 
attribute value</li>
-<li>If the XML element contains a <code>.</code>, try to load the class with 
the fully qualified class name given in the element name</li>
-<li>Try the XML element name (with capitalized first letter) as a class in the 
same package as the mojo/object being configured</li>
+<li>If the first item XML element contains an <code>implementation</code> hint 
attribute, try to load the class with the given fully qualified class name from 
the attribute value</li>
+<li>If the first item XML element contains a <code>.</code>, try to load the 
class with the fully qualified class name given in the element name</li>
+<li>Try the first item XML element name (with capitalized first letter) as a 
class in the same package as the mojo/object being configured</li>
 <li>Use the parameter type information from either <a class="externalLink" 
href="https://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Field.html#getGenericType()"><code>Field.getGenericType()</code></a>
 or <a class="externalLink" 
href="https://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Method.html#getGenericParameterTypes()"><code>Method.getGenericParameterTypes()</code></a></li>
 <li>If the element has no children, assume its type is <code>String</code>. 
Otherwise, the configuration will fail.</li></ol>
+<p>The following collection implementations are being used when there is no 
<code>implementation</code> hint attribute in the XML element representing the 
collection:</p>
+<table class="table table-bordered table-striped">
+<tr class="a">
+<th>Collection Class</th>
+<th>Used for</th></tr>
+<tr class="b">
+<td style="text-align: center;"><code>TreeSet</code></td>
+<td style="text-align: center;">for all types assignable to 
<code>SortedSet</code></td></tr>
+<tr class="a">
+<td style="text-align: center;"><code>HashSet</code></td>
+<td style="text-align: center;">for all types assignable to 
<code>Set</code></td></tr>
+<tr class="b">
+<td style="text-align: center;"><code>ArrayList</code></td>
+<td style="text-align: center;">for every other <code>Collection</code> type 
which is not a <code>Map</code></td></tr></table>
 <p>Since Maven 3.3.9 (<a class="externalLink" 
href="https://issues.apache.org/jira/browse/MNG-5440";>MNG-5440</a>), you can 
list individual items alternatively as comma-separated list in the XML value of 
animals directly. This approach is also used if configuring collection/array 
parameters via command line The following example is equivalent to the example 
above:</p>
 <div class="verbatim source"><pre class="prettyprint linenums">&lt;project&gt;
   ...
@@ -409,7 +423,8 @@ public class MyQueryMojo
 ...
 &lt;/project&gt;</pre></div>
 <p>Unlike Collections the value type for Maps is always derived from the 
parameter type information from either <a class="externalLink" 
href="https://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Field.html#getGenericType()"><code>Field.getGenericType()</code></a>
 or <a class="externalLink" 
href="https://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Method.html#getGenericParameterTypes()"><code>Method.getGenericParameterTypes()</code></a>.
 It falls back to <code>String</code>. The key type must always be 
<code>String</code>.</p>
-<p>In contrast to value objects and collections/arrays there is no string 
coercion defined for maps, i.e. you cannot give parameters of that type via CLI 
argument. </p></section><section>
+<p>In contrast to value objects and collections/arrays there is no string 
coercion defined for maps, i.e. you cannot give parameters of that type via CLI 
argument. </p>
+<p>The map implementation class is by default <code>TreeMap</code> but can be 
overridden with an <code>implementation</code> attribute on the XML element 
representing the map.</p></section><section>
 <h5><a id="Mapping_Properties">Mapping Properties</a></h5>
 <p>Properties should be defined like the following:</p>
 <div class="verbatim source"><pre class="prettyprint linenums">...

Modified: maven/website/content/maven-site-1.0-site.jar
==============================================================================
Binary files - no diff available.


Reply via email to