geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r570606 [1/5] - in /geronimo/sandbox/gshell/trunk: ./ gshell-api/ gshell-api/src/main/java/org/apache/geronimo/gshell/command/ gshell-api/src/main/java/org/apache/geronimo/gshell/console/ gshell-api/src/main/java/org/apache/geronimo/gshell/...
Date Wed, 29 Aug 2007 02:17:20 GMT
Author: jdillon
Date: Tue Aug 28 19:17:11 2007
New Revision: 570606

URL: http://svn.apache.org/viewvc?rev=570606&view=rev
Log:
Add new gshell-clp for annotation-based command-line processing based on args4j
Added start of gshell-prefs for annotation-based preferences handling
Replaced commons-logging with slf4j
Disable the optional commands for now, pending update to use new apis
Disable inclusion of commons-lang for now, all we were using was StopWatch, pending some shading to pick that up again

Added:
    geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package-info.java   (contents, props changed)
      - copied, changed from r568844, geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package.html
    geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package-info.java   (contents, props changed)
      - copied, changed from r568844, geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package.html
    geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package-info.java   (contents, props changed)
      - copied, changed from r568844, geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package.html
    geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package-info.java   (contents, props changed)
      - copied, changed from r568844, geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package.html
    geronimo/sandbox/gshell/trunk/gshell-clp/
    geronimo/sandbox/gshell/trunk/gshell-clp/LICENSE.txt   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/NOTICE.txt   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/pom.xml   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Argument.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/ArgumentDescriptor.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/CommandLineProcessor.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Descriptor.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/IllegalAnnotationError.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Messages.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Option.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/OptionDescriptor.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Printer.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/ProcessingException.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/StopProcessingOptionsNotification.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/BooleanHandler.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/DoubleHandler.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/EnumHandler.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/FileHandler.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/Handler.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/Handlers.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/IntegerHandler.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/Messages.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/Parameters.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/StopHandler.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/StringHandler.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/package-info.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/package-info.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/setter/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/setter/CollectionFieldSetter.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/setter/FieldSetter.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/setter/Messages.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/setter/MethodSetter.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/setter/Setter.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/setter/package-info.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/resources/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/resources/org/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/resources/org/apache/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/resources/org/apache/geronimo/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/resources/org/apache/geronimo/gshell/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/resources/org/apache/geronimo/gshell/clp/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/resources/org/apache/geronimo/gshell/clp/Messages.properties   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/resources/org/apache/geronimo/gshell/clp/handler/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/resources/org/apache/geronimo/gshell/clp/handler/Messages.properties   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/resources/org/apache/geronimo/gshell/clp/setter/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/main/resources/org/apache/geronimo/gshell/clp/setter/Messages.properties   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/CommandLineProcessorTest.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/PrinterTest.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/SimpleTest.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/handler/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/handler/BooleanHandlerTest.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/handler/DoubleHandlerTest.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/handler/FileHandlerTest.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/handler/IntegerHandlerTest.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/handler/StopHandlerTest.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/handler/StringHandlerTest.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/setter/
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/setter/CollectionFieldSetterTest.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-clp/src/test/java/org/apache/geronimo/gshell/clp/setter/MethodSetterTest.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package-info.java   (contents, props changed)
      - copied, changed from r568844, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package.html
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package-info.java   (contents, props changed)
      - copied, changed from r568844, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package.html
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package-info.java   (contents, props changed)
      - copied, changed from r568844, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package.html
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package-info.java   (contents, props changed)
      - copied, changed from r568844, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package.html
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package-info.java   (contents, props changed)
      - copied, changed from r568844, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package.html
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package-info.java   (contents, props changed)
      - copied, changed from r568844, geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package.html
    geronimo/sandbox/gshell/trunk/gshell-prefs/
    geronimo/sandbox/gshell/trunk/gshell-prefs/LICENSE.txt   (with props)
    geronimo/sandbox/gshell/trunk/gshell-prefs/NOTICE.txt   (with props)
    geronimo/sandbox/gshell/trunk/gshell-prefs/pom.xml   (with props)
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/IllegalAnnotationError.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/Preference.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferenceDescriptor.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/PreferencesProcessor.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/ProcessingException.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/package-info.java   (with props)
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/resources/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/resources/org/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/resources/org/apache/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/resources/org/apache/geronimo/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/resources/org/apache/geronimo/gshell/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/main/resources/org/apache/geronimo/gshell/prefs/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/test/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/test/java/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/test/java/org/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/test/java/org/apache/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/test/java/org/apache/geronimo/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/test/java/org/apache/geronimo/gshell/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/test/java/org/apache/geronimo/gshell/prefs/
    geronimo/sandbox/gshell/trunk/gshell-prefs/src/test/java/org/apache/geronimo/gshell/prefs/PreferencesProcessorTest.java   (with props)
Removed:
    geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package.html
    geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package.html
    geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package.html
    geronimo/sandbox/gshell/trunk/gshell-assembly/src/main/config/commons-logging.properties
    geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package.html
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/package.html
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/package.html
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/package.html
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/parser/package.html
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package.html
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package.html
Modified:
    geronimo/sandbox/gshell/trunk/NOTICE.txt
    geronimo/sandbox/gshell/trunk/gshell-api/pom.xml
    geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandDefinition.java
    geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandSupport.java
    geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/IO.java
    geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/CommandDefinitionTest.java
    geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/CommandSupportTest.java
    geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/console/IOTest.java
    geronimo/sandbox/gshell/trunk/gshell-assembly/pom.xml
    geronimo/sandbox/gshell/trunk/gshell-assembly/src/main/assembly/bin.xml
    geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/util/PumpStreamHandler.java
    geronimo/sandbox/gshell/trunk/gshell-commands/gshell-standard-commands/src/main/java/org/apache/geronimo/gshell/commands/standard/util/StreamPumper.java
    geronimo/sandbox/gshell/trunk/gshell-core/pom.xml
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/grammar/CommandLineParser.jjt
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/grammar/SyntaxParser.jtb
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/CompletionHandlerImpl.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/InteractiveShell.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/Shell.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/ShellContainer.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/ExitCommand.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/HelpCommand.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/SetCommand.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/SourceCommand.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/builtins/UnsetCommand.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/CommandManagerImpl.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/MessageSourceImpl.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/command/VariablesImpl.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/CommandLineBuilder.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/ExecutingVisitor.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/LoggingVisitor.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/VariableExpressionParser.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/InteractiveConsole.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/JLineConsole.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/SimpleConsole.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/ShellTest.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/command/VariablesImplTest.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/CommandLineBuilderTest.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/commandline/ExecutingVisitorTest.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/InteractiveConsoleTest.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/JLineConsoleTest.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/console/SimpleConsoleTest.java
    geronimo/sandbox/gshell/trunk/javacc-maven-plugin/pom.xml
    geronimo/sandbox/gshell/trunk/pom.xml

Modified: geronimo/sandbox/gshell/trunk/NOTICE.txt
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/NOTICE.txt?rev=570606&r1=570605&r2=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/NOTICE.txt (original)
+++ geronimo/sandbox/gshell/trunk/NOTICE.txt Tue Aug 28 19:17:11 2007
@@ -1,5 +1,11 @@
+=========================================================================
+==  NOTICE file corresponding to section 4(d) of the Apache License,   ==
+==  Version 2.0, in this case for the Apache Geronimo distribution.    ==
+=========================================================================
+
 Apache Geronimo
-Copyright 2006 The Apache Software Foundation
+Copyright 2007 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
+

Modified: geronimo/sandbox/gshell/trunk/gshell-api/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/pom.xml?rev=570606&r1=570605&r2=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/pom.xml (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/pom.xml Tue Aug 28 19:17:11 2007
@@ -28,31 +28,43 @@
         <groupId>org.apache.geronimo.gshell</groupId>
         <artifactId>gshell</artifactId>
         <version>1.0-alpha-1-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
     
     <artifactId>gshell-api</artifactId>
     <name>GShell API</name>
-    
+
+    <description>
+        Profides the basic interface for GShell commands.
+    </description>
+
     <dependencies>
         <dependency>
-            <groupId>commons-cli</groupId>
-            <artifactId>commons-cli</artifactId>
+            <groupId>org.apache.geronimo.gshell</groupId>
+            <artifactId>gshell-clp</artifactId>
+            <version>${version}</version>
         </dependency>
-        
+
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging-api</artifactId>
+            <groupId>org.apache.geronimo.gshell</groupId>
+            <artifactId>gshell-prefs</artifactId>
+            <version>${version}</version>
         </dependency>
         
         <dependency>
-            <groupId>commons-lang</groupId>
-            <artifactId>commons-lang</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
         </dependency>
 
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
         </dependency>
     </dependencies>
     

Modified: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandDefinition.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandDefinition.java?rev=570606&r1=570605&r2=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandDefinition.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandDefinition.java Tue Aug 28 19:17:11 2007
@@ -20,7 +20,6 @@
 package org.apache.geronimo.gshell.command;
 
 import org.apache.geronimo.gshell.util.Arguments;
-import org.apache.commons.lang.NullArgumentException;
 
 import java.util.Properties;
 
@@ -42,10 +41,8 @@
     private final String category;
 
     public CommandDefinition(final Properties props) throws InvalidDefinitionException {
-        if (props == null) {
-            throw new NullArgumentException("props");
-        }
-
+        assert props != null;
+        
         this.name = props.getProperty("name");
         if (name == null) {
             throw new MissingPropertyException("name", props);

Modified: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandSupport.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandSupport.java?rev=570606&r1=570605&r2=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandSupport.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandSupport.java Tue Aug 28 19:17:11 2007
@@ -19,19 +19,15 @@
 
 package org.apache.geronimo.gshell.command;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.lang.NullArgumentException;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.PosixParser;
-import org.apache.commons.cli.CommandLine;
+import java.util.Iterator;
+
+import org.apache.geronimo.gshell.clp.CommandLineProcessor;
+import org.apache.geronimo.gshell.clp.Option;
+import org.apache.geronimo.gshell.clp.Printer;
 import org.apache.geronimo.gshell.console.IO;
 import org.apache.geronimo.gshell.util.Arguments;
-
-import java.util.Iterator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Provides support for {@link Command} implemenations.
@@ -41,12 +37,15 @@
 public abstract class CommandSupport
     implements Command
 {
-    protected Log log;
+    protected Logger log;
 
     private String name;
 
     private CommandContext context;
 
+    @Option(name="-h", aliases={"--help"}, description="Display this help message")
+    private boolean displayHelp;
+
     protected CommandSupport(final String name) {
         setName(name);
     }
@@ -59,9 +58,8 @@
     }
 
     public void setName(final String name) {
-        if (name == null) {
-            throw new NullArgumentException("name");
-        }
+        assert name != null;
+        
         if (name.trim().length() == 0) {
             throw new IllegalArgumentException("Name is empty");
         }
@@ -101,12 +99,16 @@
         }
 
         // Initialize logging with command name
-        log = LogFactory.getLog(this.getClass().getName() + "." + getName());
+        log = LoggerFactory.getLogger(this.getClass().getName() + "." + getName());
 
         log.debug("Initializing");
 
         this.context = context;
 
+        //
+        // TODO: Add preference support
+        //
+        
         if (log.isDebugEnabled()) {
             dump(context.getVariables());
         }
@@ -217,28 +219,16 @@
         Object result;
 
         try {
-            // Handle the command-line
-            Options options = getOptions();
-            CommandLineParser parser = new PosixParser();
-            CommandLine line = parser.parse(options, Arguments.toStringArray(args));
-
-            // First check for help flags
-            boolean usage = line.hasOption('h');
-
-            // Custom command-line processing
-            if (!usage) {
-                usage = processCommandLine(line);
-            }
-
-            // Default command-line processing
-            if (usage) {
-                displayHelp(options);
+            CommandLineProcessor clp = new CommandLineProcessor(this);
+            clp.process(Arguments.toStringArray(args));
 
-                return Command.SUCCESS;
+            // Handle --help/-h automatically for the command
+            if (displayHelp) {
+                displayHelp(clp);
             }
-
-            // Execute with the remaining arguments post-processing
-            result = doExecute(line.getArgs());
+            
+            // Invoke the command's action
+            result = doExecute();
         }
         catch (Exception e) {
             log.error(e.getMessage());
@@ -249,9 +239,7 @@
             result = Command.FAILURE;
         }
         catch (Notification n) {
-            //
-            // Always rethrow notifications
-            //
+            // Always re-throw notifications
             throw n;
         }
         catch (Error e) {
@@ -277,54 +265,14 @@
 
     /**
      * Sub-class should override to perform custom execution.
-     *
-     * @param args  Post-command-line parsed options.
-     * @return
-     *
-     * @throws Exception
      */
-    protected abstract Object doExecute(final Object[] args) throws Exception;
+    protected abstract Object doExecute() throws Exception;
 
     //
     // CLI Fluff
     //
 
     /**
-     * Process the command-line.
-     *
-     * <p>
-     * The default is to provide no additional processing.
-     *
-     * @param line  The command-line to process.
-     * @return      True to display help and exit; else false to continue.
-     *
-     * @throws CommandException
-     */
-    protected boolean processCommandLine(final CommandLine line) throws CommandException {
-        return false;
-    }
-
-    /**
-     * Get the command-line options to process.
-     *
-     * <p>
-     * The default is to provide --help and -h support.
-     *
-     * @return  The command-line options; never null;
-     */
-    protected Options getOptions() {
-        MessageSource messages = getMessageSource();
-
-        Options options = new Options();
-
-        options.addOption(OptionBuilder.withLongOpt("help")
-            .withDescription(messages.getMessage("cli.option.help"))
-            .create('h'));
-
-        return options;
-    }
-
-    /**
      * Returns the command-line usage.
      *
      * @return  The command-line usage.
@@ -333,7 +281,9 @@
         return "[options]";
     }
 
-    protected void displayHelp(final Options options) {
+    protected void displayHelp(final CommandLineProcessor clp) {
+        assert clp != null;
+
         MessageSource messages = getMessageSource();
         IO io = getIO();
 
@@ -342,18 +292,8 @@
         io.out.println(messages.getMessage("cli.usage.description"));
         io.out.println();
 
-        HelpFormatter formatter = new HelpFormatter();
-        formatter.printHelp(
-            io.out,
-            80, // width (FIXME: Should pull from gshell.columns variable)
-            getName() + " " + getUsage(),
-            "",
-            options,
-            4, // left pad
-            4, // desc pad
-            "",
-            false); // auto usage
-
+        Printer printer = new Printer(clp);
+        printer.printUsage(io.out);
         io.out.println();
 
         String footer = messages.getMessage("cli.usage.footer");

Copied: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package-info.java (from r568844, geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package.html)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package-info.java?p2=geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package-info.java&p1=geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package.html&r1=568844&r2=570606&rev=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package.html (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package-info.java Tue Aug 28 19:17:11 2007
@@ -1,32 +1,25 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
 
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you 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.
--->
-
-<!-- $Rev$ $Date$ -->
-
-</head>
-<body bgcolor="white">
-
-GShell Command API.
-
-</body>
-</html>
\ No newline at end of file
+/**
+ * GShell Command API.
+ *
+ * @version $Rev$ $Date$
+ */
+package org.apache.geronimo.gshell.command;

Propchange: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package-info.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/package-info.java
------------------------------------------------------------------------------
    svn:mime-type = text/html

Modified: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/IO.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/IO.java?rev=570606&r1=570605&r2=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/IO.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/IO.java Tue Aug 28 19:17:11 2007
@@ -19,8 +19,6 @@
 
 package org.apache.geronimo.gshell.console;
 
-import org.apache.commons.lang.NullArgumentException;
-
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
@@ -79,15 +77,9 @@
      * @param err   The error output stream; must not be null
      */
     public IO(final InputStream in, final OutputStream out, final OutputStream err) {
-        if (in == null) {
-            throw new NullArgumentException("in");
-        }
-        if (out == null) {
-            throw new NullArgumentException("out");
-        }
-        if (err == null) {
-            throw new NullArgumentException("err");
-        }
+        assert in != null;
+        assert out != null;
+        assert err != null;
 
         this.inputStream = in;
         this.outputStream = out;

Copied: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package-info.java (from r568844, geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package.html)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package-info.java?p2=geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package-info.java&p1=geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package.html&r1=568844&r2=570606&rev=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package.html (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package-info.java Tue Aug 28 19:17:11 2007
@@ -1,32 +1,25 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
 
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you 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.
--->
-
-<!-- $Rev$ $Date$ -->
-
-</head>
-<body bgcolor="white">
-
-GShell Console API.
-
-</body>
-</html>
\ No newline at end of file
+/**
+ * GShell Console API.
+ *
+ * @version $Rev$ $Date$
+ */
+package org.apache.geronimo.gshell.console;

Propchange: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package-info.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/console/package-info.java
------------------------------------------------------------------------------
    svn:mime-type = text/html

Copied: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package-info.java (from r568844, geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package.html)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package-info.java?p2=geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package-info.java&p1=geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package.html&r1=568844&r2=570606&rev=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package.html (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package-info.java Tue Aug 28 19:17:11 2007
@@ -1,32 +1,25 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
 
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you 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.
--->
-
-<!-- $Rev$ $Date$ -->
-
-</head>
-<body bgcolor="white">
-
-GShell API Utilities.
-
-</body>
-</html>
\ No newline at end of file
+/**
+ * GShell API Utilities.
+ *
+ * @version $Rev$ $Date$
+ */
+package org.apache.geronimo.gshell.util;

Propchange: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package-info.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/util/package-info.java
------------------------------------------------------------------------------
    svn:mime-type = text/html

Modified: geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/CommandDefinitionTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/CommandDefinitionTest.java?rev=570606&r1=570605&r2=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/CommandDefinitionTest.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/CommandDefinitionTest.java Tue Aug 28 19:17:11 2007
@@ -34,7 +34,7 @@
             new CommandDefinition(null);
             fail("Accepted a null value");
         }
-        catch (IllegalArgumentException expected) {
+        catch (AssertionError expected) {
             // ignore
         }
     }

Modified: geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/CommandSupportTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/CommandSupportTest.java?rev=570606&r1=570605&r2=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/CommandSupportTest.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/CommandSupportTest.java Tue Aug 28 19:17:11 2007
@@ -34,7 +34,7 @@
             new MockCommand(null);
             fail("Accepted null value");
         }
-        catch (IllegalArgumentException expected) {
+        catch (AssertionError expected) {
             // ignore
         }
     }
@@ -45,7 +45,7 @@
             cmd.setName(null);
             fail("Accepted null value");
         }
-        catch (IllegalArgumentException expected) {
+        catch (AssertionError expected) {
             // ignore
         }
     }
@@ -74,7 +74,7 @@
             super(name);
         }
 
-        protected Object doExecute(final Object[] args) throws Exception {
+        protected Object doExecute() throws Exception {
             return null;
         }
     }

Modified: geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/console/IOTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/console/IOTest.java?rev=570606&r1=570605&r2=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/console/IOTest.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/console/IOTest.java Tue Aug 28 19:17:11 2007
@@ -34,7 +34,7 @@
             new IO(null, null, null);
             fail("Accepted null value");
         }
-        catch (IllegalArgumentException expected) {
+        catch (AssertionError expected) {
             // ignore
         }
 
@@ -42,7 +42,7 @@
             new IO(System.in, null, null);
             fail("Accepted null value");
         }
-        catch (IllegalArgumentException expected) {
+        catch (AssertionError expected) {
             // ignore
         }
 
@@ -50,7 +50,7 @@
             new IO(System.in, System.out, null);
             fail("Accepted null value");
         }
-        catch (IllegalArgumentException expected) {
+        catch (AssertionError expected) {
             // ignore
         }
 

Modified: geronimo/sandbox/gshell/trunk/gshell-assembly/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-assembly/pom.xml?rev=570606&r1=570605&r2=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-assembly/pom.xml (original)
+++ geronimo/sandbox/gshell/trunk/gshell-assembly/pom.xml Tue Aug 28 19:17:11 2007
@@ -21,20 +21,20 @@
 <!-- $Rev$ $Date$ -->
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    
+
     <modelVersion>4.0.0</modelVersion>
-    
+
     <parent>
         <groupId>org.apache.geronimo.gshell</groupId>
         <artifactId>gshell</artifactId>
         <version>1.0-alpha-1-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
-    
+
     <artifactId>gshell-assembly</artifactId>
     <name>GShell Assembly</name>
-    <packaging>application-assembly</packaging>
-    
+    <packaging>jar</packaging>
+
     <dependencies>
         <dependency>
             <groupId>${pom.groupId}</groupId>
@@ -47,19 +47,20 @@
             <artifactId>gshell-core</artifactId>
             <version>${version}</version>
         </dependency>
-        
+
         <dependency>
             <groupId>${pom.groupId}</groupId>
             <artifactId>gshell-cli</artifactId>
             <version>${version}</version>
         </dependency>
 
+        <!--
         <dependency>
             <groupId>${pom.groupId}</groupId>
             <artifactId>gshell-standard-commands</artifactId>
             <version>${version}</version>
         </dependency>
-
+        
         <dependency>
             <groupId>${pom.groupId}</groupId>
             <artifactId>gshell-scripting-commands</artifactId>
@@ -71,34 +72,64 @@
             <artifactId>gshell-vfs-commands</artifactId>
             <version>${version}</version>
         </dependency>
+        -->
 
-        <!-- Thridparty Dependencies -->
-        
         <dependency>
-            <groupId>commons-logging</groupId>
-            <artifactId>commons-logging-adapters</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl104-over-slf4j</artifactId>
         </dependency>
-        
+
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
         </dependency>
-        
-        <!-- Include at least one scripting language for now (bsh is nice and small) -->
+
         <dependency>
-            <groupId>org.beanshell</groupId>
-            <artifactId>bsh</artifactId>
-            <version>2.0b4</version>
-            <type>jar</type>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
         </dependency>
     </dependencies>
-    
+
     <build>
         <plugins>
+            <!--
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>shade-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        HACK: Turn this off, its just for testing
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <excludes>
+                                    <exclude>junit:junit</exclude>
+                                    <exclude>jtidy:jtidy</exclude>
+                                    <exclude>xml-apis:xml-apis</exclude>
+                                    <exclude>ant:ant</exclude>
+                                </excludes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>org.codehaus.plexus.util</pattern>
+                                    <excludes>
+                                        <exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>
+                                        <exclude>org.codehaus.plexus.util.xml.pull.*</exclude>
+                                    </excludes>
+                                </relocation>
+                            </relocations>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            -->
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-assembly-plugin</artifactId>
-                
                 <executions>
                     <execution>
                         <phase>package</phase>
@@ -107,7 +138,6 @@
                         </goals>
                     </execution>
                 </executions>
-                
                 <configuration>
                     <descriptors>
                         <descriptor>${pom.basedir}/src/main/assembly/bin.xml</descriptor>

Modified: geronimo/sandbox/gshell/trunk/gshell-assembly/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-assembly/src/main/assembly/bin.xml?rev=570606&r1=570605&r2=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-assembly/src/main/assembly/bin.xml (original)
+++ geronimo/sandbox/gshell/trunk/gshell-assembly/src/main/assembly/bin.xml Tue Aug 28 19:17:11 2007
@@ -79,6 +79,7 @@
             <excludes>
                 <exclude>org.apache.geronimo.gshell:gshell-bootstrap</exclude>
                 <exclude>classworlds:classworlds</exclude>
+                <exclude>xml-apis:xml-apis</exclude>
             </excludes>
         </dependencySet>
 

Modified: geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java?rev=570606&r1=570605&r2=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java Tue Aug 28 19:17:11 2007
@@ -19,30 +19,23 @@
 
 package org.apache.geronimo.gshell.cli;
 
-import org.codehaus.classworlds.ClassWorld;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.cli.PosixParser;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.HelpFormatter;
-
-import org.apache.commons.lang.time.StopWatch;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.List;
 
-import org.apache.geronimo.gshell.Shell;
+import jline.Terminal;
 import org.apache.geronimo.gshell.InteractiveShell;
-import org.apache.geronimo.gshell.console.IO;
+import org.apache.geronimo.gshell.Shell;
+import org.apache.geronimo.gshell.clp.Argument;
+import org.apache.geronimo.gshell.clp.CommandLineProcessor;
+import org.apache.geronimo.gshell.clp.Option;
+import org.apache.geronimo.gshell.clp.Printer;
 import org.apache.geronimo.gshell.console.Console;
+import org.apache.geronimo.gshell.console.IO;
 import org.apache.geronimo.gshell.console.JLineConsole;
-
-import org.apache.geronimo.gshell.util.Version;
 import org.apache.geronimo.gshell.util.Banner;
-
-import jline.Terminal;
+import org.apache.geronimo.gshell.util.Version;
+import org.codehaus.classworlds.ClassWorld;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Command-line interface to bootstrap Shell.
@@ -63,17 +56,15 @@
 
     private final IO io = new IO();
 
-    private final StopWatch watch = new StopWatch();
-
-    private boolean interactive;
-
-    private String commands;
+    // FIXME
+    // private final StopWatch watch = new StopWatch();
 
     public Main(final ClassWorld world) {
         assert world != null;
         this.world = world;
 
-        watch.start();
+        // FIXME:
+        // watch.start();
     }
 
     private void setConsoleLogLevel(final String level) {
@@ -97,77 +88,62 @@
         System.setProperty(name, value);
     }
 
-    public void run(final String[] args) throws Exception {
-        assert args != null;
+    @Option(name="-h", aliases={"--help"}, description="Display this help message")
+    private boolean help;
 
-        Options options = new Options();
+    @Option(name="-V", aliases={"--version"}, description="Display GShell version")
+    private boolean version;
 
-        options.addOption(OptionBuilder.withLongOpt("help")
-            .withDescription("Display this help message")
-            .create('h'));
-
-        options.addOption(OptionBuilder.withLongOpt("version")
-            .withDescription("Display GShell version")
-            .create('V'));
+    @Option(name="-i", aliases={"--interactive"}, argumentRequired=false, description="Run in interactive mode")
+    private boolean interactive = true;
 
-        options.addOption(OptionBuilder.withLongOpt("define")
-            .withDescription("Define a system property")
-            .hasArg()
-            .withArgName("name=value")
-            .create('D'));
+    @Option(name="-debug", aliases={"--debug"}, description="Enable DEBUG logging output")
+    private boolean debug;
 
-        options.addOption(OptionBuilder.withLongOpt("commands")
-            .withDescription("Read commands from string")
-            .hasArg()
-            .withArgName("string")
-            .create('c'));
-        
-        options.addOption(OptionBuilder.withLongOpt("interactive")
-            .withDescription("Run in interactive mode")
-            .create('i'));
-
-        options.addOption(OptionBuilder.withLongOpt("non-interactive")
-            .withDescription("Run in non-interactive mode")
-            .create('n'));
+    @Option(name="-verbose", aliases={"--verbose"}, description="Enable INFO logging output")
+    private boolean verbose;
 
-        //
-        // TODO: Add these output modifiers to a seperate group
-        //
+    @Option(name="-quite", aliases={"--quiet"}, description="Limit logging output to ERROR")
+    private boolean quiet;
 
-        options.addOption(OptionBuilder.withLongOpt("debug")
-            .withDescription("Enable DEBUG logging output")
-            .create("debug"));
+    @Option(name="-c", aliases={"commands"}, description="Read commands from string")
+    private String commands;
 
-        options.addOption(OptionBuilder.withLongOpt("verbose")
-            .withDescription("Enable INFO logging output")
-            .create("verbose"));
+    @Argument
+    private List<String> args;
 
-        options.addOption(OptionBuilder.withLongOpt("quiet")
-            .withDescription("Limit logging output to ERROR")
-            .create("quiet"));
 
-        CommandLineParser parser = new PosixParser();
-        CommandLine line = parser.parse(options, args, true);
+    //
+    // TODO: Change this to --interactive false
+    //
 
-        // Force interactive if there are no args
-        if (line.getArgs().length == 0) {
-            interactive = true;
-        }
+    @Option(name="-n", aliases={"--non-interactive"}, description="Run in non-interactive mode")
+    private boolean nonInteractive;
+
+    public void run(final String[] args) throws Exception {
+        assert args != null;
+
+        /*
+        options.addOption(OptionBuilder.withLongOpt("define")
+            .withDescription("Define a system property")
+            .hasArg()
+            .withArgName("name=value")
+            .create('D'));
+        */
 
-        if (line.hasOption('h')) {
+        CommandLineProcessor clp = new CommandLineProcessor(this);
+        clp.setStopAtNonOption(true);
+        clp.process(args);
+
+        if (help) {
             io.out.println(Banner.getBanner());
 
-            HelpFormatter formatter = new HelpFormatter();
-            formatter.printHelp(
-                io.out,
-                80, // width
-                System.getProperty("program.name", "gshell") + " [options] <command> [args]",
-                "",
-                options,
-                4, // left pad
-                4, // desc pad
-                "",
-                false); // auto usage
+            io.out.println();
+            io.out.println(System.getProperty("program.name", "gshell") + " [options] <command> [args]");
+            io.out.println();
+
+            Printer printer = new Printer(clp);
+            printer.printUsage(io.out);
 
             io.out.println();
             io.out.flush();
@@ -175,7 +151,7 @@
             System.exit(0);
         }
 
-        if (line.hasOption('V')) {
+        if (version) {
             io.out.println(Banner.getBanner());
             io.out.println(Version.getInstance());
             io.out.println();
@@ -184,6 +160,7 @@
             System.exit(0);
         }
 
+        /*
         if (line.hasOption('D')) {
             String[] values = line.getOptionValues('D');
 
@@ -191,14 +168,15 @@
                 setPropertyFrom(value);
             }
         }
+        */
 
-        if (line.hasOption("quiet")) {
+        if (quiet) {
             setConsoleLogLevel("ERROR");
         }
-        else if (line.hasOption("debug")) {
+        else if (debug) {
             setConsoleLogLevel("DEBUG");
         }
-        else if (line.hasOption("verbose")) {
+        else if (verbose) {
             setConsoleLogLevel("INFO");
         }
         else {
@@ -206,25 +184,17 @@
             setConsoleLogLevel("WARN");
         }
 
-        if (line.hasOption('c')) {
-            commands = line.getOptionValue('c');
-        }
-
-        if (line.hasOption('i')) {
-            interactive = true;
-        }
-        else if (line.hasOption('n')) {
-            interactive = false;
-        }
-
         int code;
         
         try {
-            code = execute(line.getArgs());
+            if (this.args == null || this.args.size() == 0) {
+                code = execute(new String[0]);
+            }
+            else {
+                code = execute(this.args.toArray(new String[this.args.size()]));
+            }
         }
         finally {
-            LogFactory.releaseAll();
-            
             io.flush();
         }
         
@@ -233,7 +203,7 @@
 
     private int execute(final String[] args) throws Exception {
         // Its okay to use logging now
-        Log log = LogFactory.getLog(Main.class);
+        Logger log = LoggerFactory.getLogger(Main.class);
         boolean debug = log.isDebugEnabled();
         
         //
@@ -258,9 +228,12 @@
             log.debug("  ANSI: " + term.isANSISupported());
         }
 
+        // FIXME:
+        /*
         if (debug) {
             log.debug("Started in " + watch);
         }
+        */
 
         Object result = null;
 
@@ -296,10 +269,13 @@
             result = gshell.execute(args);
         }
 
+        // FIXME:
+        /*
         if (debug) {
             log.debug("Ran for " + watch);
         }
-
+        */
+        
         // If the result is a number, then pass that back to the calling shell
         int code = 0;
         

Copied: geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package-info.java (from r568844, geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package.html)
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package-info.java?p2=geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package-info.java&p1=geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package.html&r1=568844&r2=570606&rev=570606&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package.html (original)
+++ geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package-info.java Tue Aug 28 19:17:11 2007
@@ -1,32 +1,25 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.
+ */
 
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you 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.
--->
-
-<!-- $Rev$ $Date$ -->
-
-</head>
-<body bgcolor="white">
-
-GShell Command Line Interface.
-
-</body>
-</html>
\ No newline at end of file
+/**
+ * GShell Command-line Interface.
+ *
+ * @version $Rev$ $Date$
+ */
+package org.apache.geronimo.gshell.cli;
\ No newline at end of file

Propchange: geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package-info.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package-info.java
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: geronimo/sandbox/gshell/trunk/gshell-clp/LICENSE.txt
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-clp/LICENSE.txt?rev=570606&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-clp/LICENSE.txt (added)
+++ geronimo/sandbox/gshell/trunk/gshell-clp/LICENSE.txt Tue Aug 28 19:17:11 2007
@@ -0,0 +1,203 @@
+
+                                 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: geronimo/sandbox/gshell/trunk/gshell-clp/LICENSE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gshell/trunk/gshell-clp/LICENSE.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/sandbox/gshell/trunk/gshell-clp/LICENSE.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gshell/trunk/gshell-clp/NOTICE.txt
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-clp/NOTICE.txt?rev=570606&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-clp/NOTICE.txt (added)
+++ geronimo/sandbox/gshell/trunk/gshell-clp/NOTICE.txt Tue Aug 28 19:17:11 2007
@@ -0,0 +1,50 @@
+=========================================================================
+==  NOTICE file corresponding to section 4(d) of the Apache License,   ==
+==  Version 2.0, in this case for the Apache Geronimo distribution.    ==
+=========================================================================
+
+Apache Geronimo
+Copyright 2007 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+=========================================================================
+==  args4j Notice                                                      ==
+=========================================================================
+
+This software contains works derived from args4j.
+
+Copyright (c) 2003, Kohsuke Kawaguchi
+All rights reserved.
+
+Redistribution and use in source and binary forms,
+with or without modification, are permitted provided
+that the following conditions are met:
+
+    * Redistributions of source code must retain
+      the above copyright notice, this list of
+      conditions and the following disclaimer.
+    * 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.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
+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 COPYRIGHT OWNER OR 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.
+

Propchange: geronimo/sandbox/gshell/trunk/gshell-clp/NOTICE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gshell/trunk/gshell-clp/NOTICE.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/sandbox/gshell/trunk/gshell-clp/NOTICE.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gshell/trunk/gshell-clp/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-clp/pom.xml?rev=570606&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-clp/pom.xml (added)
+++ geronimo/sandbox/gshell/trunk/gshell-clp/pom.xml Tue Aug 28 19:17:11 2007
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    
+    <modelVersion>4.0.0</modelVersion>
+    
+    <parent>
+        <groupId>org.apache.geronimo.gshell</groupId>
+        <artifactId>gshell</artifactId>
+        <version>1.0-alpha-1-SNAPSHOT</version>
+    </parent>
+    
+    <artifactId>gshell-clp</artifactId>
+    <name>GShell Command-Line Processor (CLP)</name>
+    
+    <description>
+        Annotation-based command-line processing support.
+    </description>
+    
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+</project>
\ No newline at end of file

Propchange: geronimo/sandbox/gshell/trunk/gshell-clp/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gshell/trunk/gshell-clp/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/sandbox/gshell/trunk/gshell-clp/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Argument.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Argument.java?rev=570606&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Argument.java (added)
+++ geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Argument.java Tue Aug 28 19:17:11 2007
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.geronimo.gshell.clp;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.geronimo.gshell.clp.handler.Handler;
+
+/**
+ * Configures a field or method for processing as a command-line argument.
+ *
+ * @version $Rev$ $Date$
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.FIELD, ElementType.METHOD})
+public @interface Argument
+{
+    String description() default "";
+
+    String metaVar() default "";
+
+    boolean required() default false;
+
+    Class<? extends Handler> handler() default Handler.class;
+
+    int index() default 0;
+
+    boolean multiValued() default false;
+}

Propchange: geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Argument.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Argument.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/Argument.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/ArgumentDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/ArgumentDescriptor.java?rev=570606&view=auto
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/ArgumentDescriptor.java (added)
+++ geronimo/sandbox/gshell/trunk/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/ArgumentDescriptor.java Tue Aug 28 19:17:11 2007
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.geronimo.gshell.clp;
+
+/**
+ * Descriptor for {@link Argument} annotations.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ArgumentDescriptor
+    extends Descriptor
+{
+	public ArgumentDescriptor(Argument argument, boolean forceMultiValued) {
+		super(argument.description(), argument.metaVar(), argument.required(), argument.handler(), argument.multiValued() || forceMultiValued);
+	}
+
+	@Override
+	public String toString() {
+		return metaVar() != null ? metaVar() : "ARG";
+	}
+}



Mime
View raw message