|
19 | 19 | --> |
20 | 20 | <document> |
21 | 21 |
|
22 | | - <properties> |
| 22 | + <properties> |
23 | 23 | <title>Home</title> |
24 | 24 | <author email="dev@commons.apache.org">commons-dev</author> |
25 | | - </properties> |
| 25 | + </properties> |
26 | 26 |
|
27 | 27 | <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. |
100 | 32 | </p> |
101 | 33 | <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: |
109 | 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> |
110 | 43 | <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: |
117 | 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> |
118 | 59 | <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. |
127 | 61 | </p> |
128 | 62 | </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"> |
130 | 77 | <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>. |
135 | 93 | </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> |
161 | 94 | </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 | + --> |
163 | 189 | </body> |
164 | 190 |
|
165 | 191 | </document> |
0 commit comments