Author: jdillon
Date: Thu Sep 11 08:54:17 2008
New Revision: 694319
URL: http://svn.apache.org/viewvc?rev=694319&view=rev
Log:
Drop command annotations
Hook up remaining commands in builtins
Add qualifier to the default CommandLineExecutor for auto-wiring
Update some logging configuration
Removed:
geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/annotation/
Modified:
geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerAware.java
geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/commandline/CommandLine.java
geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/gsh-log4j.properties
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ClearCommand.java
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/EchoCommand.java
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java
geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml
geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContext.java
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/spring/components.xml
Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerAware.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerAware.java?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerAware.java
(original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/command/CommandContainerAware.java
Thu Sep 11 08:54:17 2008
@@ -20,7 +20,7 @@
package org.apache.geronimo.gshell.command;
/**
- * ???
+ * Marks a component as aware of it's {@link CommandContainer}.
*
* @version $Rev$ $Date$
*/
Modified: geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/commandline/CommandLine.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/commandline/CommandLine.java?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/commandline/CommandLine.java
(original)
+++ geronimo/gshell/trunk/gshell-api/src/main/java/org/apache/geronimo/gshell/commandline/CommandLine.java
Thu Sep 11 08:54:17 2008
@@ -33,8 +33,7 @@
* Execute the command-line.
*
* @param executor The command-line executor to handle execution of command-line elements.
- *
- * @return The final result of the command-line.
+ * @return The final result of the command-line.
*
* @throws Exception Failed to execute command-line.
*/
Modified: geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/gsh-log4j.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/gsh-log4j.properties?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/gsh-log4j.properties (original)
+++ geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/gsh-log4j.properties Thu Sep
11 08:54:17 2008
@@ -32,7 +32,6 @@
log4j.appender.CONSOLE.Threshold=${gshell.log.console.level}
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%-5p %-25.30c{1} [%t] %m%n
-#log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
log4j.appender.FILE=org.apache.log4j.FileAppender
log4j.appender.FILE.File=${gshell.home}/log/gshell.log
@@ -47,12 +46,13 @@
log4j.logger.org.apache.geronimo.gshell.artifact.monitor.ProgressSpinnerMonitor=INFO
log4j.logger.org.apache.geronimo.gshell.application.ApplicationSecurityManager=DEBUG
log4j.logger.org.apache.geronimo.gshell.model.interpolate.InterpolatorSupport=DEBUG
-
-#log4j.logger.org.apache.geronimo.gshell.plugin=INFO
log4j.logger.org.apache.geronimo.gshell.console=INFO
log4j.logger.org.apache.geronimo.gshell.common.NamedThreadFactory=INFO
+# Make Plexus shutup
log4j.logger.org.codehaus.plexus.PlexusContainer=INFO
+
+# Keep MINA quiet
log4j.logger.org.apache.mina.filter.executor.ExecutorFilter=INFO
# Keep some of the bits used to handle artifacts + repository muck quieter
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ClearCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ClearCommand.java?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ClearCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ClearCommand.java
Thu Sep 11 08:54:17 2008
@@ -23,7 +23,6 @@
import org.apache.geronimo.gshell.ansi.ANSI;
import org.apache.geronimo.gshell.command.CommandAction;
import org.apache.geronimo.gshell.command.CommandContext;
-import org.apache.geronimo.gshell.command.annotation.CommandComponent;
import org.apache.geronimo.gshell.io.IO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -35,7 +34,6 @@
*
* @version $Rev$ $Date$
*/
-@CommandComponent(id="gshell-builtins:clear", description="Clear the terminal screen")
public class ClearCommand
implements CommandAction
{
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/EchoCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/EchoCommand.java?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/EchoCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/EchoCommand.java
Thu Sep 11 08:54:17 2008
@@ -23,7 +23,6 @@
import org.apache.geronimo.gshell.clp.Option;
import org.apache.geronimo.gshell.command.CommandAction;
import org.apache.geronimo.gshell.command.CommandContext;
-import org.apache.geronimo.gshell.command.annotation.CommandComponent;
import org.apache.geronimo.gshell.io.IO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -35,7 +34,6 @@
*
* @version $Rev$ $Date$
*/
-@CommandComponent(id="gshell-builtins:echo", description="Echo or print arguments to STDOUT")
public class EchoCommand
implements CommandAction
{
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/ExitCommand.java
Thu Sep 11 08:54:17 2008
@@ -22,7 +22,6 @@
import org.apache.geronimo.gshell.clp.Argument;
import org.apache.geronimo.gshell.command.CommandAction;
import org.apache.geronimo.gshell.command.CommandContext;
-import org.apache.geronimo.gshell.command.annotation.CommandComponent;
import org.apache.geronimo.gshell.notification.ExitNotification;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,7 +31,6 @@
*
* @version $Rev$ $Date$
*/
-@CommandComponent(id="gshell-builtins:exit", description="Exit the shell")
public class ExitCommand
implements CommandAction
{
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/HelpCommand.java
Thu Sep 11 08:54:17 2008
@@ -31,8 +31,6 @@
import org.apache.geronimo.gshell.command.CommandInfo;
import org.apache.geronimo.gshell.command.CommandResolver;
import org.apache.geronimo.gshell.command.Variables;
-import org.apache.geronimo.gshell.command.annotation.CommandComponent;
-import org.apache.geronimo.gshell.command.annotation.Requirement;
import org.apache.geronimo.gshell.io.IO;
import org.apache.geronimo.gshell.layout.LayoutManager;
import org.apache.geronimo.gshell.model.layout.AliasNode;
@@ -49,7 +47,6 @@
*
* @version $Rev$ $Date$
*/
-@CommandComponent(id="gshell-builtins:help", description="Show command help")
public class HelpCommand
implements CommandAction
{
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SetCommand.java
Thu Sep 11 08:54:17 2008
@@ -24,7 +24,6 @@
import org.apache.geronimo.gshell.command.CommandAction;
import org.apache.geronimo.gshell.command.CommandContext;
import org.apache.geronimo.gshell.command.Variables;
-import org.apache.geronimo.gshell.command.annotation.CommandComponent;
import org.apache.geronimo.gshell.io.IO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -38,7 +37,6 @@
*
* @version $Rev$ $Date$
*/
-@CommandComponent(id="gshell-builtins:set", description="Set a variable")
public class SetCommand
implements CommandAction
{
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/SourceCommand.java
Thu Sep 11 08:54:17 2008
@@ -22,11 +22,12 @@
import org.apache.geronimo.gshell.clp.Argument;
import org.apache.geronimo.gshell.command.CommandAction;
import org.apache.geronimo.gshell.command.CommandContext;
-import org.apache.geronimo.gshell.command.annotation.CommandComponent;
import org.apache.geronimo.gshell.commandline.CommandLineExecutor;
import org.codehaus.plexus.util.IOUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
import java.io.BufferedReader;
import java.io.File;
@@ -41,13 +42,13 @@
*
* @version $Rev$ $Date$
*/
-@CommandComponent(id="gshell-builtins:source", description="Load a file/url into the current
shell")
public class SourceCommand
implements CommandAction
{
private final Logger log = LoggerFactory.getLogger(getClass());
- // @Autowired
+ @Autowired
+ @Qualifier("default")
private CommandLineExecutor executor;
@Argument(required=true, description="Source file")
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/UnsetCommand.java
Thu Sep 11 08:54:17 2008
@@ -24,7 +24,6 @@
import org.apache.geronimo.gshell.command.CommandAction;
import org.apache.geronimo.gshell.command.CommandContext;
import org.apache.geronimo.gshell.command.Variables;
-import org.apache.geronimo.gshell.command.annotation.CommandComponent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -35,7 +34,6 @@
*
* @version $Rev$ $Date$
*/
-@CommandComponent(id="gshell-builtins:unset", description="Unset a variable")
public class UnsetCommand
implements CommandAction
{
Modified: geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml
(original)
+++ geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/resources/META-INF/spring/components.xml
Thu Sep 11 08:54:17 2008
@@ -32,6 +32,38 @@
<context:annotation-config/>
<bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
+ <property name="id" value="gshell-builtins:clear"/>
+
+ <property name="action">
+ <bean class="org.apache.geronimo.gshell.commands.builtins.ClearCommand"/>
+ </property>
+
+ <property name="completer">
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandCompleterImpl"/>
+ </property>
+
+ <property name="documenter">
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
+ </property>
+ </bean>
+
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
+ <property name="id" value="gshell-builtins:echo"/>
+
+ <property name="action">
+ <bean class="org.apache.geronimo.gshell.commands.builtins.EchoCommand"/>
+ </property>
+
+ <property name="completer">
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandCompleterImpl"/>
+ </property>
+
+ <property name="documenter">
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
+ </property>
+ </bean>
+
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
<property name="id" value="gshell-builtins:exit"/>
<property name="action">
@@ -43,12 +75,7 @@
</property>
<property name="documenter">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl">
- <!--
- <property name="name" value="echo"/>
- <property name="description" value="Blah, blah, blah"/>
- -->
- </bean>
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
</property>
</bean>
@@ -64,20 +91,47 @@
</property>
<property name="documenter">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl">
- <!--
- <property name="name" value="echo"/>
- <property name="description" value="Blah, blah, blah"/>
- -->
- </bean>
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
</property>
</bean>
<bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
- <property name="id" value="gshell-builtins:echo"/>
+ <property name="id" value="gshell-builtins:set"/>
<property name="action">
- <bean class="org.apache.geronimo.gshell.commands.builtins.EchoCommand"/>
+ <bean class="org.apache.geronimo.gshell.commands.builtins.SetCommand"/>
+ </property>
+
+ <property name="completer">
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandCompleterImpl"/>
+ </property>
+
+ <property name="documenter">
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
+ </property>
+ </bean>
+
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
+ <property name="id" value="gshell-builtins:source"/>
+
+ <property name="action">
+ <bean class="org.apache.geronimo.gshell.commands.builtins.SourceCommand"/>
+ </property>
+
+ <property name="completer">
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandCompleterImpl"/>
+ </property>
+
+ <property name="documenter">
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
+ </property>
+ </bean>
+
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandContainerImpl">
+ <property name="id" value="gshell-builtins:unset"/>
+
+ <property name="action">
+ <bean class="org.apache.geronimo.gshell.commands.builtins.UnsetCommand"/>
</property>
<property name="completer">
@@ -85,12 +139,7 @@
</property>
<property name="documenter">
- <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl">
- <!--
- <property name="name" value="echo"/>
- <property name="description" value="Blah, blah, blah"/>
- -->
- </bean>
+ <bean class="org.apache.geronimo.gshell.wisdom.command.CommandDocumenterImpl"/>
</property>
</bean>
Modified: geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContext.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContext.java?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContext.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContext.java
Thu Sep 11 08:54:17 2008
@@ -97,7 +97,7 @@
for (Resource resource : resources) {
if (ownedResources.contains(resource)) {
- log.debug("Filtered owned resource: {}", resource);
+ log.trace("Filtered owned resource: {}", resource);
}
else {
list.add(resource);
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/spring/components.xml?rev=694319&r1=694318&r2=694319&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/spring/components.xml
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/resources/META-INF/spring/components.xml
Thu Sep 11 08:54:17 2008
@@ -37,7 +37,9 @@
<bean id="commandLineBuilder" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineBuilderImpl"/>
- <bean id="commandLineExecutor" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl"/>
+ <bean id="commandLineExecutor" class="org.apache.geronimo.gshell.wisdom.shell.CommandLineExecutorImpl">
+ <qualifier value="default"/>
+ </bean>
<bean id="history" class="org.apache.geronimo.gshell.wisdom.shell.HistoryImpl"/>
|