This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-cli.git
The following commit(s) were added to refs/heads/master by this push:
new d48844ae Port from Doxia 1 to 2
d48844ae is described below
commit d48844ae8d72c6ae8437f731505ad486094a9c8e
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Jan 23 11:19:23 2025 -0500
Port from Doxia 1 to 2
---
src/site/xdoc/index.xml | 5 +--
src/site/xdoc/introduction.xml | 7 ++--
src/site/xdoc/properties.xml | 7 ++--
src/site/xdoc/release_1_0.xml | 4 ++-
src/site/xdoc/release_1_2.xml | 4 ++-
src/site/xdoc/release_1_3.xml | 4 ++-
src/site/xdoc/release_1_3_1.xml | 4 ++-
src/site/xdoc/release_1_4.xml | 4 ++-
src/site/xdoc/upgrading-1.0-to-1.1.xml | 4 ++-
src/site/xdoc/usage.xml | 65 +++++++++++++++++++---------------
10 files changed, 65 insertions(+), 43 deletions(-)
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index dafa33fe..bf275532 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -17,8 +17,9 @@
specific language governing permissions and limitations
under the License.
-->
-<document>
-
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0
https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Apache Commons CLI</title>
<author email="[email protected]">commons-dev</author>
diff --git a/src/site/xdoc/introduction.xml b/src/site/xdoc/introduction.xml
index c90b6738..6a0826a3 100644
--- a/src/site/xdoc/introduction.xml
+++ b/src/site/xdoc/introduction.xml
@@ -17,11 +17,12 @@
specific language governing permissions and limitations
under the License.
-->
-<document>
-
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0
https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
- <author email="[email protected]">commons-dev</author>
<title>Introducing Apache Commons CLI</title>
+ <author email="[email protected]">Apache Commons Team</author>
</properties>
<body>
diff --git a/src/site/xdoc/properties.xml b/src/site/xdoc/properties.xml
index e5e43f9d..97b22989 100644
--- a/src/site/xdoc/properties.xml
+++ b/src/site/xdoc/properties.xml
@@ -17,11 +17,12 @@
specific language governing permissions and limitations
under the License.
-->
-<document>
-
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0
https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
- <author email="[email protected]">commons-dev</author>
<title>Defining Option Properties</title>
+ <author email="[email protected]">Apache Commons Team</author>
</properties>
<body>
diff --git a/src/site/xdoc/release_1_0.xml b/src/site/xdoc/release_1_0.xml
index 3bceb7e2..670f8515 100644
--- a/src/site/xdoc/release_1_0.xml
+++ b/src/site/xdoc/release_1_0.xml
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<document>
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0
https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Release notes for CLI 1.0</title>
<author email="[email protected]">Commons Documentation Team</author>
diff --git a/src/site/xdoc/release_1_2.xml b/src/site/xdoc/release_1_2.xml
index 8f83b7ea..39338f6f 100644
--- a/src/site/xdoc/release_1_2.xml
+++ b/src/site/xdoc/release_1_2.xml
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<document>
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0
https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Release notes for CLI 1.2</title>
<author email="[email protected]">Commons Documentation Team</author>
diff --git a/src/site/xdoc/release_1_3.xml b/src/site/xdoc/release_1_3.xml
index 5c2de24a..447a0344 100644
--- a/src/site/xdoc/release_1_3.xml
+++ b/src/site/xdoc/release_1_3.xml
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<document>
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0
https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Release notes for CLI 1.3</title>
<author email="[email protected]">Commons Documentation Team</author>
diff --git a/src/site/xdoc/release_1_3_1.xml b/src/site/xdoc/release_1_3_1.xml
index 3a8d6985..1539802a 100644
--- a/src/site/xdoc/release_1_3_1.xml
+++ b/src/site/xdoc/release_1_3_1.xml
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<document>
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0
https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Release notes for CLI 1.3.1</title>
<author email="[email protected]">Commons Documentation Team</author>
diff --git a/src/site/xdoc/release_1_4.xml b/src/site/xdoc/release_1_4.xml
index 70545f1d..a2d6b72e 100644
--- a/src/site/xdoc/release_1_4.xml
+++ b/src/site/xdoc/release_1_4.xml
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<document>
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0
https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Release notes for CLI 1.4</title>
<author email="[email protected]">Commons Documentation Team</author>
diff --git a/src/site/xdoc/upgrading-1.0-to-1.1.xml
b/src/site/xdoc/upgrading-1.0-to-1.1.xml
index 866477fb..0fa4228d 100644
--- a/src/site/xdoc/upgrading-1.0-to-1.1.xml
+++ b/src/site/xdoc/upgrading-1.0-to-1.1.xml
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-<document>
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0
https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
<title>Upgrading from 1.0 to 1.1</title>
<author email="[email protected]">Commons Documentation Team</author>
diff --git a/src/site/xdoc/usage.xml b/src/site/xdoc/usage.xml
index 656f8f1f..b29b9037 100644
--- a/src/site/xdoc/usage.xml
+++ b/src/site/xdoc/usage.xml
@@ -17,11 +17,12 @@
specific language governing permissions and limitations
under the License.
-->
-<document>
-
+<document xmlns="http://maven.apache.org/XDOC/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/XDOC/2.0
https://maven.apache.org/xsd/xdoc-2.0.xsd">
<properties>
- <author email="[email protected]">commons-dev</author>
<title>Using Apache Commons CLI</title>
+ <author email="[email protected]">Apache Commons Team</author>
</properties>
<body>
@@ -91,7 +92,9 @@ else {
// print the date
}</source>
<p>
- <h4>Note.</h4>
+ <em>Note.</em>
+ </p>
+ <p>
As of version 1.5, the
<code>DefaultParser</code>'s constructor now has an override with
the signature <code>DefaultParser(final boolean
allowPartialMatching)</code>.
@@ -221,10 +224,10 @@ Option find = Option.builder("find")
.hasArgs()
.valueSeparator('=')
.build();</source>
-
+ <p>
The map of properties specified by this option can later be
retrieved by
calling <code>getOptionProperties("D")</code> on the
<code>CommandLine</code>.
-
+ </p>
</subsection>
<subsection name="Creating the Options">
<p>
@@ -418,25 +421,27 @@ public static void main(String[] args) {
} </source>
<p>
The value types natively supported by commons-cli are:
- <ul>
- <li>Object.class - The string value must be the name of a
class with a no argument constructor</li>
- <li>Class.class - The string value must be the name of a
class</li>
- <li>Date.class - The string value must be a date parsable by
<code>new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy")</code></li>
- <li>File.class - The string value is the name of the file.</li>
- <li>Path.class - The string value is the name of a Path.</li>
- <li>Number.class - The string value is a number representation
can can be converted into an Integer or a Double.</li>
- <li>URL.class - The string value is the textual representation
of a URL</li>
- <li>FileInputStream.class - The string value is passed to
<code>new FileInputStream(s)</code>.</li>
- <li>Long.class - The string value is a valid argument to
<code>Long.parseLong()</code>.</li>
- <li>Integer.class - The string value is a valid argument to
<code>Integer.parseInt()</code>.</li>
- <li>Short.class - The string value is a valid argument to
<code>Short.parseShort()</code>.</li>
- <li>Byte.class - The string value is a valid argument to
<code>Byte.parseByte()</code>.</li>
- <li>Character.class - The string value is either a UTF-8
encoding for a character (e.g. "\\u0124") or the first character from the
String."</li>
- <li>Double.class - The string value is a valid argument to
<code>Double.parseDouble()</code>.</li>
- <li>Float.class - The string value is a valid argument to
<code>Float.parseFloat()</code>.</li>
- <li>BigInteger.class - The string value is a valid argument to
<code>new BigInteger(s)</code>.</li>
- <li>BigDecimal.class - The string value is a valid argument to
<code>new BigDecimal(s)</code>.</li>
- </ul>
+ </p>
+ <ul>
+ <li>Object.class - The string value must be the name of a class with
a no argument constructor</li>
+ <li>Class.class - The string value must be the name of a class</li>
+ <li>Date.class - The string value must be a date parsable by
<code>new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy")</code></li>
+ <li>File.class - The string value is the name of the file.</li>
+ <li>Path.class - The string value is the name of a Path.</li>
+ <li>Number.class - The string value is a number representation can
can be converted into an Integer or a Double.</li>
+ <li>URL.class - The string value is the textual representation of a
URL</li>
+ <li>FileInputStream.class - The string value is passed to <code>new
FileInputStream(s)</code>.</li>
+ <li>Long.class - The string value is a valid argument to
<code>Long.parseLong()</code>.</li>
+ <li>Integer.class - The string value is a valid argument to
<code>Integer.parseInt()</code>.</li>
+ <li>Short.class - The string value is a valid argument to
<code>Short.parseShort()</code>.</li>
+ <li>Byte.class - The string value is a valid argument to
<code>Byte.parseByte()</code>.</li>
+ <li>Character.class - The string value is either a UTF-8 encoding
for a character (e.g. "\\u0124") or the first character from the String."</li>
+ <li>Double.class - The string value is a valid argument to
<code>Double.parseDouble()</code>.</li>
+ <li>Float.class - The string value is a valid argument to
<code>Float.parseFloat()</code>.</li>
+ <li>BigInteger.class - The string value is a valid argument to
<code>new BigInteger(s)</code>.</li>
+ <li>BigDecimal.class - The string value is a valid argument to
<code>new BigDecimal(s)</code>.</li>
+ </ul>
+ <p>
Additional types may be added to the automatic parsing system by
calling <code>TypeHandler.register(Class<T> clazz, Converter<T>
converter)</code>.
The <code>Class<T></code> can be any defined class. The
converter is a function that takes a <code>String</code> argument and returns
an instance of
the class. Any exception thrown by the constructor will be caught
and reported as a <code>ParseException</code>
@@ -580,11 +585,13 @@ public static void main(String[] args) {
<p>
The display of deprecated options may be changed through the use
of the
<code>HelpFormatter.Builder.setShowDeprecated()</code> method.
- <ul>
- <li>Calling
<code>HelpFormatter.Builder.setShowDeprecated(false)</code> will disable the
"[Deprecated]" tag.</li>
- <li>Calling
<code>HelpFormatter.Builder.setShowDeprecated</code> with a
<code>Function<Option, String></code>
+ </p>
+ <ul>
+ <li>Calling
<code>HelpFormatter.Builder.setShowDeprecated(false)</code> will disable the
"[Deprecated]" tag.</li>
+ <li>Calling <code>HelpFormatter.Builder.setShowDeprecated</code>
with a <code>Function<Option, String></code>
will use the output of the function as the description
for the option.</li>
- </ul>
+ </ul>
+ <p>
As an example of the second case above, changing the
implementation of <code>doSomething</code> to
<source>
void doSomething(Options options) {