commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roxspr...@apache.org
Subject svn commit: r209516 [1/4] - in /jakarta/commons/proper/cli/branches/CLI_1_BRANCH: ./ src/conf/ src/java/org/apache/commons/cli/ src/media/ src/test/org/apache/commons/cli/ xdocs/ xdocs/images/ xdocs/style/
Date Wed, 06 Jul 2005 21:34:30 GMT
Author: roxspring
Date: Wed Jul  6 14:34:26 2005
New Revision: 209516

URL: http://svn.apache.org/viewcvs?rev=209516&view=rev
Log:
Merged changes from trunk to 1.0 branch.  The following revision ranges were merged:

129848:129855
129856:129857
129864:129866
129868:129870
129871:129874
129944:129947
129949:129956
129979:129980
129981:129982
129993:129994
130004:130006
130024:130025
130044:130045
130046:130047
130067:130072
130073:130074
130075:130076
130076:130077
130087:130089
130107:130114
149178:149179
149295:149296
155292:155293
155403:155404
155482:155483
160398:160399
179921:179922

Added:
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/NOTICE.txt   (props changed)
      - copied unchanged from r130006, jakarta/commons/proper/cli/trunk/NOTICE.txt
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/media/
      - copied from r129956, jakarta/commons/proper/cli/trunk/src/media/
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/media/logo.xcf
      - copied unchanged from r129956, jakarta/commons/proper/cli/trunk/src/media/logo.xcf
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/ArgumentIsOptionTest.java   (props changed)
      - copied unchanged from r130114, jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli/ArgumentIsOptionTest.java
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/LongOptionWithShort.java   (props changed)
      - copied unchanged from r130114, jakarta/commons/proper/cli/trunk/src/test/org/apache/commons/cli/LongOptionWithShort.java
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/xdocs/images/logo.jpg
      - copied unchanged from r130077, jakarta/commons/proper/cli/trunk/xdocs/images/logo.jpg
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/xdocs/images/logo.png
      - copied unchanged from r129956, jakarta/commons/proper/cli/trunk/xdocs/images/logo.png
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/xdocs/style/
      - copied from r129956, jakarta/commons/proper/cli/trunk/xdocs/style/
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/xdocs/style/project.css   (props changed)
      - copied unchanged from r129956, jakarta/commons/proper/cli/trunk/xdocs/style/project.css
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/xdocs/versions_and_branches.xml   (props changed)
      - copied unchanged from r129956, jakarta/commons/proper/cli/trunk/xdocs/versions_and_branches.xml
Modified:
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/.cvsignore
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/LICENSE.txt   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/README.txt   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/RELEASE-NOTES.txt   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/build-gump.xml   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/build.xml   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/gump.xml   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/maven.xml   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/project.properties   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/project.xml   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/conf/MANIFEST.MF   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/AlreadySelectedException.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/BasicParser.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/CommandLine.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/CommandLineParser.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/GnuParser.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/HelpFormatter.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/MissingArgumentException.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/MissingOptionException.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/Option.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/OptionBuilder.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/OptionGroup.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/OptionValidator.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/Options.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/ParseException.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/Parser.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/PatternOptionBuilder.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/PosixParser.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/TypeHandler.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/UnrecognizedOptionException.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/Util.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/overview.html   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/package.html   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/ApplicationTest.java   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/BugsTest.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/BuildTest.java   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/GnuParseTest.java   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/HelpFormatterExamples.java   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/OptionBuilderTest.java   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/OptionGroupTest.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/OptionsTest.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/ParseRequiredTest.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/ParseTest.java   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/PatternOptionBuilderTest.java   (props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/TestHelpFormatter.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/ValueTest.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/test/org/apache/commons/cli/ValuesTest.java   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/xdocs/index.xml   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/xdocs/introduction.xml   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/xdocs/navigation.xml   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/xdocs/properties.xml   (contents, props changed)
    jakarta/commons/proper/cli/branches/CLI_1_BRANCH/xdocs/usage.xml   (contents, props changed)

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Jul  6 14:34:26 2005
@@ -4,3 +4,5 @@
 velocity.log
 .project
 maven.log
+.classpath
+jcoverage.ser

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/.cvsignore
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/.cvsignore?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
Binary files - no diff available.

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/LICENSE.txt
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/LICENSE.txt?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
--- jakarta/commons/proper/cli/branches/CLI_1_BRANCH/LICENSE.txt (original)
+++ jakarta/commons/proper/cli/branches/CLI_1_BRANCH/LICENSE.txt Wed Jul  6 14:34:26 2005
@@ -1,60 +1,202 @@
-/*
- * $Header: /home/cvs/jakarta-commons/LICENSE,v 1.4 2002/04/11 13:24:02 dion Exp $
- * $Revision: 1.4 $
- * $Date: 2002/04/11 13:24:02 $
- *
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Commons", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   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.

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/LICENSE.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/NOTICE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/NOTICE.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/README.txt
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/README.txt?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
--- jakarta/commons/proper/cli/branches/CLI_1_BRANCH/README.txt (original)
+++ jakarta/commons/proper/cli/branches/CLI_1_BRANCH/README.txt Wed Jul  6 14:34:26 2005
@@ -24,11 +24,11 @@
 
 Maven can be found here :
 
-  http://jakarta.apache.org/turbine/maven/
+  http://maven.apache.org
 
 and to build and test the system use:
 
-  maven java:jar
+  maven jar:jar
 
 The system will build and test itself.
 

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/README.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/RELEASE-NOTES.txt
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Jul  6 14:34:26 2005
@@ -1 +1 @@
-author date id revision
+Date Author Id Revision HeadURL

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/build-gump.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/build.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/build.xml?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
--- jakarta/commons/proper/cli/branches/CLI_1_BRANCH/build.xml (original)
+++ jakarta/commons/proper/cli/branches/CLI_1_BRANCH/build.xml Wed Jul  6 14:34:26 2005
@@ -1,15 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
+<!--build.xml generated by maven from project.xml version 2.0
+  on date August 18 2004, time 1029-->
+
 <project default="jar" name="commons-cli" basedir=".">
-  
-  <property name="defaulttargetdir" value="target"></property> 
-  <property name="classesdir" value="target/classes"></property>
-  <property name="testclassesdir" value="target/test-classes"></property>
-  <property name="testreportdir" value="target/test-reports"></property>
-  <property name="distdir" value="dist"></property>
-  <property name="javadocdir" value="target/docs/apidocs"></property>
-  <property name="final.name" value="commons-cli-1.0-beta-2-dev"></property>
-  
+  <property name="defaulttargetdir" value="target">
+  </property>
+  <property name="libdir" value="${defaulttargetdir}/lib">
+  </property>
+  <property name="classesdir" value="${defaulttargetdir}/classes">
+  </property>
+  <property name="testclassesdir" value="${defaulttargetdir}/test-classes">
+  </property>
+  <property name="testclassesdir" value="${defaulttargetdir}/test-classes">
+  </property>
+  <property name="testreportdir" value="${defaulttargetdir}/test-reports">
+  </property>
+  <property name="distdir" value="dist">
+  </property>
+  <property name="javadocdir" value="dist/docs/api">
+  </property>
+  <property name="final.name" value="commons-cli-2.0">
+  </property>
   <target name="init" description="o Initializes some properties">
 
     <condition property="noget">
@@ -31,12 +43,19 @@
         </fileset>
       </classpath>
     </javac>
-
-    
-    <jar jarfile="target/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}"></jar>
-
+    <mkdir dir="${classesdir}/org/apache/commons/cli2">
+    </mkdir>
+    <copy todir="${classesdir}/org/apache/commons/cli2">
+      <fileset dir="src/java/org/apache/commons/cli2">
+        <include name="**/*.properties">
+        </include>
+      </fileset>
+    </copy>
+  </target>
+  <target name="jar" description="o Create the jar" depends="compile,test">
+    <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}">
+    </jar>
   </target>
-  
   <target name="clean" description="o Clean up the generated directories">
     <delete dir="${defaulttargetdir}"></delete>
     <delete dir="${distdir}"></delete>
@@ -109,17 +128,17 @@
     <tstamp>
       <format pattern="2002-yyyy" property="year"></format>
     </tstamp>
- 
-    <property name="copyright" value="Copyright &amp;copy;  Apache Software Foundation. All Rights Reserved."></property>
- 
-    <property name="title" value="CLI 1.0-beta-2-dev API"></property>
- 
+    <property name="copyright" value="Copyright &amp;copy;  Apache Software Foundation. All Rights Reserved.">
+    </property>
+    <property name="title" value="CLI 2.0 API">
+    </property>
     <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="src/java" packagenames="org.apache.commons.cli.*">
       <classpath>
         <fileset dir="lib">
           <include name="*.jar"></include>
         </fileset>
-        <pathelement location="target/${final.name}.jar"></pathelement>
+        <pathelement location="${defaulttargetdir}/${final.name}.jar">
+        </pathelement>
       </classpath>
     </javadoc>
  

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/build.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/gump.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/gump.xml?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
--- jakarta/commons/proper/cli/branches/CLI_1_BRANCH/gump.xml (original)
+++ jakarta/commons/proper/cli/branches/CLI_1_BRANCH/gump.xml Wed Jul  6 14:34:26 2005
@@ -2,39 +2,36 @@
 
 
   <description>Commons CLI</description>
-  <url href="http://jakarta.apache.org/commons/sandbox/cli.html"/>
-  
-  <cvs repository="jakarta"/>
-  
-  <!-- This is really the cvs module. We need to change this but -->
-  <!-- I will leave this for now until everything works.         -->
-  
+  <url href="http://jakarta.apache.org/commons/cli/">
+  </url>
+  <cvs module="jakarta-commons/cli" repository="jakarta">
+  </cvs>
   <project name="commons-cli">
-    
-    <!-- Standard Maven target to produce Javadocs, source -->
-    <!-- and binary distributions.                         -->
-    <ant buildfile="build-gump.xml" target="jar">
-      <property name="maven.final.name" value="commons-cli-@@DATE@@"/>
-    </ant>
-
+    <maven goal="jar">
+      <property name="final.name" value="commons-cli-@@DATE@@">
+      </property>
+    </maven>
     <package>org.apache.commons.cli</package>
-
-    <!-- All Maven projects need Ant and Xerces to build. -->
-    <depend project="jakarta-ant"/>
-    <depend project="xml-xerces"/>
-
-    <depend project="commons-logging"/>
-    <depend project="commons-lang"/>
-
-    <work nested="target/classes"/>
-    <home nested="target"/>
-    <jar name="commons-cli-@@DATE@@.jar"/>
-    <javadoc nested="docs/apidocs"/>
-
-    <nag from="Maven Developers &lt;turbine-maven-dev@jakarta.apache.org&gt;"
-         to="commons-dev@jakarta.apache.org"/>
-
-    
+    <depend project="commons-lang">
+    </depend>
+    <depend project="jakarta-ant">
+    </depend>
+    <depend project="jdepend">
+    </depend>
+    <depend project="junit">
+    </depend>
+    <depend project="xml-xerces">
+    </depend>
+    <work nested="target/classes">
+    </work>
+    <home nested="target">
+    </home>
+    <jar name="commons-cli-@@DATE@@.jar">
+    </jar>
+    <javadoc module="jakarta-commons" nested="target/docs/apidocs">
+    </javadoc>
+    <nag to="commons-dev@jakarta.apache.org" from="commons-cli development &lt;commons-dev@jakarta.apache.org&gt;">
+    </nag>
   </project>
   
 </module>

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/gump.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/maven.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/maven.xml?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
--- jakarta/commons/proper/cli/branches/CLI_1_BRANCH/maven.xml (original)
+++ jakarta/commons/proper/cli/branches/CLI_1_BRANCH/maven.xml Wed Jul  6 14:34:26 2005
@@ -1,4 +1,60 @@
-<project default="java:jar"
+<project default="jar:jar"
   xmlns:j="jelly:core">
+<!--
+Copyright 2002-2004 The Apache Software Foundation.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+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.
+-->
+
+  <!-- ================================================================== -->
+  <!-- START : C O M M O N S - B U I L D                                  -->
+  <!-- ================================================================== -->
+  <!-- Required: Look and Feel for documentation within distributions     -->
+  <!-- ================================================================== -->
+  <postGoal name="xdoc:copy-resources">
+    <copy todir="${basedir}/target/docs/style/" failonerror="false">
+      <fileset dir="${basedir}/../commons-build/xdocs/style">
+        <include name='**/*'/>
+        <exclude name='**/CVS/**'/>
+      </fileset>
+    </copy>
+  </postGoal>
+  <!-- ================================================================== -->
+  <!-- END: C O M M O N S - B U I L D                                     -->
+  <!-- ================================================================== -->
+
+  <!-- Ensures that the conf directory and NOTICE.txt are included in the
+       source distro.
+   -->
+  <postGoal name="dist:prepare-src-filesystem">
+    <copy todir="${maven.dist.src.assembly.dir}">
+      <fileset file="${basedir}/NOTICE.txt"/>
+    </copy>
+  </postGoal>
+
+  <!-- Ensures that NOTICE.txt is added to the binary distro -->
+  <preGoal name="dist:build-bin">
+    <copy todir="${maven.dist.bin.assembly.dir}">
+      <fileset file="${basedir}/NOTICE.txt"/>
+    </copy>
+  </preGoal>
+
+ <preGoal name="dist:prepare-bin-filesystem">
+   <attainGoal name="ant:generate-build"/>
+ </preGoal>
+
+ <preGoal name="dist:prepare-src-filesystem">
+   <attainGoal name="ant:generate-build"/>
+ </preGoal>
 
 </project>

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/maven.xml
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Jul  6 14:34:26 2005
@@ -1 +1 @@
-author date id revision
+Date Author Id Revision HeadURL

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/project.properties
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/project.properties?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
--- jakarta/commons/proper/cli/branches/CLI_1_BRANCH/project.properties (original)
+++ jakarta/commons/proper/cli/branches/CLI_1_BRANCH/project.properties Wed Jul  6 14:34:26 2005
@@ -1,32 +1,24 @@
 # -------------------------------------------------------------------
 # P R O J E C T  P R O P E R T I E S
 # -------------------------------------------------------------------
+maven.changelog.factory=org.apache.maven.svnlib.SvnChangeLogFactory
 
 compile.debug = on
 compile.optimize = off
 compile.deprecation = off
 
+maven.compile.source=1.3
+maven.compile.target=1.3
+
 maven.jarResources.basedir=${basedir}/src/java
  
-# coding standards
-
-maven.checkstyle.rcurly = ignore
-maven.checkstyle.lcurly.type = ignore
-maven.checkstyle.lcurly.method = ignore
-maven.checkstyle.lcurly.other = ignore
-maven.checkstyle.header.file = LICENSE.txt
-maven.checkstyle.header.ignore.line = 1,2,3,4
-maven.checkstyle.const.pattern = ^[A-Z0-9_]*$
-maven.checkstyle.static.pattern = ^[a-zA-Z][a-zA-Z0-9_]*$
-maven.checkstyle.member.pattern = ^[_]?[a-z]?[a-zA-Z0-9]*$
-maven.checkstyle.ignore.line.len.pattern = ^[ \* \$]+[.]*
-
-maven.checkstyle.javadoc.scope = protected
-
-# disable these non-critical errors to highlight
-# more important ones like missing javadoc
+# use turbine coding standards
+maven.checkstyle.format = turbine
 
-maven.checkstyle.max.line.len = 100
-maven.checkstyle.ignore.whitespace = true
-maven.checkstyle.ignore.public.in.interface = true
+maven.xdoc.jsl=../commons-build/commons-site.jsl
+maven.xdoc.date=left
+maven.xdoc.version=${pom.currentVersion}
+maven.xdoc.developmentProcessUrl=http://jakarta.apache.org/commons/charter.html
+maven.xdoc.poweredby.image=maven-feather.png
 
+maven.javadoc.links=http://java.sun.com/j2se/1.3/docs/api/

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/project.properties
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/project.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/project.xml?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
--- jakarta/commons/proper/cli/branches/CLI_1_BRANCH/project.xml (original)
+++ jakarta/commons/proper/cli/branches/CLI_1_BRANCH/project.xml Wed Jul  6 14:34:26 2005
@@ -1,20 +1,75 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright 2001-2004 The Apache Software Foundation
 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   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.
+-->
 <project>
-  <extend>../project.xml</extend>
+  <pomVersion>3</pomVersion>
   <id>commons-cli</id>
   <name>CLI</name>
-
   <currentVersion>1.0</currentVersion>
   <inceptionYear>2002</inceptionYear>
   <shortDescription>Commons CLI</shortDescription>
-  <gumpRepositoryId>jakarta</gumpRepositoryId>
-  <logo>/images/1x1.gif</logo>
-  
   <description>
-  	Commons CLI provides a simple API for working with the command line arguments and options.
+    Commons CLI provides a simple API for presenting, proecessing and
+    validating a command line interface.
   </description>
+  <logo>/images/logo.jpg</logo>
+
+  <url>http://jakarta.apache.org/commons/${pom.artifactId.substring(8)}/</url>
+  <package>org.apache.commons.${pom.artifactId.substring(8)}</package>
+
+  <organization>
+    <name>The Apache Software Foundation</name>
+    <url>http://jakarta.apache.org</url>
+    <logo>http://jakarta.apache.org/images/original-jakarta-logo.gif</logo>
+  </organization>
+  
+  <licenses>
+	<license>
+    	<name>The Apache Software License, Version 2.0</name>
+    	<url>/LICENSE.txt</url>
+    	<distribution>repo</distribution>
+	</license>
+  </licenses>
   
+  <gumpRepositoryId>jakarta</gumpRepositoryId>
+  <issueTrackingUrl>http://issues.apache.org/bugzilla/</issueTrackingUrl>
+  <siteAddress>jakarta.apache.org</siteAddress>
+  <siteDirectory>/www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}/</siteDirectory>
+  <distributionDirectory>/www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}/</distributionDirectory>
+
+  <repository>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk</connection>
+    <url>http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk</url>
+  </repository>
+
+  <mailingLists>
+    <mailingList>
+      <name>Commons Dev List</name>
+      <subscribe>commons-dev-subscribe@jakarta.apache.org</subscribe>
+      <unsubscribe>commons-dev-unsubscribe@jakarta.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/eyebrowse/SummarizeList?listName=commons-dev@jakarta.apache.org</archive>
+    </mailingList>
+    <mailingList>
+      <name>Commons User List</name>
+      <subscribe>commons-user-subscribe@jakarta.apache.org</subscribe>
+      <unsubscribe>commons-user-unsubscribe@jakarta.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/eyebrowse/SummarizeList?listName=commons-user@jakarta.apache.org</archive>
+    </mailingList>
+  </mailingLists>
+
   <developers>
     <developer>
       <name>James Strachan</name>
@@ -27,17 +82,29 @@
       <id>bob</id>
       <email>bob@werken.com</email>
       <organization>Werken</organization>
+      <roles>
+        <role>contributed ideas and code from werken.opt</role>
+      </roles>
     </developer>
     <developer>
       <name>John Keyes</name>
       <id>jkeyes</id>
       <email>jbjk@mac.com</email>
       <organization>integral Source</organization>
+      <roles>
+        <role>contributed ideas and code from Optz</role>
+      </roles>
     </developer>
   </developers>
 
   <contributors>
-    <!-- Helped in merging Avalon CLI -->
+    <contributor>
+      <name>Peter Donald</name>
+      <id>donaldp</id>
+      <roles>
+        <role>contributed ideas and code from Avalon Excalibur's cli package</role>
+      </roles>
+    </contributor>
     <contributor>
       <name>Berin Loritsch</name>
       <email>bloritsch@apache.org</email>
@@ -46,7 +113,6 @@
         <role>helped in the Avalon CLI merge</role>
       </roles>
     </contributor>
-    <!-- Supplied patch -->
     <contributor>
       <name>Peter Maddocks</name>
       <email>peter_maddocks@hp.com</email>
@@ -58,7 +124,7 @@
   </contributors>
 
   <dependencies>
-    
+
     <dependency>
       <id>commons-logging</id>
       <version>1.0</version>
@@ -68,20 +134,50 @@
       <id>commons-lang</id>
       <version>1.0</version>
     </dependency>
-  
+
     <dependency>
       <id>junit</id>
-      <version>3.7</version>
+      <version>3.8.1</version>
     </dependency>
-  
+
   </dependencies>
-  
+
   <build>
+    <nagEmailAddress>commons-dev@jakarta.apache.org</nagEmailAddress>
+    <sourceDirectory>src/java</sourceDirectory>
+    <unitTestSourceDirectory>src/test</unitTestSourceDirectory>
+    <integrationUnitTestSourceDirectory/>
+    <aspectSourceDirectory/>
+    <resources>
+        <resource>
+          <directory>src/java/org/apache/commons/cli2</directory>
+          <targetPath>org/apache/commons/cli2</targetPath>
+          <includes>
+            <include>**/*.properties</include>
+          </includes>
+        </resource>
+    </resources>
+    
     <!-- Unit test classes -->
     <unitTest>
       <includes>
-        <include>**/*Test*.java</include>
+        <include>**/Test*.java</include>
+        <include>**/*Test.java</include>
       </includes>
     </unitTest>
+
   </build>
+
+    <reports>
+  	<report>maven-changelog-plugin</report>
+   	<report>maven-changes-plugin</report>
+    <report>maven-developer-activity-plugin</report>
+    <report>maven-file-activity-plugin</report>
+    <report>maven-javadoc-plugin</report>
+    <report>maven-jdepend-plugin</report>
+    <report>maven-junit-report-plugin</report>
+    <report>maven-jxr-plugin</report>
+    <report>maven-license-plugin</report>
+    <report>maven-tasklist-plugin</report>
+  </reports>
 </project>

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/project.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/conf/MANIFEST.MF
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/AlreadySelectedException.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/AlreadySelectedException.java?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
--- jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/AlreadySelectedException.java (original)
+++ jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/AlreadySelectedException.java Wed Jul  6 14:34:26 2005
@@ -1,62 +1,17 @@
 /*
- * $Header: /home/cvs/jakarta-commons-sandbox/cli/src/java/org/apache/commons/cli/AlreadySelectedException.java,v 1.4 2002/06/06 09:37:26 jstrachan Exp $
- * $Revision: 1.4 $
- * $Date: 2002/06/06 09:37:26 $
- *
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Commons", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
+ * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
  */
 package org.apache.commons.cli;
 
@@ -67,7 +22,8 @@
  * @author John Keyes ( john at integralsource.com )
  * @see ParseException
  */
-public class AlreadySelectedException extends ParseException {
+public class AlreadySelectedException
+    extends ParseException {
 
     /** 
      * <p>Construct a new <code>AlreadySelectedException</code> 
@@ -75,7 +31,8 @@
      *
      * @param message the detail message
      */
-    public AlreadySelectedException( String message ) {
-        super( message );
+    public AlreadySelectedException(String message)
+    {
+        super(message);
     }
-}
+}
\ No newline at end of file

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/AlreadySelectedException.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/BasicParser.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/BasicParser.java?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
--- jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/BasicParser.java (original)
+++ jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/BasicParser.java Wed Jul  6 14:34:26 2005
@@ -1,62 +1,17 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//cli/src/java/org/apache/commons/cli/BasicParser.java,v 1.3 2002/09/19 22:59:43 jkeyes Exp $
- * $Revision: 1.3 $
- * $Date: 2002/09/19 22:59:43 $
- *
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Commons", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
+ * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
  */
 package org.apache.commons.cli;
 
@@ -82,9 +37,8 @@
      * when an non option is found.
      * @return The <code>arguments</code> String array.
      */
-    protected String[] flatten( Options options, 
-                                String[] arguments, 
-                                boolean stopAtNonOption )
+    protected String[] flatten(Options options, String[] arguments, 
+                               boolean stopAtNonOption)
     {
         // just echo the arguments
         return arguments;

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/BasicParser.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Jul  6 14:34:26 2005
@@ -1 +1 @@
-author date id revision
+Date Author Id Revision HeadURL

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/CommandLine.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/CommandLine.java?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
--- jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/CommandLine.java (original)
+++ jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/CommandLine.java Wed Jul  6 14:34:26 2005
@@ -1,71 +1,25 @@
 /*
- * $Header: /home/cvs/jakarta-commons-sandbox/cli/src/java/org/apache/commons/cli/CommandLine.java,v 1.4 2002/06/06 22:32:37 bayard Exp $
- * $Revision: 1.4 $
- * $Date: 2002/06/06 22:32:37 $
- *
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Commons", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
+ * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
  */
 package org.apache.commons.cli;
 
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.List;
 import java.util.LinkedList;
+import java.util.List;
 import java.util.Map;
 
 /** 
@@ -84,15 +38,15 @@
  * @author John Keyes (john at integralsource.com)
  */
 public class CommandLine {
-    
+
     /** the unrecognised options/arguments */
-    private List args    = new LinkedList();
+    private List args = new LinkedList();
 
     /** the processed options */
     private Map options = new HashMap();
 
     /** the option name map */
-    private Map names   = new HashMap();
+    private Map names = new HashMap();
 
     /** Map of unique options for ease to get complete list of options */
     private Map hashcodeMap = new HashMap();
@@ -103,17 +57,20 @@
     /**
      * <p>Creates a command line.</p>
      */
-    CommandLine() {
+    CommandLine()
+    {
+        // nothing to do
     }
-    
+
     /** 
      * <p>Query to see if an option has been set.</p>
      *
      * @param opt Short name of the option
      * @return true if set, false if not
      */
-    public boolean hasOption(String opt) {
-        return options.containsKey( opt );
+    public boolean hasOption(String opt)
+    {
+        return options.containsKey(opt);
     }
 
     /** 
@@ -122,8 +79,9 @@
      * @param opt character name of the option
      * @return true if set, false if not
      */
-    public boolean hasOption( char opt ) {
-        return hasOption( String.valueOf( opt ) );
+    public boolean hasOption(char opt)
+    {
+        return hasOption(String.valueOf(opt));
     }
 
     /**
@@ -132,11 +90,18 @@
      * @param opt the name of the option
      * @return the type of this <code>Option</code>
      */
-    public Object getOptionObject( String opt ) {
-        String res = getOptionValue( opt );
-        
-        Object type = ((Option)options.get(opt)).getType();
-        return res == null ? null : TypeHandler.createValue(res, type);
+    public Object getOptionObject(String opt)
+    {
+        String res = getOptionValue(opt);
+
+        if (!options.containsKey(opt))
+        {
+            return null;
+        }
+
+        Object type = ((Option) options.get(opt)).getType();
+
+        return (res == null)        ? null : TypeHandler.createValue(res, type);
     }
 
     /**
@@ -145,8 +110,9 @@
      * @param opt the name of the option
      * @return the type of opt
      */
-    public Object getOptionObject( char opt ) {
-        return getOptionObject( String.valueOf( opt ) );
+    public Object getOptionObject(char opt)
+    {
+        return getOptionObject(String.valueOf(opt));
     }
 
     /** 
@@ -156,8 +122,10 @@
      * @return Value of the argument if option is set, and has an argument,
      * otherwise null.
      */
-    public String getOptionValue( String opt ) {
+    public String getOptionValue(String opt)
+    {
         String[] values = getOptionValues(opt);
+
         return (values == null) ? null : values[0];
     }
 
@@ -168,8 +136,9 @@
      * @return Value of the argument if option is set, and has an argument,
      * otherwise null.
      */
-    public String getOptionValue( char opt ) {
-        return getOptionValue( String.valueOf( opt ) );
+    public String getOptionValue(char opt)
+    {
+        return getOptionValue(String.valueOf(opt));
     }
 
     /** 
@@ -179,19 +148,22 @@
      * @return Values of the argument if option is set, and has an argument,
      * otherwise null.
      */
-    public String[] getOptionValues( String opt ) {
-        List values = new java.util.ArrayList();
-
-        opt = Util.stripLeadingHyphens( opt );
+    public String[] getOptionValues(String opt)
+    {
+        opt = Util.stripLeadingHyphens(opt);
 
         String key = opt;
-        if( names.containsKey( opt ) ) {
-            key = (String)names.get( opt );
+
+        if (names.containsKey(opt))
+        {
+            key = (String) names.get(opt);
         }
 
-        if( options.containsKey( key ) ) {
-            return ((Option)options.get(key)).getValues();
+        if (options.containsKey(key))
+        {
+            return ((Option) options.get(key)).getValues();
         }
+
         return null;
     }
 
@@ -202,33 +174,39 @@
      * @return Values of the argument if option is set, and has an argument,
      * otherwise null.
      */
-    public String[] getOptionValues( char opt ) {
-        return getOptionValues( String.valueOf( opt ) );
+    public String[] getOptionValues(char opt)
+    {
+        return getOptionValues(String.valueOf(opt));
     }
-    
+
     /** 
      * <p>Retrieve the argument, if any, of an option.</p>
      *
      * @param opt name of the option
-     * @param defaultValue is the default value to be returned if the option is not specified
+     * @param defaultValue is the default value to be returned if the option 
+     * is not specified
      * @return Value of the argument if option is set, and has an argument,
      * otherwise <code>defaultValue</code>.
      */
-    public String getOptionValue( String opt, String defaultValue ) {
-        String answer = getOptionValue( opt );
-        return ( answer != null ) ? answer : defaultValue;
+    public String getOptionValue(String opt, String defaultValue)
+    {
+        String answer = getOptionValue(opt);
+
+        return (answer != null) ? answer : defaultValue;
     }
-    
+
     /** 
      * <p>Retrieve the argument, if any, of an option.</p>
      *
      * @param opt character name of the option
-     * @param defaultValue is the default value to be returned if the option is not specified
+     * @param defaultValue is the default value to be returned if the option 
+     * is not specified
      * @return Value of the argument if option is set, and has an argument,
      * otherwise <code>defaultValue</code>.
      */
-    public String getOptionValue( char opt, String defaultValue ) {
-        return getOptionValue( String.valueOf( opt ), defaultValue );
+    public String getOptionValue(char opt, String defaultValue)
+    {
+        return getOptionValue(String.valueOf(opt), defaultValue);
     }
 
     /** 
@@ -236,21 +214,25 @@
      *
      * @return remaining items passed in but not parsed as an array
      */
-    public String[] getArgs() {
-        String[] answer = new String[ args.size() ];
-        args.toArray( answer );
+    public String[] getArgs()
+    {
+        String[] answer = new String[args.size()];
+
+        args.toArray(answer);
+
         return answer;
     }
-    
+
     /** 
      * <p>Retrieve any left-over non-recognized options and arguments</p>
      *
      * @return remaining items passed in but not parsed as a <code>List</code>.
      */
-    public List getArgList() {
+    public List getArgList()
+    {
         return args;
     }
-    
+
     /** 
      * jkeyes
      * - commented out until it is implemented properly
@@ -258,16 +240,17 @@
      *
      * @return Stringified form of this object
      */
+
     /*
     public String toString() {
         StringBuffer buf = new StringBuffer();
-        
-        buf.append( "[ CommandLine: [ options: " );
-        buf.append( options.toString() );
-        buf.append( " ] [ args: ");
-        buf.append( args.toString() );
-        buf.append( " ] ]" );
-        
+            
+        buf.append("[ CommandLine: [ options: ");
+        buf.append(options.toString());
+        buf.append(" ] [ args: ");
+        buf.append(args.toString());
+        buf.append(" ] ]");
+            
         return buf.toString();
     }
     */
@@ -277,28 +260,33 @@
      *
      * @param arg the unrecognised option/argument.
      */
-    void addArg(String arg) {
-        args.add( arg );
+    void addArg(String arg)
+    {
+        args.add(arg);
     }
-        
+
     /**
      * <p>Add an option to the command line.  The values of 
      * the option are stored.</p>
      *
      * @param opt the processed option
      */
-    void addOption( Option opt ) {
-        hashcodeMap.put( new Integer( opt.hashCode() ), opt );
+    void addOption(Option opt)
+    {
+        hashcodeMap.put(new Integer(opt.hashCode()), opt);
 
         String key = opt.getKey();
-        if( key == null ) {
+
+        if (key == null)
+        {
             key = opt.getLongOpt();
         }
-        else {
-            names.put( opt.getLongOpt(), key );
+        else
+        {
+            names.put(opt.getLongOpt(), key);
         }
 
-        options.put( key, opt );
+        options.put(key, opt);
     }
 
     /**
@@ -307,7 +295,8 @@
      * @return an <code>Iterator</code> over the processed {@link Option} 
      * members of this {@link CommandLine}
      */
-    public Iterator iterator( ) {
+    public Iterator iterator()
+    {
         return hashcodeMap.values().iterator();
     }
 
@@ -316,14 +305,15 @@
      *
      * @return an array of the processed {@link Option}s.
      */
-    public Option[] getOptions( ) {
+    public Option[] getOptions()
+    {
         Collection processed = options.values();
 
+
         // reinitialise array
-        optionsArray = new Option[ processed.size() ];
+        optionsArray = new Option[processed.size()];
 
         // return the array
-        return (Option[]) processed.toArray( optionsArray );
+        return (Option[]) processed.toArray(optionsArray);
     }
-
-}
+}
\ No newline at end of file

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/CommandLine.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/CommandLineParser.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/CommandLineParser.java?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
--- jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/CommandLineParser.java (original)
+++ jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/CommandLineParser.java Wed Jul  6 14:34:26 2005
@@ -1,62 +1,17 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//cli/src/java/org/apache/commons/cli/CommandLineParser.java,v 1.5 2002/11/18 08:41:26 jkeyes Exp $
- * $Revision: 1.5 $
- * $Date$
- *
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Commons", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
+ * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
  */
 package org.apache.commons.cli;
 
@@ -70,7 +25,7 @@
  * @author John Keyes (john at integralsource.com)
  */
 public interface CommandLineParser {
-    
+
     /**
      * Parse the arguments according to the specified options.
      *
@@ -81,8 +36,8 @@
      * @throws ParseException if there are any problems encountered
      * while parsing the command line tokens.
      */
-    public CommandLine parse( Options options, String[] arguments )
-    throws ParseException;
+    CommandLine parse(Options options, String[] arguments)
+               throws ParseException;
 
     /**
      * Parse the arguments according to the specified options and
@@ -96,8 +51,9 @@
      * @throws ParseException if there are any problems encountered
      * while parsing the command line tokens.
      */
-    public CommandLine parse( Options options, String[] arguments, Properties props )
-    throws ParseException;
+    CommandLine parse(Options options, String[] arguments, 
+                      Properties properties)
+               throws ParseException;
 
     /**
      * Parse the arguments according to the specified options.
@@ -111,8 +67,9 @@
      * @throws ParseException if there are any problems encountered
      * while parsing the command line tokens.
      */
-    public CommandLine parse( Options options, String[] arguments, boolean stopAtNonOption )
-    throws ParseException;
+    CommandLine parse(Options options, String[] arguments, 
+                      boolean stopAtNonOption)
+               throws ParseException;
 
     /**
      * Parse the arguments according to the specified options and
@@ -127,6 +84,7 @@
      * @throws ParseException if there are any problems encountered
      * while parsing the command line tokens.
      */
-    public CommandLine parse( Options options, String[] arguments, Properties properties, boolean stopAtNonOption)
-    throws ParseException;
+    CommandLine parse(Options options, String[] arguments, 
+                      Properties properties, boolean stopAtNonOption)
+               throws ParseException;
 }

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/CommandLineParser.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Jul  6 14:34:26 2005
@@ -1 +1 @@
-author date id revision
+Date Author Id Revision HeadURL

Modified: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/GnuParser.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/GnuParser.java?rev=209516&r1=209515&r2=209516&view=diff
==============================================================================
--- jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/GnuParser.java (original)
+++ jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/GnuParser.java Wed Jul  6 14:34:26 2005
@@ -1,69 +1,21 @@
 /*
- * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//cli/src/java/org/apache/commons/cli/GnuParser.java,v 1.10 2002/09/19 22:59:43 jkeyes Exp $
- * $Revision: 1.10 $
- * $Date: 2002/09/19 22:59:43 $
- *
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Commons", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
+ * Copyright 1999-2001,2004 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
  */
 package org.apache.commons.cli;
 
-import java.util.Arrays;
 import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
 
 /**
  * The class GnuParser provides an implementation of the 
@@ -71,7 +23,7 @@
  *
  * @author John Keyes (john at integralsource.com)
  * @see Parser
- * @version $Revision: 1.10 $
+ * @version $Revision$
  */
 public class GnuParser extends Parser {
 
@@ -82,7 +34,8 @@
      * <p>Resets the members to their original state i.e. remove
      * all of <code>tokens</code> entries.
      */
-    private void init() {
+    private void init()
+    {
         tokens.clear();
     }
 
@@ -98,90 +51,123 @@
      *  </li>
      * </ol>
      * </p>
+     *
+     * @param options The Options to parse the arguments by.
+     * @param arguments The arguments that have to be flattened.
+     * @param stopAtNonOption specifies whether to stop 
+     * flattening when a non option has been encountered
+     * @return a String array of the flattened arguments
      */
-    protected String[] flatten( Options options, 
-                                String[] arguments, 
-                                boolean stopAtNonOption )
+    protected String[] flatten(Options options, String[] arguments, 
+                               boolean stopAtNonOption)
     {
         init();
+
         boolean eatTheRest = false;
         Option currentOption = null;
 
-        for( int i = 0; i < arguments.length; i++ ) {
-            if( "--".equals( arguments[i] ) ) {
+        for (int i = 0; i < arguments.length; i++)
+        {
+            if ("--".equals(arguments[i]))
+            {
                 eatTheRest = true;
-                tokens.add( "--" );
+                tokens.add("--");
             }
-            else if ( "-".equals( arguments[i] ) ) {
-                tokens.add( "-" );
+            else if ("-".equals(arguments[i]))
+            {
+                tokens.add("-");
             }
-            else if( arguments[i].startsWith( "-" ) ) {
-                Option option = options.getOption( arguments[i] );
+            else if (arguments[i].startsWith("-"))
+            {
+                Option option = options.getOption(arguments[i]);
 
                 // this is not an Option
-                if( option == null ) {
+                if (option == null)
+                {
                     // handle special properties Option
-                    Option specialOption = options.getOption( arguments[i].substring(0,2) );
-                    if( specialOption != null ) {
-                        tokens.add( arguments[i].substring(0,2) );
-                        tokens.add( arguments[i].substring(2) );
+                    Option specialOption = 
+                            options.getOption(arguments[i].substring(0, 2));
+
+                    if (specialOption != null)
+                    {
+                        tokens.add(arguments[i].substring(0, 2));
+                        tokens.add(arguments[i].substring(2));
                     }
-                    else if( stopAtNonOption ) {
+                    else if (stopAtNonOption)
+                    {
                         eatTheRest = true;
-                        tokens.add( arguments[i] );
+                        tokens.add(arguments[i]);
                     }
-                    else {
-                        tokens.add( arguments[i] );
+                    else
+                    {
+                        tokens.add(arguments[i]);
                     }
                 }
-                else {
+                else
+                {
                     currentOption = option;
+
                     // special option
-                    Option specialOption = options.getOption( arguments[i].substring(0,2) );
-                    if( specialOption != null && option == null ) {
-                        tokens.add( arguments[i].substring(0,2) );
-                        tokens.add( arguments[i].substring(2) );
-                    }
-                    else if( currentOption != null && currentOption.hasArg() ) {
-                        if( currentOption.hasArg() ) {
-                            tokens.add( arguments[i] );
-                            currentOption= null;
+                    Option specialOption = 
+                            options.getOption(arguments[i].substring(0, 2));
+
+                    if ((specialOption != null) && (option == null))
+                    {
+                        tokens.add(arguments[i].substring(0, 2));
+                        tokens.add(arguments[i].substring(2));
+                    }
+                    else if ((currentOption != null) && currentOption.hasArg())
+                    {
+                        if (currentOption.hasArg())
+                        {
+                            tokens.add(arguments[i]);
+                            currentOption = null;
                         }
-                        else if ( currentOption.hasArgs() ) {
-                            tokens.add( arguments[i] );
+                        else if (currentOption.hasArgs())
+                        {
+                            tokens.add(arguments[i]);
                         }
-                        else if ( stopAtNonOption ) {
+                        else if (stopAtNonOption)
+                        {
                             eatTheRest = true;
-                            tokens.add( "--" );
-                            tokens.add( arguments[i] );
+                            tokens.add("--");
+                            tokens.add(arguments[i]);
                         }
-                        else {
-                            tokens.add( arguments[i] );
+                        else
+                        {
+                            tokens.add(arguments[i]);
                         }
-                    } 
-                    else if (currentOption != null ) {
-                        tokens.add( arguments[i] );
-                    } 
-                    else if ( stopAtNonOption ) {
+                    }
+                    else if (currentOption != null)
+                    {
+                        tokens.add(arguments[i]);
+                    }
+                    else if (stopAtNonOption)
+                    {
                         eatTheRest = true;
-                        tokens.add( "--" );
-                        tokens.add( arguments[i] );
+                        tokens.add("--");
+                        tokens.add(arguments[i]);
                     }
-                    else {
-                        tokens.add( arguments[i] );
+                    else
+                    {
+                        tokens.add(arguments[i]);
                     }
                 }
             }
-            else {
-                tokens.add( arguments[i] );
+            else
+            {
+                tokens.add(arguments[i]);
             }
 
-            if( eatTheRest ) {
-                for( i++; i < arguments.length; i++ ) {
-                    tokens.add( arguments[i] );
+            if (eatTheRest)
+            {
+                for (i++; i < arguments.length; i++)
+                {
+                    tokens.add(arguments[i]);
                 }
             }
         }
-        return (String[])tokens.toArray( new String[] {} );
+
+        return (String[]) tokens.toArray(new String[] {  });
     }
 }

Propchange: jakarta/commons/proper/cli/branches/CLI_1_BRANCH/src/java/org/apache/commons/cli/GnuParser.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Wed Jul  6 14:34:26 2005
@@ -1 +1 @@
-author date id revision
+Date Author Id Revision HeadURL



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message