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 2008/11/28 07:28:49 UTC

svn commit: r721355 - in /geronimo/gshell/trunk: ./ gshell-application/src/main/java/org/apache/geronimo/gshell/application/model/ gshell-local-repository/org/apache/maven/maven/2.1.0-r721111/ gshell-support/gshell-artifact-maven/src/main/java/org/apac...

Author: jdillon
Date: Thu Nov 27 22:28:48 2008
New Revision: 721355

URL: http://svn.apache.org/viewvc?rev=721355&view=rev
Log:
Tidy up 

Removed:
    geronimo/gshell/trunk/gshell-support/gshell-event/src/main/java/org/apache/geronimo/gshell/event/EventAdapter.java
Modified:
    geronimo/gshell/trunk/NOTES.txt
    geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/model/ApplicationModel.java
    geronimo/gshell/trunk/gshell-local-repository/org/apache/maven/maven/2.1.0-r721111/maven-2.1.0-r721111.pom
    geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactManagerConfigurator.java
    geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactMetadataSourceImpl.java
    geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactRepositoryManagerImpl.java
    geronimo/gshell/trunk/gshell-support/gshell-console/src/main/java/org/apache/geronimo/gshell/console/JLineConsole.java
    geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContextSupport.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/test/resources/org/apache/geronimo/gshell/wisdom/config/PluginParserTest-context.xml

Modified: geronimo/gshell/trunk/NOTES.txt
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/NOTES.txt?rev=721355&r1=721354&r2=721355&view=diff
==============================================================================
--- geronimo/gshell/trunk/NOTES.txt (original)
+++ geronimo/gshell/trunk/NOTES.txt Thu Nov 27 22:28:48 2008
@@ -1,12 +1,8 @@
-FIMXE: gshell-artifact
-    -maven
-    -ivy
-    Create ArtifactResolver facade
-
-FIXME: Make the local ivy cache m2 compatible
-
 Integrate Jexl into gshell-parser
 
+Re-hookup Download monitor stuff for gshell-artifact-maven
+    try to get it working for gshell-artifact-ivy too?
+
 Create single VFS configuration component, reduce the number of objects needed at boot
 
 Create a repo:// filesystem
@@ -27,7 +23,7 @@
 
 Better handling for Object arguments/return for commands and variable passing
 
-FIXME: CommandsCompleter doesn't complete in group, implement CommandPathCompleter
+CommandsCompleter doesn't complete in group, implement CommandPathCompleter
 
 Voodoo, something cool which will load a plugin, then cache the basic details for the shell
     to function, so next time it won't need to load the plugin until a plugin command is executed

Modified: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/model/ApplicationModel.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/model/ApplicationModel.java?rev=721355&r1=721354&r2=721355&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/model/ApplicationModel.java (original)
+++ geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/model/ApplicationModel.java Thu Nov 27 22:28:48 2008
@@ -174,7 +174,7 @@
     public void setBranding(final Branding branding) {
         this.branding = branding;
 
-        // HACK: Hookup parent
+        // HACK: Hookup parent, this should eventually go away
         branding.setParent(this);
     }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-local-repository/org/apache/maven/maven/2.1.0-r721111/maven-2.1.0-r721111.pom
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-local-repository/org/apache/maven/maven/2.1.0-r721111/maven-2.1.0-r721111.pom?rev=721355&r1=721354&r2=721355&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-local-repository/org/apache/maven/maven/2.1.0-r721111/maven-2.1.0-r721111.pom (original)
+++ geronimo/gshell/trunk/gshell-local-repository/org/apache/maven/maven/2.1.0-r721111/maven-2.1.0-r721111.pom Thu Nov 27 22:28:48 2008
@@ -209,8 +209,6 @@
             <!-- needed for release: default value "(,${project.version})" for 2.0.10 is 2.0.10-SNAPSHOT -->
             <comparisonVersion>2.0.9</comparisonVersion>
             <excludes>
-              <!-- TODO: These represent method ADDITIONS from 2.0.9, and should be removed after
-                   2.0.10 is released. -->
               <exclude>org/apache/maven/lifecycle/LifecycleExecutor*</exclude>
               <exclude>org/apache/maven/artifact/metadata/AbstractArtifactMetadata*</exclude>
               <exclude>org/apache/maven/artifact/metadata/ArtifactMetadataSource*</exclude>

Modified: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactManagerConfigurator.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactManagerConfigurator.java?rev=721355&r1=721354&r2=721355&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactManagerConfigurator.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactManagerConfigurator.java Thu Nov 27 22:28:48 2008
@@ -51,6 +51,10 @@
         this.localRepository = dir;
     }
 
+    //
+    // TODO: Allow repository policies and such to be configured here too.
+    //
+    
     public void setRemoteRepositories(final Map<String,URI> repositories) {
         assert repositories != null;
         this.remoteRepositories = repositories;

Modified: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactMetadataSourceImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactMetadataSourceImpl.java?rev=721355&r1=721354&r2=721355&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactMetadataSourceImpl.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactMetadataSourceImpl.java Thu Nov 27 22:28:48 2008
@@ -43,10 +43,6 @@
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    //
-    // TODO: Look into creating a simple model that only deals with dependency bits and perform basic processing, avoiding the need for all this Maven stuff
-    //
-
     @Requirement(hint="maven")
     private ArtifactMetadataSource delegate;
 

Modified: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactRepositoryManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactRepositoryManagerImpl.java?rev=721355&r1=721354&r2=721355&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactRepositoryManagerImpl.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactRepositoryManagerImpl.java Thu Nov 27 22:28:48 2008
@@ -99,8 +99,6 @@
                 id,
                 location.toURL().toExternalForm(),
                 ArtifactRepositoryFactory.DEFAULT_LAYOUT_ID,
-
-                // FIXME: Expose more configuration to user API
                 new ArtifactRepositoryPolicy(),  // snapshots
                 new ArtifactRepositoryPolicy()); // releases
 

Modified: geronimo/gshell/trunk/gshell-support/gshell-console/src/main/java/org/apache/geronimo/gshell/console/JLineConsole.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-console/src/main/java/org/apache/geronimo/gshell/console/JLineConsole.java?rev=721355&r1=721354&r2=721355&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-console/src/main/java/org/apache/geronimo/gshell/console/JLineConsole.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-console/src/main/java/org/apache/geronimo/gshell/console/JLineConsole.java Thu Nov 27 22:28:48 2008
@@ -43,8 +43,32 @@
 
         assert io != null;
 
-        // TODO: Expose bindings
-        
+        // TODO: Expose bindings, and/or setup the default to load from our configured ~/.gshell/ directory.
+        /*
+        This is what ConsoleReader is doing related to bindings...
+
+        if (bindings == null) {
+            try {
+                String bindingFile = System.getProperty("jline.keybindings",
+                    new File(System.getProperty("user.home",
+                        ".jlinebindings.properties")).getAbsolutePath());
+
+                if (new File(bindingFile).isFile()) {
+                    bindings = new FileInputStream(new File(bindingFile));
+                }
+            } catch (Exception e) {
+                // swallow exceptions with option debugging
+                if (debugger != null) {
+                    e.printStackTrace(debugger);
+                }
+            }
+        }
+
+        if (bindings == null) {
+            bindings = terminal.getDefaultBindings();
+        }
+        */
+
         reader = new ConsoleReader(io.inputStream, new PrintWriter(io.outputStream, true), /*bindings*/null, io.getTerminal());
         reader.setUsePagination(true);
         reader.setCompletionHandler(new CandidateListCompletionHandler());

Modified: geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContextSupport.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContextSupport.java?rev=721355&r1=721354&r2=721355&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContextSupport.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerContextSupport.java Thu Nov 27 22:28:48 2008
@@ -521,7 +521,7 @@
 		reader.setEntityResolver(new ResourceEntityResolver(this));
         reader.setNamespaceAware(true);
         
-        // TODO: Make this configurable via system properties, default to VALIDATION_NONE
+        // TODO: Make this configurable via system properties, default to VALIDATION_NONE, disabling validation speeds things up a lot
         reader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_NONE);
 
 		loadBeanDefinitions(reader);

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java?rev=721355&r1=721354&r2=721355&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationManagerImpl.java Thu Nov 27 22:28:48 2008
@@ -24,7 +24,6 @@
 import org.apache.geronimo.gshell.application.ApplicationManager;
 import org.apache.geronimo.gshell.application.ClassPath;
 import org.apache.geronimo.gshell.application.model.ApplicationModel;
-import org.apache.geronimo.gshell.application.plugin.PluginManager;
 import org.apache.geronimo.gshell.artifact.Artifact;
 import org.apache.geronimo.gshell.artifact.ArtifactResolver;
 import org.apache.geronimo.gshell.chronos.StopWatch;
@@ -98,9 +97,6 @@
         application = loadApplication(config);
 
         log.debug("Application configured");
-
-        // HACK: Force the plugin manager to boot up before we fire the event
-        applicationContainer.getBean(PluginManager.class);
         
         eventPublisher.publish(new ApplicationConfiguredEvent(application));
     }
@@ -196,6 +192,10 @@
             //        the right approache at all :-(
             //
 
+            //
+            // FIXME: This SM actually causes some icky problems when trying to shutdown thread pools, which makes for ugly crap when using ssh
+            //
+            
             private final ApplicationSecurityManager sm = new ApplicationSecurityManager();
 
             public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java?rev=721355&r1=721354&r2=721355&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandRegistryImpl.java Thu Nov 27 22:28:48 2008
@@ -55,6 +55,7 @@
         assert command != null;
 
         // TODO: add a method on the CommandLocation to avoid using toString()
+
         String name = command.getLocation().getFullPath();
 
         log.debug("Registering command: {} -> {}", name, command);
@@ -72,6 +73,7 @@
         assert command != null;
 
         // TODO: add a method on the CommandLocation to avoid using toString()
+
         String name = command.getLocation().getFullPath();
 
         log.debug("Removing command: {}", name);

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java?rev=721355&r1=721354&r2=721355&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java Thu Nov 27 22:28:48 2008
@@ -132,7 +132,7 @@
         vars.set("SHELL.HISTORY", getHistory(), true);
 
         // HACK: Set the default prompt here for now, probably want to get this from branding
-        vars.set("gshell.prompt", "@|bold %{application.userName}|@%{application.localHost.hostName}:@|bold %{branding.name}|> ");
+        vars.set("gshell.prompt", "@|bold %{application.userName}|@%{application.localHost.hostName}:@|bold %{branding.name}:%{gshell.group}|> ");
         
         vars.set(CommandResolver.GROUP, "/");
 
@@ -141,7 +141,7 @@
         opened = true;
 
         //
-        // TODO: Populate variables with some defaults, like the username/hostname/etc.
+        // TODO: Populate variables with some defaults, like the username/hostname/etc?
         //
 
         loadProfileScripts();

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/test/resources/org/apache/geronimo/gshell/wisdom/config/PluginParserTest-context.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/test/resources/org/apache/geronimo/gshell/wisdom/config/PluginParserTest-context.xml?rev=721355&r1=721354&r2=721355&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/test/resources/org/apache/geronimo/gshell/wisdom/config/PluginParserTest-context.xml (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/test/resources/org/apache/geronimo/gshell/wisdom/config/PluginParserTest-context.xml Thu Nov 27 22:28:48 2008
@@ -120,9 +120,7 @@
             </gshell:command>
         </gshell:command-bundle>
 
-        <gshell:bundle name="customBundle" class="org.apache.geronimo.gshell.wisdom.config.DummyBundle">
-            <!-- TODO -->
-        </gshell:bundle>
+        <gshell:bundle name="customBundle" class="org.apache.geronimo.gshell.wisdom.config.DummyBundle"/>
     </gshell:plugin>
 
     <!--