Skip to content

Commit d48844a

Browse files
committed
Port from Doxia 1 to 2
1 parent 2c15c84 commit d48844a

File tree

10 files changed

+65
-43
lines changed

10 files changed

+65
-43
lines changed

src/site/xdoc/index.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
specific language governing permissions and limitations
1818
under the License.
1919
-->
20-
<document>
21-
20+
<document xmlns="http://maven.apache.org/XDOC/2.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
2223
<properties>
2324
<title>Apache Commons CLI</title>
2425
<author email="dev@commons.apache.org">commons-dev</author>

src/site/xdoc/introduction.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
specific language governing permissions and limitations
1818
under the License.
1919
-->
20-
<document>
21-
20+
<document xmlns="http://maven.apache.org/XDOC/2.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
2223
<properties>
23-
<author email="dev@commons.apache.org">commons-dev</author>
2424
<title>Introducing Apache Commons CLI</title>
25+
<author email="dev@commons.apache.org">Apache Commons Team</author>
2526
</properties>
2627

2728
<body>

src/site/xdoc/properties.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
specific language governing permissions and limitations
1818
under the License.
1919
-->
20-
<document>
21-
20+
<document xmlns="http://maven.apache.org/XDOC/2.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
2223
<properties>
23-
<author email="dev@commons.apache.org">commons-dev</author>
2424
<title>Defining Option Properties</title>
25+
<author email="dev@commons.apache.org">Apache Commons Team</author>
2526
</properties>
2627

2728
<body>

src/site/xdoc/release_1_0.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
-->
18-
<document>
18+
<document xmlns="http://maven.apache.org/XDOC/2.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
1921
<properties>
2022
<title>Release notes for CLI 1.0</title>
2123
<author email="dev@commons.apache.org">Commons Documentation Team</author>

src/site/xdoc/release_1_2.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
-->
18-
<document>
18+
<document xmlns="http://maven.apache.org/XDOC/2.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
1921
<properties>
2022
<title>Release notes for CLI 1.2</title>
2123
<author email="dev@commons.apache.org">Commons Documentation Team</author>

src/site/xdoc/release_1_3.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
-->
18-
<document>
18+
<document xmlns="http://maven.apache.org/XDOC/2.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
1921
<properties>
2022
<title>Release notes for CLI 1.3</title>
2123
<author email="dev@commons.apache.org">Commons Documentation Team</author>

src/site/xdoc/release_1_3_1.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
-->
18-
<document>
18+
<document xmlns="http://maven.apache.org/XDOC/2.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
1921
<properties>
2022
<title>Release notes for CLI 1.3.1</title>
2123
<author email="dev@commons.apache.org">Commons Documentation Team</author>

src/site/xdoc/release_1_4.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
-->
18-
<document>
18+
<document xmlns="http://maven.apache.org/XDOC/2.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
1921
<properties>
2022
<title>Release notes for CLI 1.4</title>
2123
<author email="dev@commons.apache.org">Commons Documentation Team</author>

src/site/xdoc/upgrading-1.0-to-1.1.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
-->
18-
<document>
18+
<document xmlns="http://maven.apache.org/XDOC/2.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
1921
<properties>
2022
<title>Upgrading from 1.0 to 1.1</title>
2123
<author email="dev@commons.apache.org">Commons Documentation Team</author>

src/site/xdoc/usage.xml

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@
1717
specific language governing permissions and limitations
1818
under the License.
1919
-->
20-
<document>
21-
20+
<document xmlns="http://maven.apache.org/XDOC/2.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
2223
<properties>
23-
<author email="dev@commons.apache.org">commons-dev</author>
2424
<title>Using Apache Commons CLI</title>
25+
<author email="dev@commons.apache.org">Apache Commons Team</author>
2526
</properties>
2627

2728
<body>
@@ -91,7 +92,9 @@ else {
9192
// print the date
9293
}</source>
9394
<p>
94-
<h4>Note.</h4>
95+
<em>Note.</em>
96+
</p>
97+
<p>
9598
As of version 1.5, the
9699
<code>DefaultParser</code>'s constructor now has an override with
97100
the signature <code>DefaultParser(final boolean allowPartialMatching)</code>.
@@ -221,10 +224,10 @@ Option find = Option.builder("find")
221224
.hasArgs()
222225
.valueSeparator('=')
223226
.build();</source>
224-
227+
<p>
225228
The map of properties specified by this option can later be retrieved by
226229
calling <code>getOptionProperties("D")</code> on the <code>CommandLine</code>.
227-
230+
</p>
228231
</subsection>
229232
<subsection name="Creating the Options">
230233
<p>
@@ -418,25 +421,27 @@ public static void main(String[] args) {
418421
} </source>
419422
<p>
420423
The value types natively supported by commons-cli are:
421-
<ul>
422-
<li>Object.class - The string value must be the name of a class with a no argument constructor</li>
423-
<li>Class.class - The string value must be the name of a class</li>
424-
<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>
425-
<li>File.class - The string value is the name of the file.</li>
426-
<li>Path.class - The string value is the name of a Path.</li>
427-
<li>Number.class - The string value is a number representation can can be converted into an Integer or a Double.</li>
428-
<li>URL.class - The string value is the textual representation of a URL</li>
429-
<li>FileInputStream.class - The string value is passed to <code>new FileInputStream(s)</code>.</li>
430-
<li>Long.class - The string value is a valid argument to <code>Long.parseLong()</code>.</li>
431-
<li>Integer.class - The string value is a valid argument to <code>Integer.parseInt()</code>.</li>
432-
<li>Short.class - The string value is a valid argument to <code>Short.parseShort()</code>.</li>
433-
<li>Byte.class - The string value is a valid argument to <code>Byte.parseByte()</code>.</li>
434-
<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>
435-
<li>Double.class - The string value is a valid argument to <code>Double.parseDouble()</code>.</li>
436-
<li>Float.class - The string value is a valid argument to <code>Float.parseFloat()</code>.</li>
437-
<li>BigInteger.class - The string value is a valid argument to <code>new BigInteger(s)</code>.</li>
438-
<li>BigDecimal.class - The string value is a valid argument to <code>new BigDecimal(s)</code>.</li>
439-
</ul>
424+
</p>
425+
<ul>
426+
<li>Object.class - The string value must be the name of a class with a no argument constructor</li>
427+
<li>Class.class - The string value must be the name of a class</li>
428+
<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>
429+
<li>File.class - The string value is the name of the file.</li>
430+
<li>Path.class - The string value is the name of a Path.</li>
431+
<li>Number.class - The string value is a number representation can can be converted into an Integer or a Double.</li>
432+
<li>URL.class - The string value is the textual representation of a URL</li>
433+
<li>FileInputStream.class - The string value is passed to <code>new FileInputStream(s)</code>.</li>
434+
<li>Long.class - The string value is a valid argument to <code>Long.parseLong()</code>.</li>
435+
<li>Integer.class - The string value is a valid argument to <code>Integer.parseInt()</code>.</li>
436+
<li>Short.class - The string value is a valid argument to <code>Short.parseShort()</code>.</li>
437+
<li>Byte.class - The string value is a valid argument to <code>Byte.parseByte()</code>.</li>
438+
<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>
439+
<li>Double.class - The string value is a valid argument to <code>Double.parseDouble()</code>.</li>
440+
<li>Float.class - The string value is a valid argument to <code>Float.parseFloat()</code>.</li>
441+
<li>BigInteger.class - The string value is a valid argument to <code>new BigInteger(s)</code>.</li>
442+
<li>BigDecimal.class - The string value is a valid argument to <code>new BigDecimal(s)</code>.</li>
443+
</ul>
444+
<p>
440445
Additional types may be added to the automatic parsing system by calling <code>TypeHandler.register(Class&lt;T&gt; clazz, Converter&lt;T&gt; converter)</code>.
441446
The <code>Class&lt;T&gt;</code> can be any defined class. The converter is a function that takes a <code>String</code> argument and returns an instance of
442447
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) {
580585
<p>
581586
The display of deprecated options may be changed through the use of the
582587
<code>HelpFormatter.Builder.setShowDeprecated()</code> method.
583-
<ul>
584-
<li>Calling <code>HelpFormatter.Builder.setShowDeprecated(false)</code> will disable the "[Deprecated]" tag.</li>
585-
<li>Calling <code>HelpFormatter.Builder.setShowDeprecated</code> with a <code>Function&lt;Option, String></code>
588+
</p>
589+
<ul>
590+
<li>Calling <code>HelpFormatter.Builder.setShowDeprecated(false)</code> will disable the "[Deprecated]" tag.</li>
591+
<li>Calling <code>HelpFormatter.Builder.setShowDeprecated</code> with a <code>Function&lt;Option, String></code>
586592
will use the output of the function as the description for the option.</li>
587-
</ul>
593+
</ul>
594+
<p>
588595
As an example of the second case above, changing the implementation of <code>doSomething</code> to
589596
<source>
590597
void doSomething(Options options) {

0 commit comments

Comments
 (0)