2525 </properties >
2626
2727 <body >
28- <section name =" Commons CLI " >
28+ <section name =" Commons CLI2 " >
2929 <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.
30+ CLI2 has been developed with the goals of clearer responsibilities and
31+ being more flexible than Commons CLI. The intention is that CLI2 should
32+ be able to model a far greater selection of interfaces and do so more
33+ completely, validating as much as possible.
3234 </p >
3335 <p >
34- Commons CLI supports different types of options:
35- </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 >
43- <p >
44- A typical help message displayed by Commons CLI looks like this:
45- </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 < 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 >
59- <p >
60- Check out the <a href =" introduction.html" >introduction</a > page for a detailed presentation.
36+ The redesigned CLI2 is rooted in the <code >org.apache.commons.cli2</code >
37+ package.
6138 </p >
6239 </section >
6340
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-
7641 <section name =" Documentation" >
7742 <p >
7843 A full <a href =" introduction.html" >User's Guide</a > is available
@@ -82,110 +47,29 @@ usage: ls
8247 The Javadoc API documents are available online:
8348 </p >
8449 <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 >
8850 <li ><a href =" apidocs/index.html" >CLI 2.0-SNAPSHOT (latest SVN)</a ></li >
8951 </ul >
9052 <p >
9153 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 >.
54+ <a href =" http://svn.apache.org/viewvc/commons/sandbox/cli2 /trunk/" >browsed</a >.
9355 </p >
9456 </section >
9557
9658 <section name =" Releases" >
9759 <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 >.
60+ CLI2 is a component in the Commons Sandbox and therefore has not had a release.
10561 </p >
10662 </section >
10763
10864 <section name =" Support" >
10965 <p >The <a href =" mail-lists.html" >commons mailing lists</a > act as the main support forum. The user list
11066 is suitable for most library usage queries. The dev list is intended for the development discussion. Please
11167 remember that the lists are shared between all commons components, so prefix your email subject by
112- <code >[cli ]</code >.</p >
68+ <code >[cli2 ]</code >.</p >
11369
11470 <p >Issues may be reported via the <a href =" issue-tracking.html" >ASF JIRA</a >.</p >
11571 </section >
11672
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- -->
18973 </body >
19074
19175</document >
0 commit comments