You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2007/09/04 10:52:47 UTC
svn commit: r572585 - in /geronimo/sandbox/gshell/trunk:
gshell-ansi/src/main/java/org/apache/geronimo/gshell/ansi/
gshell-api/src/main/java/org/apache/geronimo/gshell/command/
gshell-api/src/test/java/org/apache/geronimo/gshell/command/
gshell-cli/src...
Author: jdillon
Date: Tue Sep 4 01:52:44 2007
New Revision: 572585
URL: http://svn.apache.org/viewvc?rev=572585&view=rev
Log:
Drop more cruft, don't need the cmd def stuff anymore, the plexus component descriptor works fine for now, and later we'll add a custom plugin descriptor to add classpath muck and other fancy fancy crapo
Removed:
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/CommandManager.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-core/src/main/java/org/apache/geronimo/gshell/CommandManagerImpl.java
geronimo/sandbox/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/CommandManagerImplTest.java
Modified:
geronimo/sandbox/gshell/trunk/gshell-ansi/src/main/java/org/apache/geronimo/gshell/ansi/RenderWriter.java
geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java
geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.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/command/IO.java
geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/IOTest.java
geronimo/sandbox/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
geronimo/sandbox/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-bsf/src/main/java/org/apache/geronimo/gshell/commands/bsf/ScriptCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/CatCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/EchoCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/ExecuteCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/JavaCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/SleepCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/WaitCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs/src/main/java/org/apache/geronimo/gshell/commands/vfs/CopyCommand.java
geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs/src/main/java/org/apache/geronimo/gshell/commands/vfs/VFSCommandSupport.java
geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellPluginCollector.java
geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellPluginDiscoverer.java
geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/JLineConsole.java
geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/PlexusLoggingAdapter.java
geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/Shell.java
geronimo/sandbox/gshell/trunk/gshell-i18n/src/main/java/org/apache/geronimo/gshell/i18n/ResourceBundleMessageSource.java
Modified: geronimo/sandbox/gshell/trunk/gshell-ansi/src/main/java/org/apache/geronimo/gshell/ansi/RenderWriter.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-ansi/src/main/java/org/apache/geronimo/gshell/ansi/RenderWriter.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-ansi/src/main/java/org/apache/geronimo/gshell/ansi/RenderWriter.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-ansi/src/main/java/org/apache/geronimo/gshell/ansi/RenderWriter.java Tue Sep 4 01:52:44 2007
@@ -19,8 +19,8 @@
package org.apache.geronimo.gshell.ansi;
-import java.io.PrintWriter;
import java.io.OutputStream;
+import java.io.PrintWriter;
import java.io.Writer;
/**
Modified: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/Command.java Tue Sep 4 01:52:44 2007
@@ -32,23 +32,9 @@
/** Standard command failure status code. */
int FAILURE = -1;
- String getName();
-
void init(CommandContext context); // throws Exception ?
Object execute(Object... args) throws Exception;
- void abort(); // throws Exception ?
-
void destroy(); // throws Exception ?
-
- //
- // 'help' command helpers to allow external inspection of command help
- //
-
- // String usage() // single line used to render help page
-
- // String about() // single line to describe the command
-
- // String help() // full help page (includes usage + about + command line options)
}
Modified: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContext.java Tue Sep 4 01:52:44 2007
@@ -19,8 +19,6 @@
package org.apache.geronimo.gshell.command;
-import org.apache.geronimo.gshell.command.IO;
-
/**
* Provides the running context (or environment) for a {@link Command}.
*
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=572585&r1=572584&r2=572585&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 Sep 4 01:52:44 2007
@@ -24,7 +24,6 @@
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.command.IO;
import org.apache.geronimo.gshell.common.Arguments;
import org.apache.geronimo.gshell.common.Notification;
import org.slf4j.Logger;
@@ -40,42 +39,15 @@
{
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);
- }
-
- /**
- * Sub-class <b>must</b> call {@link #setName(String)}.
- */
protected CommandSupport() {
super();
}
- public void setName(final String name) {
- assert name != null;
-
- if (name.trim().length() == 0) {
- throw new IllegalArgumentException("Name is empty");
- }
-
- this.name = name;
- }
-
- public String getName() {
- if (name == null) {
- throw new IllegalStateException("Name was not set");
- }
-
- return name;
- }
-
//
// Life-cycle
//
@@ -99,8 +71,13 @@
throw new IllegalStateException("Command already initalized");
}
+ //
+ // FIXME: Need to get the descriptor from the env to get the bound name
+ //
+
// Initialize logging with command name
- log = LoggerFactory.getLogger(this.getClass().getName() + "." + getName());
+ // log = LoggerFactory.getLogger(this.getClass().getName() + "." + getName());
+ log = LoggerFactory.getLogger(getClass());
log.debug("Initializing");
@@ -173,10 +150,6 @@
// Sub-class should override to provide custom cleanup
}
- public void abort() {
- // Sub-calss should override to allow for custom abort functionality
- }
-
//
// Context Helpers
//
@@ -283,14 +256,25 @@
return "[options]";
}
+ //
+ // NOTE: I think this should probably just go the f away... The usage mucko oh top too... gotta either be able
+ // to generate that, or configure it via an annotation. For the help, well we can add some header/footer muck
+ // but for 95%, maybe even 99% of the folks they don't really need to override this... blah. And really they
+ // shouldn't cause that introduces incosistencies, which is one of the benefits of GShell... :-P
+ //
+
protected void displayHelp(final CommandLineProcessor clp) {
assert clp != null;
IO io = getIO();
- io.out.print(getName());
- io.out.print(" -- ");
- io.out.println();
+ //
+ // FIXME: Need to get the command name from the env
+ //
+
+ // io.out.print(getName());
+ // io.out.print(" -- ");
+ // io.out.println();
Printer printer = new Printer(clp);
printer.printUsage(io.out);
Modified: geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/IO.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/IO.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/IO.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/IO.java Tue Sep 4 01:52:44 2007
@@ -19,12 +19,12 @@
package org.apache.geronimo.gshell.command;
+import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;
-import java.io.IOException;
-import java.io.OutputStream;
/**
* Container for input/output handles.
Modified: geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/IOTest.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/IOTest.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/IOTest.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-api/src/test/java/org/apache/geronimo/gshell/command/IOTest.java Tue Sep 4 01:52:44 2007
@@ -20,7 +20,6 @@
package org.apache.geronimo.gshell.command;
import junit.framework.TestCase;
-import org.apache.geronimo.gshell.command.IO;
/**
* Unit tests for the {@link IO} class.
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=572585&r1=572584&r2=572585&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 Sep 4 01:52:44 2007
@@ -26,11 +26,11 @@
import org.apache.geronimo.gshell.ExitNotification;
import org.apache.geronimo.gshell.JLineConsole;
import org.apache.geronimo.gshell.Shell;
-import org.apache.geronimo.gshell.command.IO;
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.command.IO;
import org.apache.geronimo.gshell.common.StopWatch;
import org.apache.geronimo.gshell.console.Console;
import org.codehaus.plexus.ContainerConfiguration;
@@ -38,7 +38,6 @@
import org.codehaus.plexus.DefaultPlexusContainer;
import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.classworlds.ClassWorld;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: geronimo/sandbox/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml (original)
+++ geronimo/sandbox/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml Tue Sep 4 01:52:44 2007
@@ -65,9 +65,24 @@
<field-name>parser</field-name>
</requirement>
</requirements>
+
+ <!--
+ TODO: Really should expose this URL to the user... or maybe have a simple config.xml (or props even) which
+ it can be pulled from.
+ -->
+
<configuration>
<url>file://${gshell.home}/etc/layout.xml</url>
</configuration>
+ </component>
+
+ <!--
+ HACK: This is a massive hackinstine just to get things moving along... and will be tossed as soon as a palatable solution crosses my path.
+ -->
+
+ <component>
+ <role>org.apache.geronimo.gshell.command.IO</role>
+ <implementation>org.apache.geronimo.gshell.command.IO</implementation>
</component>
</components>
</plexus>
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-bsf/src/main/java/org/apache/geronimo/gshell/commands/bsf/ScriptCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-bsf/src/main/java/org/apache/geronimo/gshell/commands/bsf/ScriptCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-bsf/src/main/java/org/apache/geronimo/gshell/commands/bsf/ScriptCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-bsf/src/main/java/org/apache/geronimo/gshell/commands/bsf/ScriptCommand.java Tue Sep 4 01:52:44 2007
@@ -21,11 +21,11 @@
import org.apache.bsf.BSFEngine;
import org.apache.bsf.BSFManager;
-import org.apache.geronimo.gshell.command.IO;
import org.apache.geronimo.gshell.JLineConsole;
import org.apache.geronimo.gshell.clp.Option;
-import org.apache.geronimo.gshell.command.CommandSupport;
import org.apache.geronimo.gshell.command.Command;
+import org.apache.geronimo.gshell.command.CommandSupport;
+import org.apache.geronimo.gshell.command.IO;
import org.apache.geronimo.gshell.console.Console;
import org.codehaus.plexus.component.annotations.Component;
@@ -56,10 +56,6 @@
@Option(name="-e", aliases={"--expression"}, description="Evaluate the given expression")
private String expression;
-
- public ScriptCommand() {
- super("script");
- }
protected Object doExecute() throws Exception {
//
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java Tue Sep 4 01:52:44 2007
@@ -37,10 +37,6 @@
@Argument(description="System exit code")
private int exitCode = 0;
- public ExitCommand() {
- super("exit");
- }
-
protected String getUsage() {
return super.getUsage() + " [code]";
}
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java Tue Sep 4 01:52:44 2007
@@ -19,14 +19,15 @@
package org.apache.geronimo.gshell.commands.builtins;
+import java.util.List;
+
import org.apache.geronimo.gshell.command.Command;
-import org.apache.geronimo.gshell.command.CommandDefinition;
-import org.apache.geronimo.gshell.command.CommandManager;
import org.apache.geronimo.gshell.command.CommandSupport;
import org.apache.geronimo.gshell.command.IO;
-import org.apache.geronimo.gshell.common.Arguments;
+import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
+import org.codehaus.plexus.component.repository.ComponentDescriptor;
/**
* Display help
@@ -38,29 +39,20 @@
extends CommandSupport
{
@Requirement
- private CommandManager commandManager;
-
- public HelpCommand() {
- super("help");
- }
+ private PlexusContainer container;
protected Object doExecute() throws Exception {
+ assert container != null;
+
IO io = getIO();
io.out.println("Available commands:");
- for (CommandDefinition def : commandManager.commandDefinitions()) {
- io.out.print(" ");
- io.out.print(def.getName());
-
- // Include a list of aliases
- String[] aliases = def.getAliases();
- if (aliases.length != 0) {
- io.out.print(" ( ");
- io.out.print(Arguments.asString(aliases));
- io.out.print(" )");
- }
+ List<ComponentDescriptor> list = container.getComponentDescriptorList(Command.class.getName());
+ for (ComponentDescriptor desc : list) {
+ io.out.print(" ");
+ io.out.print(desc.getRoleHint());
io.out.println();
}
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java Tue Sep 4 01:52:44 2007
@@ -23,13 +23,13 @@
import java.util.List;
import java.util.Properties;
+import org.apache.geronimo.gshell.VariablesImpl;
import org.apache.geronimo.gshell.clp.Argument;
import org.apache.geronimo.gshell.clp.Option;
+import org.apache.geronimo.gshell.command.Command;
import org.apache.geronimo.gshell.command.CommandSupport;
-import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.command.IO;
-import org.apache.geronimo.gshell.command.Command;
-import org.apache.geronimo.gshell.VariablesImpl;
+import org.apache.geronimo.gshell.command.Variables;
import org.codehaus.plexus.component.annotations.Component;
/**
@@ -52,10 +52,6 @@
@Argument(description="Variable definition")
private List<String> args;
-
- public SetCommand() {
- super("set");
- }
protected String getUsage() {
return super.getUsage() + " (<name[=value>])*";
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java Tue Sep 4 01:52:44 2007
@@ -49,14 +49,6 @@
@Argument(required=true, description="Source file")
private File file;
- public SourceCommand() {
- super("source");
- }
-
- public void setShell(final Shell shell) {
- this.shell = shell;
- }
-
protected String getUsage() {
return super.getUsage() + " <file|url>";
}
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java Tue Sep 4 01:52:44 2007
@@ -21,12 +21,12 @@
import java.util.List;
+import org.apache.geronimo.gshell.VariablesImpl;
import org.apache.geronimo.gshell.clp.Argument;
import org.apache.geronimo.gshell.clp.Option;
+import org.apache.geronimo.gshell.command.Command;
import org.apache.geronimo.gshell.command.CommandSupport;
import org.apache.geronimo.gshell.command.Variables;
-import org.apache.geronimo.gshell.command.Command;
-import org.apache.geronimo.gshell.VariablesImpl;
import org.codehaus.plexus.component.annotations.Component;
/**
@@ -49,14 +49,6 @@
@Argument(required=true, description="Variable name")
private List<String> args;
-
- public UnsetCommand() {
- super("unset");
- }
-
- protected String getUsage() {
- return super.getUsage() + " (<name>)+";
- }
protected Object doExecute() throws Exception {
for (String arg : args) {
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/CatCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/CatCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/CatCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/CatCommand.java Tue Sep 4 01:52:44 2007
@@ -30,11 +30,11 @@
import org.apache.geronimo.gshell.clp.Argument;
import org.apache.geronimo.gshell.clp.Option;
+import org.apache.geronimo.gshell.command.Command;
import org.apache.geronimo.gshell.command.CommandSupport;
import org.apache.geronimo.gshell.command.IO;
-import org.apache.geronimo.gshell.command.Command;
-import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.util.StringUtils;
/**
* Concatenate and print files and/or URLs.
@@ -50,10 +50,6 @@
@Argument(description="File or URL", required=true)
private List<String> args;
-
- public CatCommand() {
- super("cat");
- }
protected String getUsage() {
return super.getUsage() + " [<file|url> ...]";
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/EchoCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/EchoCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/EchoCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/EchoCommand.java Tue Sep 4 01:52:44 2007
@@ -23,9 +23,9 @@
import org.apache.geronimo.gshell.clp.Argument;
import org.apache.geronimo.gshell.clp.Option;
+import org.apache.geronimo.gshell.command.Command;
import org.apache.geronimo.gshell.command.CommandSupport;
import org.apache.geronimo.gshell.command.IO;
-import org.apache.geronimo.gshell.command.Command;
import org.codehaus.plexus.component.annotations.Component;
/**
@@ -42,10 +42,6 @@
@Argument(description="Arguments")
private List<String> args;
-
- public EchoCommand() {
- super("echo");
- }
protected Object doExecute() throws Exception {
IO io = getIO();
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/ExecuteCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/ExecuteCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/ExecuteCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/ExecuteCommand.java Tue Sep 4 01:52:44 2007
@@ -22,10 +22,10 @@
import java.util.List;
import org.apache.geronimo.gshell.clp.Argument;
+import org.apache.geronimo.gshell.command.Command;
import org.apache.geronimo.gshell.command.CommandSupport;
-import org.apache.geronimo.gshell.common.io.PumpStreamHandler;
import org.apache.geronimo.gshell.command.IO;
-import org.apache.geronimo.gshell.command.Command;
+import org.apache.geronimo.gshell.common.io.PumpStreamHandler;
import org.codehaus.plexus.component.annotations.Component;
/**
@@ -41,11 +41,7 @@
@Argument(description="Argument", required=true)
private List<String> args;
-
- public ExecuteCommand() {
- super("exec");
- }
-
+
protected String getUsage() {
return super.getUsage() + " <command> (<arg>)*";
}
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/JavaCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/JavaCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/JavaCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/JavaCommand.java Tue Sep 4 01:52:44 2007
@@ -24,8 +24,8 @@
import org.apache.geronimo.gshell.clp.Argument;
import org.apache.geronimo.gshell.clp.Option;
-import org.apache.geronimo.gshell.command.CommandSupport;
import org.apache.geronimo.gshell.command.Command;
+import org.apache.geronimo.gshell.command.CommandSupport;
import org.apache.geronimo.gshell.common.Arguments;
import org.codehaus.plexus.component.annotations.Component;
@@ -50,10 +50,6 @@
@Argument(index=1, description="Arguments")
private List<String> args;
-
- public JavaCommand() {
- super("java");
- }
protected String getUsage() {
return super.getUsage() + " <classname> [arguments]";
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/SleepCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/SleepCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/SleepCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/SleepCommand.java Tue Sep 4 01:52:44 2007
@@ -20,8 +20,8 @@
package org.apache.geronimo.gshell.commands.optional;
import org.apache.geronimo.gshell.clp.Argument;
-import org.apache.geronimo.gshell.command.CommandSupport;
import org.apache.geronimo.gshell.command.Command;
+import org.apache.geronimo.gshell.command.CommandSupport;
import org.codehaus.plexus.component.annotations.Component;
/**
@@ -35,10 +35,6 @@
{
@Argument(description="Time in milliseconds", required=true)
private int time = -1;
-
- public SleepCommand() {
- super("sleep");
- }
protected String getUsage() {
return super.getUsage() + " <milliseconds>";
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/WaitCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/WaitCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/WaitCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/WaitCommand.java Tue Sep 4 01:52:44 2007
@@ -19,8 +19,8 @@
package org.apache.geronimo.gshell.commands.optional;
-import org.apache.geronimo.gshell.command.CommandSupport;
import org.apache.geronimo.gshell.command.Command;
+import org.apache.geronimo.gshell.command.CommandSupport;
import org.codehaus.plexus.component.annotations.Component;
//
@@ -37,10 +37,6 @@
public class WaitCommand
extends CommandSupport
{
- public WaitCommand() {
- super("wait");
- }
-
protected Object doExecute() throws Exception {
log.info("Waiting...");
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs/src/main/java/org/apache/geronimo/gshell/commands/vfs/CopyCommand.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs/src/main/java/org/apache/geronimo/gshell/commands/vfs/CopyCommand.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs/src/main/java/org/apache/geronimo/gshell/commands/vfs/CopyCommand.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs/src/main/java/org/apache/geronimo/gshell/commands/vfs/CopyCommand.java Tue Sep 4 01:52:44 2007
@@ -41,10 +41,6 @@
@Argument(index=1, required=true, description="Target")
private String targetName;
- public CopyCommand() {
- super("copy");
- }
-
protected String getUsage() {
return super.getUsage() + " <source> <target>";
}
Modified: geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs/src/main/java/org/apache/geronimo/gshell/commands/vfs/VFSCommandSupport.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs/src/main/java/org/apache/geronimo/gshell/commands/vfs/VFSCommandSupport.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs/src/main/java/org/apache/geronimo/gshell/commands/vfs/VFSCommandSupport.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-commands/gshell-vfs/src/main/java/org/apache/geronimo/gshell/commands/vfs/VFSCommandSupport.java Tue Sep 4 01:52:44 2007
@@ -33,11 +33,11 @@
{
private FileSystemManager fsManager;
- protected VFSCommandSupport(final String name) {
- super(name);
- }
-
protected void doInit() throws Exception {
+ //
+ // TODO: Should probably bind this pupping into the container and let plexus handle it for us
+ //
+
fsManager = VFS.getManager();
}
Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellPluginCollector.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellPluginCollector.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellPluginCollector.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellPluginCollector.java Tue Sep 4 01:52:44 2007
@@ -27,7 +27,7 @@
import org.slf4j.LoggerFactory;
/**
- * ???
+ * Hook to get some details about the Plexus components which are loaded.
*
* @version $Rev$ $Date$
*/
@@ -39,87 +39,6 @@
private final Logger log = LoggerFactory.getLogger(getClass());
- /*
- private Set pluginsInProcess = new HashSet();
-
- private Map pluginDescriptors = new HashMap();
-
- private Map pluginIdsByPrefix = new HashMap();
-
- // ----------------------------------------------------------------------
- // Mojo discovery
- // ----------------------------------------------------------------------
-
- public void componentDiscovered( ComponentDiscoveryEvent event )
- {
- ComponentSetDescriptor componentSetDescriptor = event.getComponentSetDescriptor();
-
- if ( componentSetDescriptor instanceof PluginDescriptor )
- {
- PluginDescriptor pluginDescriptor = (PluginDescriptor) componentSetDescriptor;
-
- // TODO: see comment in getPluginDescriptor
- String key = Plugin.constructKey( pluginDescriptor.getGroupId(), pluginDescriptor.getArtifactId() );
-
- if ( !pluginsInProcess.contains( key ) )
- {
- pluginsInProcess.add( key );
-
- getLogger().debug( this + ": Discovered plugin: " + key );
-
- pluginDescriptors.put( key, pluginDescriptor );
-
- // TODO: throw an (not runtime) exception if there is a prefix overlap - means doing so elsewhere
- // we also need to deal with multiple versions somehow - currently, first wins
- if ( !pluginIdsByPrefix.containsKey( pluginDescriptor.getGoalPrefix() ) )
- {
- pluginIdsByPrefix.put( pluginDescriptor.getGoalPrefix(), pluginDescriptor );
- }
- }
- }
- }
-
- public String getId()
- {
- return "maven-plugin-collector";
- }
-
- public PluginDescriptor getPluginDescriptor( Plugin plugin )
- {
- // TODO: include version, but can't do this in the plugin manager as it is not resolved to the right version
- // at that point. Instead, move the duplication check to the artifact container, or store it locally based on
- // the unresolved version?
- return (PluginDescriptor) pluginDescriptors.get( plugin.getKey() );
- }
-
- public boolean isPluginInstalled( Plugin plugin )
- {
- // TODO: see comment in getPluginDescriptor
- return pluginDescriptors.containsKey( plugin.getKey() );
- }
-
- public PluginDescriptor getPluginDescriptorForPrefix( String prefix )
- {
- return (PluginDescriptor) pluginIdsByPrefix.get( prefix );
- }
-
- public void flushPluginDescriptor( Plugin plugin )
- {
- pluginsInProcess.remove( plugin.getKey() );
- pluginDescriptors.remove( plugin.getKey() );
-
- for ( Iterator it = pluginIdsByPrefix.entrySet().iterator(); it.hasNext(); )
- {
- Map.Entry entry = (Map.Entry) it.next();
-
- if ( plugin.getKey().equals( entry.getValue() ) )
- {
- it.remove();
- }
- }
- }
- */
-
public String getId() {
return ID;
}
Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellPluginDiscoverer.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellPluginDiscoverer.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellPluginDiscoverer.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellPluginDiscoverer.java Tue Sep 4 01:52:44 2007
@@ -25,7 +25,7 @@
import org.slf4j.LoggerFactory;
/**
- * ???
+ * Custom Plexus component discovery compoentn to handle the GShell plugin.xml muck.
*
* @version $Rev$ $Date$
*/
@@ -34,83 +34,8 @@
extends DefaultComponentDiscoverer// AbstractComponentDiscoverer
{
private final Logger log = LoggerFactory.getLogger(getClass());
-
- /*
- private PluginDescriptorBuilder builder;
- public MavenPluginDiscoverer()
- {
- builder = new PluginDescriptorBuilder();
- }
-
- public String getComponentDescriptorLocation()
- {
- return "META-INF/maven/plugin.xml";
- }
-
- public ComponentSetDescriptor createComponentDescriptors( Reader componentDescriptorConfiguration, String source )
- throws PlexusConfigurationException
- {
- return builder.build( componentDescriptorConfiguration, source );
- }
- */
-
- /*
- protected String getComponentDescriptorLocation() {
- return null;
- }
-
- protected ComponentSetDescriptor createComponentDescriptors(Reader reader, String source) throws PlexusConfigurationException {
- return null;
- }
- */
-
- /*
- This is the default bits...
-
- public String getComponentDescriptorLocation()
- {
- return "META-INF/plexus/components.xml";
- }
-
- public ComponentSetDescriptor createComponentDescriptors( Reader componentDescriptorReader, String source )
- throws PlexusConfigurationException
- {
- PlexusConfiguration componentDescriptorConfiguration = PlexusTools.buildConfiguration( source, componentDescriptorReader );
-
- ComponentSetDescriptor componentSetDescriptor = new ComponentSetDescriptor();
-
- List componentDescriptors = new ArrayList();
-
- PlexusConfiguration[] componentConfigurations =
- componentDescriptorConfiguration.getChild( "components" ).getChildren( "component" );
-
- for ( int i = 0; i < componentConfigurations.length; i++ )
- {
- PlexusConfiguration componentConfiguration = componentConfigurations[i];
-
- ComponentDescriptor componentDescriptor;
-
- try
- {
- componentDescriptor = PlexusTools.buildComponentDescriptor( componentConfiguration );
- }
- catch ( PlexusConfigurationException e )
- {
- throw new PlexusConfigurationException( "Cannot process component descriptor: " + source, e );
- }
-
- componentDescriptor.setSource( source );
- componentDescriptor.setComponentType( "plexus" );
-
- componentDescriptors.add( componentDescriptor );
- }
-
- componentSetDescriptor.setComponents( componentDescriptors );
-
- // TODO: read and store the dependencies
-
- return componentSetDescriptor;
- }
- */
+ //
+ // TODO: Put the custom plugin.xml descriptor muck here...
+ //
}
Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/JLineConsole.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/JLineConsole.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/JLineConsole.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/JLineConsole.java Tue Sep 4 01:52:44 2007
@@ -25,8 +25,8 @@
import jline.ConsoleReader;
import jline.History;
-import org.apache.geronimo.gshell.console.Console;
import org.apache.geronimo.gshell.command.IO;
+import org.apache.geronimo.gshell.console.Console;
/**
* Support for running a {@link Shell} using the <a href="http://jline.sf.net">JLine</a> library.
Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/PlexusLoggingAdapter.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/PlexusLoggingAdapter.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/PlexusLoggingAdapter.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/PlexusLoggingAdapter.java Tue Sep 4 01:52:44 2007
@@ -21,7 +21,6 @@
import org.codehaus.plexus.logging.AbstractLogger;
import org.codehaus.plexus.logging.BaseLoggerManager;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/Shell.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/Shell.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/Shell.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/Shell.java Tue Sep 4 01:52:44 2007
@@ -23,7 +23,6 @@
import org.apache.geronimo.gshell.command.Command;
import org.apache.geronimo.gshell.command.CommandContext;
-import org.apache.geronimo.gshell.command.CommandManager;
import org.apache.geronimo.gshell.command.IO;
import org.apache.geronimo.gshell.command.Variables;
import org.apache.geronimo.gshell.common.Arguments;
@@ -58,9 +57,6 @@
private LayoutManager layoutManager;
@Requirement
- private CommandManager commandManager;
-
- @Requirement
private CommandLineBuilder commandLineBuilder;
private Variables variables = new VariablesImpl();
@@ -89,16 +85,11 @@
return io;
}
- public CommandManager getCommandManager() {
- return commandManager;
- }
-
public void initialize() throws InitializationException {
// Dump some debug to crapski
if (log.isDebugEnabled()) {
log.debug("Container: {}", container);
log.debug("Layout manager: {}", layoutManager);
- log.debug("Command manager: {}", commandManager);
log.debug("Builder: {}", commandLineBuilder);
}
}
@@ -127,8 +118,7 @@
while (iter.hasNext()) {
String name = iter.next();
-
- log.debug(" " + name + "=" + vars.get(name));
+ log.debug(" {}={}", name, vars.get(name));
}
}
@@ -148,11 +138,6 @@
final PlexusContainer childContainer = container.createChildContainer("command-invocation", container.getContainerRealm());
final Command command = (Command)childContainer.lookup(Command.class, commandName);
-
- //
- // TODO: DI all bits if we can, then free up "context" to replace "category" as a term
- //
-
final Variables vars = new VariablesImpl(getVariables());
command.init(new CommandContext() {
Modified: geronimo/sandbox/gshell/trunk/gshell-i18n/src/main/java/org/apache/geronimo/gshell/i18n/ResourceBundleMessageSource.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-i18n/src/main/java/org/apache/geronimo/gshell/i18n/ResourceBundleMessageSource.java?rev=572585&r1=572584&r2=572585&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-i18n/src/main/java/org/apache/geronimo/gshell/i18n/ResourceBundleMessageSource.java (original)
+++ geronimo/sandbox/gshell/trunk/gshell-i18n/src/main/java/org/apache/geronimo/gshell/i18n/ResourceBundleMessageSource.java Tue Sep 4 01:52:44 2007
@@ -19,9 +19,9 @@
package org.apache.geronimo.gshell.i18n;
-import java.util.ResourceBundle;
-import java.util.MissingResourceException;
import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
import org.codehaus.plexus.util.StringUtils;