Skip to content

Commit 416844c

Browse files
committed
Updated the site for CLI 1.2
Changed the main page to include a more detailed presentation of the component Removed the redundant pages (navigation.xml and cvs-usage.xml) git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@681071 13f79535-47bb-0310-9956-ffa450edef68
1 parent c0a339a commit 416844c

10 files changed

Lines changed: 290 additions & 224 deletions

File tree

src/site/site.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
-->
18-
<project name="CLI">
18+
<project name="Commons CLI">
1919
<bannerRight>
2020
<name>Commons CLI</name>
2121
<src>/images/logo.png</src>
2222
<href>/index.html</href>
2323
</bannerRight>
2424

2525
<body>
26-
<menu name="CLI">
26+
<menu name="Commons CLI">
2727
<item name="Overview" href="/index.html"/>
2828
<item name="Download" href="http://commons.apache.org/downloads/download_cli.cgi"/>
2929
<item name="Changes Report" href="/changes-report.html"/>
@@ -32,15 +32,14 @@
3232
<item name="Source Repository" href="/source-repository.html"/>
3333
</menu>
3434

35-
<menu name="CLI1 user guide">
35+
<menu name="CLI 1 User Guide">
3636
<item name="Getting started" href="/introduction.html"/>
3737
<item name="Usage scenarios" href="/usage.html"/>
3838
<item name="Option properties" href="/properties.html"/>
39-
<item name="Upgrading to 1.1" href="/upgrading-1.0-to-1.1.html"/>
40-
<item name="Javadoc (1.1)" href="api-release/index.html"/>
39+
<item name="Javadoc (1.2)" href="api-release/index.html"/>
4140
</menu>
4241

43-
<menu name="CLI2-dev user guide">
42+
<menu name="CLI 2 User Guide (dev)">
4443
<item name="Overview" href="/manual/index.html"/>
4544
<item name="Examples" href="/examples/index.html"/>
4645
<item name="Options" href="/manual/options.html"/>

xdocs/changes.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
<release version="1.2" date="in SVN" description="This is a maintenance release containing bug fixes.">
2626
<action type="fix" dev="ebourg" issue="CLI-137">
27-
The number of arguments defined for an option specifies the arguments per occurence of the option
28-
and not for all occurences. This was a major regression in CLI 1.1 which prevented the use of repeated options.
27+
The number of arguments defined for an option specifies the arguments per occurrence of the option
28+
and not for all occurrences. This was a major regression in CLI 1.1 which prevented the use of repeated options.
2929
</action>
3030
<action type="add" dev="ebourg">
3131
Added a getOptionProperties() method in the CommandLine class to retrieve easily the key/value pairs

xdocs/download_cli.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,35 +102,35 @@ limitations under the License.
102102
<ul class="downloads">
103103
<li class="group"><div class="links"><span class="label">Binary</span></div>
104104
<ul>
105-
<li class="download"><a href="[preferred]/commons/cli/binaries/commons-cli-1.1.tar.gz">1.1.tar.gz</a>
105+
<li class="download"><a href="[preferred]/commons/cli/binaries/commons-cli-1.2.tar.gz">1.2.tar.gz</a>
106106
<ul class="attributes">
107-
<li><span class="md5">[<a href="http://www.apache.org/dist/commons/cli/binaries/commons-cli-1.1.tar.gz.md5">md5</a>]</span>
108-
<span class="pgp">[<a href="http://www.apache.org/dist/commons/cli/binaries/commons-cli-1.1.tar.gz.asc">pgp</a>]</span>
107+
<li><span class="md5">[<a href="http://www.apache.org/dist/commons/cli/binaries/commons-cli-1.2.tar.gz.md5">md5</a>]</span>
108+
<span class="pgp">[<a href="http://www.apache.org/dist/commons/cli/binaries/commons-cli-1.2.tar.gz.asc">pgp</a>]</span>
109109
</li>
110110
</ul>
111111
</li>
112-
<li class="download"><a href="[preferred]/commons/cli/binaries/commons-cli-1.1.zip">1.1.zip</a>
112+
<li class="download"><a href="[preferred]/commons/cli/binaries/commons-cli-1.2.zip">1.2.zip</a>
113113
<ul class="attributes">
114-
<li><span class="md5">[<a href="http://www.apache.org/dist/commons/cli/binaries/commons-cli-1.1.zip.md5">md5</a>]</span>
115-
<span class="pgp">[<a href="http://www.apache.org/dist/commons/cli/binaries/commons-cli-1.1.zip.asc">pgp</a>]</span>
114+
<li><span class="md5">[<a href="http://www.apache.org/dist/commons/cli/binaries/commons-cli-1.2.zip.md5">md5</a>]</span>
115+
<span class="pgp">[<a href="http://www.apache.org/dist/commons/cli/binaries/commons-cli-1.2.zip.asc">pgp</a>]</span>
116116
</li>
117117
</ul>
118118
</li>
119119
</ul>
120120
</li>
121121
<li class="group"><div class="links"><span class="label">Source</span></div>
122122
<ul>
123-
<li class="download"><a href="[preferred]/commons/cli/source/commons-cli-1.1-src.tar.gz">1.1.tar.gz</a>
123+
<li class="download"><a href="[preferred]/commons/cli/source/commons-cli-1.2-src.tar.gz">1.2.tar.gz</a>
124124
<ul class="attributes">
125-
<li><span class="md5">[<a href="http://www.apache.org/dist/commons/cli/source/commons-cli-1.1-src.tar.gz.md5">md5</a>]</span>
126-
<span class="pgp">[<a href="http://www.apache.org/dist/commons/cli/source/commons-cli-1.1-src.tar.gz.asc">pgp</a>]</span>
125+
<li><span class="md5">[<a href="http://www.apache.org/dist/commons/cli/source/commons-cli-1.2-src.tar.gz.md5">md5</a>]</span>
126+
<span class="pgp">[<a href="http://www.apache.org/dist/commons/cli/source/commons-cli-1.2-src.tar.gz.asc">pgp</a>]</span>
127127
</li>
128128
</ul>
129129
</li>
130-
<li class="download"><a href="[preferred]/commons/cli/source/commons-cli-1.1-src.zip">1.1.zip</a>
130+
<li class="download"><a href="[preferred]/commons/cli/source/commons-cli-1.2-src.zip">1.2.zip</a>
131131
<ul class="attributes">
132-
<li><span class="md5">[<a href="http://www.apache.org/dist/commons/cli/source/commons-cli-1.1-src.zip.md5">md5</a>]</span>
133-
<span class="pgp">[<a href="http://www.apache.org/dist/commons/cli/source/commons-cli-1.1-src.zip.asc">pgp</a>]</span>
132+
<li><span class="md5">[<a href="http://www.apache.org/dist/commons/cli/source/commons-cli-1.2-src.zip.md5">md5</a>]</span>
133+
<span class="pgp">[<a href="http://www.apache.org/dist/commons/cli/source/commons-cli-1.2-src.zip.asc">pgp</a>]</span>
134134
</li>
135135
</ul>
136136
</li>

xdocs/index.xml

Lines changed: 152 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -19,147 +19,173 @@
1919
-->
2020
<document>
2121

22-
<properties>
22+
<properties>
2323
<title>Home</title>
2424
<author email="dev@commons.apache.org">commons-dev</author>
25-
</properties>
25+
</properties>
2626

2727
<body>
28-
<!-- ================================================== -->
29-
<section name="Commons CLI">
30-
<p>
31-
The Apache Commons CLI library provides an API for processing command line interfaces.
32-
</p>
33-
</section>
34-
<!-- ================================================== -->
35-
<section name="1.x vs 2.x?">
36-
<p>
37-
Commons CLI 1.0 was formed from the merger of ideas and code from three different libraries -
38-
Werken, Avalon and Optz. In dealing with the bugs and the feature requests a freshly designed and not backwards compatible
39-
CLI 2.0 was created, but never finished or released. Since then a CLI 1.1 bugfix release has been made.
40-
</p>
41-
<p>
42-
There are currently no plans to continue the 1.x line beyond bugfixes. The 2.x design is generally preferred and is in use,
43-
however there is no current activity to make a 2.0 release. To this end, the 1.1 release is recommended to most users
44-
while the 2.x line is recommended for anyone interested in helping to get this better API released.
45-
</p>
46-
</section>
47-
<!-- ================================================== -->
48-
<section name="Documentation">
49-
<p>
50-
A full <a href="introduction.html">User's Guide</a> is available
51-
as are various <a href="maven-reports.html">project reports</a>.
52-
</p>
53-
<p>
54-
The JavaDoc API documents are available online:
55-
</p>
56-
<ul>
57-
<li>The <a href="api-release/index.html">current release 1.1</a></li>
58-
<li>The <a href="api-1.0/index.html">previous version 1.0</a></li>
59-
<li>The <a href="apidocs/index.html">latest SVN (2.0-SNAPSHOT)</a></li>
60-
</ul>
61-
<p>
62-
The <a href="cvs-usage.html">subversion repository</a> can be
63-
<a href="http://svn.apache.org/viewvc/commons/proper/cli/trunk/">browsed</a>.
64-
</p>
65-
</section>
66-
<!-- ================================================== -->
67-
<section name="Releases">
68-
<p>
69-
The latest version is v1.1. -
70-
<a href="http://commons.apache.org/downloads/download_cli.cgi">Download now!</a><br />
71-
The <a href="upgrading-1.0-to-1.1.html">release notes</a> are also available.
72-
</p>
73-
<p>
74-
For previous releases, see the <a href="http://archive.apache.org/dist/commons/cli/">Apache Archive</a>
75-
</p>
76-
</section>
77-
<!-- ================================================== -->
78-
<section name="Support">
79-
<p>
80-
The <a href="mail-lists.html">commons mailing lists</a> act as the main support forum.
81-
The user list is suitable for most library usage queries.
82-
The dev list is intended for the development discussion.
83-
Please remember that the lists are shared between all commons components,
84-
so prefix your email by [cli].
85-
</p>
86-
<p>
87-
Issues may be reported via the <a href="issue-tracking.html">ASF JIRA</a>.
88-
</p>
89-
</section>
90-
<!-- ================================================== -->
91-
92-
<!-- <p>
93-
CLI1 was formed by the merger of ideas and code from three different
94-
libraries and allows most simple interfaces to be modelled. CLI1
95-
became increasingly difficult to maintain and develop further and so
96-
CLI2 has been developed with the goals of clearer responsibilities and
97-
being more flexible. The intention is that CLI2 should be able to
98-
model a far greater selection of interfaces and do so more completely,
99-
validating as much as possible.
28+
<section name="Commons CLI">
29+
<p>
30+
The Apache Commons CLI library provides an API for parsing command line options passed to programs.
31+
It's also able to print help messages detailing the options available for a command line tool.
10032
</p>
10133
<p>
102-
The redesigned CLI2 is rooted in the <code>org.apache.commons.cli2</code>
103-
package and the distribution retains the <code>org.apache.commons.cli</code>
104-
package so that the upgrade doesn't break old code. The CLI1 package
105-
should be regarded as deprecated to encourage the transition to the
106-
more flexible CLI2 framework but minor bug fixes and patches may be
107-
accepted to ensure that CLI1 based applications continue to function as
108-
expected.
34+
Commons CLI supports different types of options:
10935
</p>
36+
<ul>
37+
<li>POSIX like options (ie. <code>tar -zxvf foo.tar.gz</code>)</li>
38+
<li>GNU like long options (ie. <code>du --human-readable --max-depth=1</code>)</li>
39+
<li>Java like properties (ie. <code>java -Djava.awt.headless=true -Djava.net.useSystemProxies=true Foo</code>)</li>
40+
<li>Short options with value attached (ie. <code>gcc -O2 foo.c</code>)</li>
41+
<li>long options with single hyphen (ie. <code>ant -projecthelp</code>)</li>
42+
</ul>
11043
<p>
111-
The rest of the documentation is split into the following three sections:
112-
<ul>
113-
<li><a href="manual/index.html">CLI2</a> - a reference manual for version 2</li>
114-
<li><a href="introduction.html">CLI1</a> - documentation for version 1 </li>
115-
<li><a href="examples/index.html">Examples</a> - a selection of worked examples demonstrating CLI2 features</li>
116-
</ul>
44+
A typical help message displayed by Commons CLI looks like this:
11745
</p>
46+
<source>
47+
usage: ls
48+
-A,--almost-all do not list implied . and ..
49+
-a,--all do not hide entries starting with .
50+
-B,--ignore-backups do not list implied entried ending with ~
51+
-b,--escape print octal escapes for nongraphic characters
52+
--block-size &lt;SIZE> use SIZE-byte blocks
53+
-c with -lt: sort by, and show, ctime (time of last
54+
modification of file status information) with
55+
-l:show ctime and sort by name otherwise: sort
56+
by ctime
57+
-C list entries by columns
58+
</source>
11859
<p>
119-
The latest version of this documentation is available on the web:
120-
<ul>
121-
<li><a href="http://commons.apache.org/cli/">http://commons.apache.org/cli/</a></li>
122-
<li>
123-
<a href="http://commons.apache.org/cli/commons-cli.pdf">http://commons.apache.org/cli/commons-cli.pdf</a>
124-
<a href="http://commons.apache.org/cli/commons-cli.pdf"><img border="0" src="images/pdf.gif"/></a>
125-
</li>
126-
</ul>
60+
Check out the <a href="introduction.html">introduction</a> page for a detailed presentation.
12761
</p>
12862
</section>
129-
<section name="Dependancies">
63+
64+
<section name="1.x vs 2.x?">
65+
<p>Commons CLI 1.0 was formed from the merger of ideas and code from three different libraries -
66+
Werken, Avalon and Optz. In dealing with the bugs and the feature requests a freshly designed and not
67+
backwards compatible CLI 2 was created, but never finished or released. Since then bugfix releases
68+
have been made for CLI 1.</p>
69+
70+
<p>The current plan is to maintain the 1.x line until CLI 2 is officially released. The 2.x design is generally
71+
preferred and is in use, however there is no current activity to make a 2.0 release. To this end, the 1.2
72+
release is recommended to most users while the 2.x line is recommended for anyone interested in helping to get
73+
this better API released.</p>
74+
</section>
75+
76+
<section name="Documentation">
13077
<p>
131-
The generated list of <a href="dependencies.html">dependencies</a>
132-
lists the libraries needed to compile and test Commons CLI. To use
133-
the precompiled distribution none of these dependancies are strictly
134-
necessary. The following is a breakdown of what is required and when:
78+
A full <a href="introduction.html">User's Guide</a> is available
79+
as are various<a href="maven-reports.html">project reports</a>.
80+
</p>
81+
<p>
82+
The Javadoc API documents are available online:
83+
</p>
84+
<ul>
85+
<li><a href="api-release/index.html">CLI 1.2 (current release)</a></li>
86+
<li><a href="api-1.1/index.html">CLI 1.1</a></li>
87+
<li><a href="api-1.0/index.html">CLI 1.0</a></li>
88+
<li><a href="apidocs/index.html">CLI 2.0-SNAPSHOT (latest SVN)</a></li>
89+
</ul>
90+
<p>
91+
The <a href="source-repository.html">Subversion repository</a> can be
92+
<a href="http://svn.apache.org/viewvc/commons/proper/cli/trunk/">browsed</a>.
13593
</p>
136-
<table>
137-
<tr>
138-
<th>Library</th><th>Usage</th>
139-
</tr>
140-
<tr>
141-
<td>Java 1.2</td>
142-
<td>This is the minimum java level needed to use CLI2</td>
143-
</tr>
144-
<tr>
145-
<td>Java 1.4</td>
146-
<td>Needed if the PreferencesCommandLine is needed</td>
147-
</tr>
148-
<tr>
149-
<td>commons-lang</td>
150-
<td>Needed if the CLI1 package is being used</td>
151-
</tr>
152-
<tr>
153-
<td>jdepend</td>
154-
<td>Needed to build and test CLI2 only</td>
155-
</tr>
156-
<tr>
157-
<td>junit</td>
158-
<td>Needed to build and test CLI1 and CLI2</td>
159-
</tr>
160-
</table>
16194
</section>
162-
-->
95+
96+
<section name="Releases">
97+
<p>
98+
The latest version is v1.2. -
99+
<a href="http://commons.apache.org/downloads/download_cli.cgi">Download now!</a>
100+
<br/>
101+
The <a href="release_1_2.html">release notes</a> are also available.
102+
</p>
103+
<p>
104+
For previous releases, see the <a href="http://archive.apache.org/dist/commons/cli/">Apache Archive</a>.
105+
</p>
106+
</section>
107+
108+
<section name="Support">
109+
<p>The <a href="mail-lists.html">commons mailing lists</a> act as the main support forum. The user list
110+
is suitable for most library usage queries. The dev list is intended for the development discussion. Please
111+
remember that the lists are shared between all commons components, so prefix your email subject by
112+
<code>[cli]</code>.</p>
113+
114+
<p>Issues may be reported via the <a href="issue-tracking.html">ASF JIRA</a>.</p>
115+
</section>
116+
117+
118+
<!-- <p>
119+
CLI1 was formed by the merger of ideas and code from three different
120+
libraries and allows most simple interfaces to be modelled. CLI1
121+
became increasingly difficult to maintain and develop further and so
122+
CLI2 has been developed with the goals of clearer responsibilities and
123+
being more flexible. The intention is that CLI2 should be able to
124+
model a far greater selection of interfaces and do so more completely,
125+
validating as much as possible.
126+
</p>
127+
<p>
128+
The redesigned CLI2 is rooted in the <code>org.apache.commons.cli2</code>
129+
package and the distribution retains the <code>org.apache.commons.cli</code>
130+
package so that the upgrade doesn't break old code. The CLI1 package
131+
should be regarded as deprecated to encourage the transition to the
132+
more flexible CLI2 framework but minor bug fixes and patches may be
133+
accepted to ensure that CLI1 based applications continue to function as
134+
expected.
135+
</p>
136+
<p>
137+
The rest of the documentation is split into the following three sections:
138+
<ul>
139+
<li><a href="manual/index.html">CLI2</a> - a reference manual for version 2</li>
140+
<li><a href="introduction.html">CLI1</a> - documentation for version 1 </li>
141+
<li><a href="examples/index.html">Examples</a> - a selection of worked examples demonstrating CLI2 features</li>
142+
</ul>
143+
</p>
144+
<p>
145+
The latest version of this documentation is available on the web:
146+
<ul>
147+
<li><a href="http://commons.apache.org/cli/">http://commons.apache.org/cli/</a></li>
148+
<li>
149+
<a href="http://commons.apache.org/cli/commons-cli.pdf">http://commons.apache.org/cli/commons-cli.pdf</a>
150+
<a href="http://commons.apache.org/cli/commons-cli.pdf"><img border="0" src="images/pdf.gif"/></a>
151+
</li>
152+
</ul>
153+
</p>
154+
</section>
155+
<section name="Dependancies">
156+
<p>
157+
The generated list of <a href="dependencies.html">dependencies</a>
158+
lists the libraries needed to compile and test Commons CLI. To use
159+
the precompiled distribution none of these dependancies are strictly
160+
necessary. The following is a breakdown of what is required and when:
161+
</p>
162+
<table>
163+
<tr>
164+
<th>Library</th><th>Usage</th>
165+
</tr>
166+
<tr>
167+
<td>Java 1.2</td>
168+
<td>This is the minimum java level needed to use CLI2</td>
169+
</tr>
170+
<tr>
171+
<td>Java 1.4</td>
172+
<td>Needed if the PreferencesCommandLine is needed</td>
173+
</tr>
174+
<tr>
175+
<td>commons-lang</td>
176+
<td>Needed if the CLI1 package is being used</td>
177+
</tr>
178+
<tr>
179+
<td>jdepend</td>
180+
<td>Needed to build and test CLI2 only</td>
181+
</tr>
182+
<tr>
183+
<td>junit</td>
184+
<td>Needed to build and test CLI1 and CLI2</td>
185+
</tr>
186+
</table>
187+
</section>
188+
-->
163189
</body>
164190

165191
</document>

0 commit comments

Comments
 (0)