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/05/21 16:48:07 UTC

svn commit: r658718 - in /geronimo/gshell/trunk: ./ gshell-assembly/ gshell-assembly/src/main/underlay/etc/ gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/ gshell-cli/src/main/resources/META-INF/plexus/ gshell-core/src/main/java/org/apache/ger...

Author: jdillon
Date: Wed May 21 07:48:06 2008
New Revision: 658718

URL: http://svn.apache.org/viewvc?rev=658718&view=rev
Log:
Hook up new GShellBuilder and Maven repo muck to the cli bits... yay
Drop old GShellImpl muck
Move the slf4j plexus stuff to gshell-plexus
Rename CommandDiscoveryListener to CommandCollector
Tidy up the progress download stuff a little
More stuff, related to the maven artifact/repo fluff

Added:
    geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml   (with props)
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandCollector.java   (contents, props changed)
      - copied, changed from r658599, geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoveryListener.java
    geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java   (contents, props changed)
      - copied, changed from r658599, geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/logging/Slf4jLoggingManager.java
Removed:
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellImpl.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/logging/Slf4jLoggingManager.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoveryListener.java
Modified:
    geronimo/gshell/trunk/gshell-assembly/pom.xml
    geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/gsh-log4j.properties
    geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
    geronimo/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/DefaultCommandExecutor.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellBuilder.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/ApplicationConfiguration.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/ApplicationManager.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoverer.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DefaultCommandRegistry.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/SettingsConfiguration.java
    geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/GShellBuilderTest.java
    geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Application.java
    geronimo/gshell/trunk/gshell-support/gshell-artifact/pom.xml
    geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/DefaultArtifactManager.java
    geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinner.java
    geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinnerMonitor.java
    geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/TransferListenerSupport.java
    geronimo/gshell/trunk/pom.xml

Modified: geronimo/gshell/trunk/gshell-assembly/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-assembly/pom.xml?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-assembly/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-assembly/pom.xml Wed May 21 07:48:06 2008
@@ -109,6 +109,16 @@
             <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-diet-log4j</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven.wagon</groupId>
+            <artifactId>wagon-file</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven.wagon</groupId>
+            <artifactId>wagon-http-lightweight</artifactId>
+        </dependency>
     </dependencies>
 
     <build>

Added: geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml?rev=658718&view=auto
==============================================================================
--- geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml (added)
+++ geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml Wed May 21 07:48:06 2008
@@ -0,0 +1,72 @@
+<?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$ -->
+
+<application>
+    <!--
+    <id>app.test</id>
+    <name>App Test</name>
+    <description>A test app descriptor.</description>
+    -->
+    
+    <!--
+    <properties>
+        <property name="a" value="b"/>
+    </properties>
+    -->
+
+    <repository>repository</repository>
+
+    <sourceRepositories>
+        <sourceRepository>
+            <location>file:/Users/jason/.m2/repository</location>
+        </sourceRepository>
+        <sourceRepository>
+            <location>http://repo1.maven.org/maven2</location>
+        </sourceRepository>
+    </sourceRepositories>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.gshell.commands</groupId>
+            <artifactId>gshell-builtins</artifactId>
+            <version>1.0-alpha-2-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+    <!--
+    <dependencyGroups>
+        <dependencyGroup>
+            <groupId>d</groupId>
+            <version>e</version>
+
+            <dependency>
+                <artifactId>f</artifactId>
+            </dependency>
+
+            <dependency>
+                <artifactId>g</artifactId>
+                <classifier>h</classifier>
+            </dependency>
+        </dependencyGroup>
+    </dependencyGroups>
+    -->
+</application>
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

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=658718&r1=658717&r2=658718&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 Wed May 21 07:48:06 2008
@@ -45,4 +45,9 @@
 log4j.logger.org.apache.geronimo.gshell.common.NamedThreadFactory=INFO
 
 log4j.logger.org.codehaus.plexus.PlexusContainer=INFO
-log4j.logger.org.apache.mina.filter.executor.ExecutorFilter=INFO
\ No newline at end of file
+log4j.logger.org.apache.mina.filter.executor.ExecutorFilter=INFO
+
+# Keep some of the bits used to handle artifacts + repository muck quieter
+log4j.logger.org.apache.maven=INFO
+log4j.logger.org.apache.maven.artifact.manager=ERROR
+log4j.logger.org.apache.maven.artifact.repository.metadata=WARN
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java (original)
+++ geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java Wed May 21 07:48:06 2008
@@ -19,20 +19,18 @@
 
 package org.apache.geronimo.gshell.cli;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicReference;
-
 import org.apache.geronimo.gshell.ExitNotification;
 import org.apache.geronimo.gshell.GShell;
-import org.apache.geronimo.gshell.GShellImpl;
-import org.apache.geronimo.gshell.io.IO;
+import org.apache.geronimo.gshell.GShellBuilder;
 import org.apache.geronimo.gshell.ansi.ANSI;
 import org.apache.geronimo.gshell.branding.Branding;
 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.io.IO;
+import org.apache.geronimo.gshell.model.application.Application;
+import org.apache.geronimo.gshell.model.application.ApplicationMarshaller;
 import org.codehaus.plexus.ContainerConfiguration;
 import org.codehaus.plexus.DefaultContainerConfiguration;
 import org.codehaus.plexus.DefaultPlexusContainer;
@@ -40,6 +38,11 @@
 import org.codehaus.plexus.PlexusContainerException;
 import org.codehaus.plexus.classworlds.ClassWorld;
 
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicReference;
+
 /**
  * Command-line bootstrap for GShell.
  *
@@ -241,8 +244,18 @@
         });
 
         try {
-            // FIXME:
-            GShell gshell = new GShellImpl(classWorld, io);
+            GShellBuilder builder = new GShellBuilder();
+            builder.setClassWorld(classWorld);
+            builder.setIo(io);
+            // builder.setSettings();
+
+            // TODO: Move to ApplicationFinder
+            ApplicationMarshaller applicationMarshaller = new ApplicationMarshaller();
+            URL applicationUrl = getClass().getClassLoader().getResource("application.xml");
+            Application application = applicationMarshaller.unmarshal(applicationUrl);
+            builder.setApplication(application);
+
+            GShell gshell = builder.build();
 
             // clp gives us a list, but we need an array
             String[] _args = commandArgs.toArray(new String[commandArgs.size()]);

Modified: geronimo/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml (original)
+++ geronimo/gshell/trunk/gshell-cli/src/main/resources/META-INF/plexus/plexus.xml Wed May 21 07:48:06 2008
@@ -25,12 +25,14 @@
         <!--
         Configure our logging component to be used so Plexus will pick it up.
         -->
+        <!--
         <component>
             <role>org.codehaus.plexus.logging.LoggerManager</role>
             <role-hint>default</role-hint>
-            <implementation>org.apache.geronimo.gshell.logging.Slf4jLoggingManager</implementation>
+            <implementation>org.apache.geronimo.gshell.plexus.Slf4jLoggingManager</implementation>
         </component>
-
+        -->
+        
         <!--
         Add our instance lookup components.
 

Modified: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/DefaultCommandExecutor.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/DefaultCommandExecutor.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/DefaultCommandExecutor.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/DefaultCommandExecutor.java Wed May 21 07:48:06 2008
@@ -213,12 +213,17 @@
     }
 
     protected Object execute(final String path, final Object[] args, final IO io) throws Exception {
+        log.debug("Executing");
+
         final String searchPath = (String) env.getVariables().get(LayoutManager.COMMAND_PATH);
-        
+        log.debug("Search path: {}", searchPath);
+
         final Node node = layoutManager.findNode(path, searchPath);
-        
-        final String id = findCommandId(node);
+        log.debug("Layout node: {}", node);
 
+        final String id = findCommandId(node);
+        log.debug("Command ID: {}", id);
+        
         final Command command;
         try {
             command = commandRegistry.lookup(id);

Modified: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellBuilder.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellBuilder.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/GShellBuilder.java Wed May 21 07:48:06 2008
@@ -30,6 +30,9 @@
 import org.apache.geronimo.gshell.settings.SettingsManager;
 import org.apache.geronimo.gshell.settings.SettingsConfiguration;
 import org.apache.geronimo.gshell.shell.Environment;
+import org.apache.geronimo.gshell.plexus.Slf4jLoggingManager;
+import org.apache.geronimo.gshell.plugin.CommandDiscoverer;
+import org.apache.geronimo.gshell.plugin.CommandCollector;
 import org.codehaus.plexus.ContainerConfiguration;
 import org.codehaus.plexus.DefaultContainerConfiguration;
 import org.codehaus.plexus.PlexusContainerException;
@@ -73,7 +76,16 @@
         config.setName(DEFAULT_CONTAINER_NAME);
         config.setClassWorld(getClassWorld());
 
-        return new GShellPlexusContainer(config);
+        // HACK: Should not need these here, but for some reason components are getting instantiated in the wrong container
+        config.addComponentDiscoverer(new CommandDiscoverer());
+        config.addComponentDiscoveryListener(new CommandCollector());
+
+        GShellPlexusContainer container = new GShellPlexusContainer(config);
+
+        // Install our logging muck
+        container.setLoggerManager(new Slf4jLoggingManager());
+
+        return container;
     }
 
     public GShellPlexusContainer getContainer() throws PlexusContainerException {
@@ -198,9 +210,6 @@
         // Configure application
         getApplicationManager().configure(applicationConfig);
 
-        // TODO: Get application shell
-        // return getApplicationManager().createShell();
-        
-        return null;
+        return getApplicationManager().createShell();
     }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/ApplicationConfiguration.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/ApplicationConfiguration.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/ApplicationConfiguration.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/ApplicationConfiguration.java Wed May 21 07:48:06 2008
@@ -20,6 +20,8 @@
 package org.apache.geronimo.gshell.application;
 
 import org.apache.geronimo.gshell.DefaultEnvironment;
+import org.apache.geronimo.gshell.common.tostring.ReflectionToStringBuilder;
+import org.apache.geronimo.gshell.common.tostring.ToStringStyle;
 import org.apache.geronimo.gshell.io.IO;
 import org.apache.geronimo.gshell.model.application.Application;
 import org.apache.geronimo.gshell.shell.Environment;
@@ -75,4 +77,8 @@
     public void setApplication(final Application application) {
         this.application = application;
     }
+
+    public String toString() {
+        return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
+    }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/ApplicationManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/ApplicationManager.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/ApplicationManager.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/ApplicationManager.java Wed May 21 07:48:06 2008
@@ -19,6 +19,8 @@
 
 package org.apache.geronimo.gshell.application;
 
+import org.apache.geronimo.gshell.GShell;
+
 /**
  * ???
  *
@@ -28,7 +30,7 @@
 {
     void configure(ApplicationConfiguration config) throws Exception;
 
-    // createShell()
+    GShell createShell() throws Exception;
 
     // getContext()
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java Wed May 21 07:48:06 2008
@@ -19,6 +19,7 @@
 
 package org.apache.geronimo.gshell.application;
 
+import org.apache.geronimo.gshell.GShell;
 import org.apache.geronimo.gshell.artifact.ArtifactManager;
 import org.apache.geronimo.gshell.lookup.EnvironmentLookup;
 import org.apache.geronimo.gshell.lookup.IOLookup;
@@ -26,8 +27,9 @@
 import org.apache.geronimo.gshell.model.common.Dependency;
 import org.apache.geronimo.gshell.model.common.SourceRepository;
 import org.apache.geronimo.gshell.plexus.GShellPlexusContainer;
-import org.apache.geronimo.gshell.plugin.CommandDiscoverer;
-import org.apache.geronimo.gshell.plugin.CommandDiscoveryListener;
+import org.apache.geronimo.gshell.shell.Environment;
+import org.apache.geronimo.gshell.shell.InteractiveShell;
+import org.apache.geronimo.gshell.shell.ShellInfo;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
@@ -47,8 +49,10 @@
 import org.slf4j.LoggerFactory;
 
 import java.io.File;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.LinkedHashSet;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
 
@@ -70,6 +74,8 @@
 
     private GShellPlexusContainer container;
 
+    private ApplicationConfiguration applicationConfig;
+
     public void contextualize(final Context context) throws ContextException {
         assert context != null;
 
@@ -87,19 +93,40 @@
 
         log.debug("Configuring; config: {}", config);
 
+        // Validate the configuration
         Application application = config.getApplication();
         if (application == null) {
             throw new IllegalStateException("Missing application configuration");
         }
+        log.debug("Application: {}", application);
+
+        // Apply artifact manager configuration settings for application
+        configureArtifactManager(application);
+
+        // Create the application container
+        container = createContainer(application);
 
-        // Setup artifact manager repositories
+        // TODO: Configure other application bits (branding, layout)
+
+        // Install lookup intestances
+        IOLookup.set(container, config.getIo());
+        EnvironmentLookup.set(container, config.getEnvironment());
+
+        // Track the configuration, mark configured
+        applicationConfig = config;
+    }
+
+    private void configureArtifactManager(final Application application) throws Exception {
+        assert application != null;
         assert artifactManager != null;
-        
+
+        // Setup the local repository
         File repository = application.getRepository();
         if (repository != null) {
             artifactManager.setLocalRepository(repository);
         }
 
+        // Setup remote repositories
         List<SourceRepository> sourceRepositories = application.sourceRepositories();
         if (sourceRepositories != null) {
             for (SourceRepository repo : sourceRepositories) {
@@ -109,11 +136,45 @@
                 artifactManager.addRemoteRepository(id, url);
             }
         }
+    }
+
+    private GShellPlexusContainer createContainer(final Application application) throws Exception {
+        assert application != null;
+
+        log.debug("Creating application container");
+
+        List<URL> classPath = createClassPath(application);
+        ClassWorld classWorld = parentContainer.getContainerRealm().getWorld();
+        ClassRealm realm = parentContainer.getContainerRealm().createChildRealm(application.getId());
+
+        for (URL url : classPath) {
+            realm.addURL(url);
+        }
+
+        ContainerConfiguration cc = new DefaultContainerConfiguration();
+        cc.setName(application.getId());
+        cc.setClassWorld(classWorld);
+        cc.setRealm(realm);
+
+        // HACK: Should need these here, but for some reason components are getting instantiated in the wrong container
+        //       so for now to get something working again, use the parent containers configuration set in GShellBuilder
+
+        // For now use the old Command* bits to get things working, then refactor to use the new Plugin* bits
+        // cc.addComponentDiscoverer(new CommandDiscoverer());
+        // cc.addComponentDiscoveryListener(new CommandCollector());
+        // cc.addComponentDiscoverer(new PluginDiscoverer());
+        // cc.addComponentDiscoveryListener(new PluginCollector());
+
+        GShellPlexusContainer child = parentContainer.createChild(cc);
+
+        log.debug("Application container: {}", child);
+
+        return child;
+    }
 
-        // Configure other application bits (branding, layout)
-        // TODO:
+    private List<URL> createClassPath(final Application application) throws MalformedURLException {
+        assert application != null;
 
-        // Setup container
         ArtifactFactory factory = artifactManager.getArtifactFactory();
 
         Artifact originating = factory.createArtifact("dummy", "dummy", "dummy", null, "jar");
@@ -124,7 +185,7 @@
 
         Set<Artifact> artifacts = new LinkedHashSet<Artifact>();
         List<Dependency> dependencies = application.dependencies();
-        
+
         if (dependencies != null && !dependencies.isEmpty()) {
             log.debug("Application dependencies:");
 
@@ -141,10 +202,12 @@
         request.setArtifactDependencies(artifacts);
 
         ArtifactResolutionResult result = artifactManager.resolve(request);
-        // TODO: Validate the result and complain if not valid (exceptions/missing/whatever), may want to move that to the AM
 
-        ClassWorld classWorld = parentContainer.getContainerRealm().getWorld();
-        ClassRealm realm = parentContainer.getContainerRealm().createChildRealm(application.getId());
+        //
+        // FIXME: Validate the result and complain if not valid (exceptions/missing/whatever), may want to move that to the AM
+        //
+
+        List<URL> classPath = new LinkedList<URL>();
         Set<Artifact> resolvedArtifacts = result.getArtifacts();
 
         if (resolvedArtifacts != null && !resolvedArtifacts.isEmpty()) {
@@ -154,28 +217,62 @@
                 File file = artifact.getFile();
                 assert file != null;
 
-                log.debug(" + {}", file);
+                URL url = file.toURI().toURL();
+                log.debug(" + {}", url);
 
-                realm.addURL(file.toURI().toURL());
+                classPath.add(url);
             }
         }
 
-        ContainerConfiguration cc = new DefaultContainerConfiguration();
-        cc.setName(application.getId());
-        cc.setClassWorld(classWorld);
-        cc.setRealm(realm);
+        return classPath;
+    }
 
-        // For now use the old Command* bits to get things working, then refactor to use the new Plugin* bits
-        cc.addComponentDiscoverer(new CommandDiscoverer());
-        cc.addComponentDiscoveryListener(new CommandDiscoveryListener());
-        // cc.addComponentDiscoverer(new PluginDiscoverer());
-        // cc.addComponentDiscoveryListener(new PluginCollector());
+    public GShell createShell() throws Exception {
+        if (applicationConfig == null) {
+            throw new IllegalStateException("Not configured");
+        }
 
-        container = parentContainer.createChild(cc);
-        log.debug("Container: {}", container);
+        final InteractiveShell shell = container.lookupComponent(InteractiveShell.class);
 
-        // Install lookup intestances
-        IOLookup.set(container, config.getIo());
-        EnvironmentLookup.set(container, config.getEnvironment());
+        log.debug("Created shell instance: {}", shell);
+
+        //
+        // FIXME: Use a real proxy, so we can add generic interception muck to handle security muck and whatever ?
+        //        or shall we use an aspect to handle this muck?
+        //
+        
+        GShell proxy = new GShell() {
+            public void run(final Object... args) throws Exception {
+                shell.run(args);
+            }
+
+            public ShellInfo getShellInfo() {
+                return shell.getShellInfo();
+            }
+
+            public Environment getEnvironment() {
+                return shell.getEnvironment();
+            }
+
+            public Object execute(String line) throws Exception {
+                return shell.execute(line);
+            }
+
+            public Object execute(String command, Object[] args) throws Exception {
+                return shell.execute(command, args);
+            }
+
+            public Object execute(Object... args) throws Exception {
+                return shell.execute(args);
+            }
+
+            public Object execute(Object[][] commands) throws Exception {
+                return shell.execute(commands);
+            }
+        };
+
+        log.debug("Create shell proxy: {}", proxy);
+
+        return proxy;
     }
 }
\ No newline at end of file

Copied: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandCollector.java (from r658599, geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoveryListener.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandCollector.java?p2=geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandCollector.java&p1=geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoveryListener.java&r1=658599&r2=658718&rev=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoveryListener.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandCollector.java Wed May 21 07:48:06 2008
@@ -40,15 +40,17 @@
  *
  * @version $Rev$ $Date$
  */
-@Component(role=CommandDiscoveryListener.class)
-public class CommandDiscoveryListener
+@Component(role= CommandCollector.class)
+public class CommandCollector
     implements ComponentDiscoveryListener
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
     private Map<String,CommandDescriptor> descriptors = new HashMap<String,CommandDescriptor>();
 
-    public CommandDiscoveryListener() {}
+    public CommandCollector() {
+        log.trace("Created: {}", this);
+    }
 
     public String getId() {
         return getClass().getSimpleName();
@@ -75,6 +77,8 @@
     public CommandDescriptor getCommandDescriptor(final String id) {
         assert id != null;
 
+        log.debug("Lookup descriptor for ID: {}", id);
+        
         return descriptors.get(id);
     }
 }
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandCollector.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandCollector.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandCollector.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoverer.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoverer.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoverer.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/CommandDiscoverer.java Wed May 21 07:48:06 2008
@@ -25,6 +25,7 @@
 import org.apache.geronimo.gshell.descriptor.CommandSetDescriptor;
 import org.codehaus.plexus.component.discovery.AbstractComponentDiscoverer;
 import org.codehaus.plexus.component.repository.ComponentSetDescriptor;
+import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.configuration.PlexusConfigurationException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -34,6 +35,7 @@
  *
  * @version $Rev$ $Date$
  */
+@Component(role=CommandDiscoverer.class)
 public class CommandDiscoverer
     extends AbstractComponentDiscoverer
 {

Modified: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/plugin/PluginCollector.java Wed May 21 07:48:06 2008
@@ -30,7 +30,7 @@
  *
  * @version $Rev$ $Date$
  */
-@Component(role=CommandDiscoveryListener.class)
+@Component(role= CommandCollector.class)
 public class PluginCollector
     implements ComponentDiscoveryListener
 {

Modified: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DefaultCommandRegistry.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DefaultCommandRegistry.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DefaultCommandRegistry.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/registry/DefaultCommandRegistry.java Wed May 21 07:48:06 2008
@@ -25,12 +25,18 @@
 import java.util.Map;
 
 import org.apache.geronimo.gshell.command.Command;
-import org.apache.geronimo.gshell.plugin.CommandDiscoveryListener;
+import org.apache.geronimo.gshell.plugin.CommandCollector;
 import org.apache.geronimo.gshell.plugin.PlexusCommandWrapper;
 import org.apache.geronimo.gshell.descriptor.CommandDescriptor;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.PlexusConstants;
+import org.codehaus.plexus.context.Context;
+import org.codehaus.plexus.context.ContextException;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -41,18 +47,30 @@
  */
 @Component(role=CommandRegistry.class)
 public class DefaultCommandRegistry
-    implements CommandRegistry
+    implements CommandRegistry, Contextualizable, Initializable
 {
     private final Logger log = LoggerFactory.getLogger(getClass());
 
-    @Requirement
     private PlexusContainer container;
 
     @Requirement
-    private CommandDiscoveryListener collector;
+    private CommandCollector collector;
     
     private Map<String, Command> commands = new HashMap<String, Command>();
 
+    public void contextualize(Context context) throws ContextException {
+        assert context != null;
+
+        container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
+        assert container != null;
+        log.debug("Container: {}", container);
+    }
+
+    public void initialize() throws InitializationException {
+        assert collector != null;
+        log.debug("Collector: {}", collector);
+    }
+
     public void register(final Command command) throws DuplicateRegistrationException {
         assert command != null;
 

Modified: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java Wed May 21 07:48:06 2008
@@ -60,9 +60,17 @@
         log.debug("Configuring; config: {}", config);
 
         Settings settings = config.getSettings();
-        if (settings == null) {
-            throw new IllegalStateException("Missing settings configuration");
+        if (settings != null) {
+            configure(settings);
         }
+        
+        // TODO: Merge in some default settings or something?
+
+        settingsConfiguration = config;
+    }
+
+    private void configure(final Settings settings) throws Exception {
+        assert settings != null;
 
         List<SourceRepository> sourceRepositories = settings.sourceRepositories();
         if (sourceRepositories != null) {
@@ -70,13 +78,10 @@
                 String loc = repo.getLocation();
                 URL url = new URL(loc);
                 String id = url.getHost(); // FIXME: Need to expose the repo id in the model, for now assume the id is the hostname
-
                 artifactManager.addRemoteRepository(id, url);
             }
         }
-        
-        // TODO: apply other artifact related settings (proxy, auth, whatever)
 
-        settingsConfiguration = config;
+        // TODO: apply other artifact related settings (proxy, auth, whatever)
     }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/SettingsConfiguration.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/SettingsConfiguration.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/SettingsConfiguration.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/settings/SettingsConfiguration.java Wed May 21 07:48:06 2008
@@ -20,6 +20,8 @@
 package org.apache.geronimo.gshell.settings;
 
 import org.apache.geronimo.gshell.model.settings.Settings;
+import org.apache.geronimo.gshell.common.tostring.ReflectionToStringBuilder;
+import org.apache.geronimo.gshell.common.tostring.ToStringStyle;
 
 /**
  * ???
@@ -37,4 +39,8 @@
     public void setSettings(final Settings settings) {
         this.settings = settings;
     }
+
+    public String toString() {
+        return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
+    }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/GShellBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/GShellBuilderTest.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/GShellBuilderTest.java (original)
+++ geronimo/gshell/trunk/gshell-core/src/test/java/org/apache/geronimo/gshell/GShellBuilderTest.java Wed May 21 07:48:06 2008
@@ -70,7 +70,9 @@
 
         builder.setApplication(application);
 
-        GShell shell = builder.build();
+        // FIXME: Need to figure out a way to unit test this bitch
+        
+        // GShell shell = builder.build();
         // assertNotNull(shell);
     }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Application.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Application.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Application.java (original)
+++ geronimo/gshell/trunk/gshell-model/src/main/java/org/apache/geronimo/gshell/model/application/Application.java Wed May 21 07:48:06 2008
@@ -42,6 +42,12 @@
 {
     private String id;
 
+    // groupId
+
+    // artifactId
+
+    // version
+    
     private String name;
 
     private String description;
@@ -117,7 +123,7 @@
     }
 
     //
-    // TODO: Change to Plugin*
+    // TODO: Change to Plugin* ?
     //
 
     //

Modified: geronimo/gshell/trunk/gshell-support/gshell-artifact/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact/pom.xml?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact/pom.xml Wed May 21 07:48:06 2008
@@ -73,16 +73,6 @@
             <groupId>org.apache.maven.wagon</groupId>
             <artifactId>wagon-provider-api</artifactId>
         </dependency>
-
-        <!--
-        TODO: Move this out of here...
-        -->
-        
-        <dependency>
-            <groupId>org.apache.maven.wagon</groupId>
-            <artifactId>wagon-http-lightweight</artifactId>
-            <scope>runtime</scope>
-        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/DefaultArtifactManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/DefaultArtifactManager.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/DefaultArtifactManager.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/DefaultArtifactManager.java Wed May 21 07:48:06 2008
@@ -79,6 +79,8 @@
         assert repository != null;
 
         localRepository = repository;
+
+        log.debug("Using local repository: {}", repository);
     }
 
     public void setLocalRepository(final File dir) throws InvalidRepositoryException {
@@ -95,6 +97,8 @@
         assert repository != null;
 
         remoteRepositories.add(repository);
+
+        log.debug("Added remote repository: {}", repository);
     }
 
     public void addRemoteRepository(final String id, final URL url) throws UnknownRepositoryLayoutException {
@@ -119,6 +123,8 @@
         assert listener != null;
 
         wagonManager.setDownloadMonitor(listener);
+
+        log.debug("Using download monitor: {}", listener);
     }
     
     public ArtifactResolutionResult resolve(final ArtifactResolutionRequest request) {

Modified: geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinner.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinner.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinner.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinner.java Wed May 21 07:48:06 2008
@@ -26,8 +26,6 @@
  */
 public class ProgressSpinner
 {
-    private static final String CARRIAGE_RETURN = "\r";
-
     private static final String MESSAGE_PAD = " ";
 
     private final Style style;
@@ -67,8 +65,6 @@
             buff.append(message);
         }
 
-        buff.append(CARRIAGE_RETURN);
-
         state++;
         if (state >= elements.length) {
             state = 0;
@@ -116,24 +112,4 @@
             return ")";
         }
     }
-
-    public static class BounceStyle
-        extends DefaultStyle
-    {
-        private static final String[] ELEMENTS = {
-            "*    ",
-            " *   ",
-            "  *  ",
-            "   * ",
-            "    *",
-            "   * ",
-            "  *  ",
-            " *   ",
-            "*    "
-        };
-
-        public String[] getElements() {
-            return ELEMENTS;
-        }
-    }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinnerMonitor.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinnerMonitor.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinnerMonitor.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/ProgressSpinnerMonitor.java Wed May 21 07:48:06 2008
@@ -19,10 +19,12 @@
 
 package org.apache.geronimo.gshell.artifact.monitor;
 
+import org.apache.geronimo.gshell.io.IO;
 import static org.apache.maven.wagon.WagonConstants.UNKNOWN_LENGTH;
 import org.apache.maven.wagon.events.TransferEvent;
 import static org.apache.maven.wagon.events.TransferEvent.REQUEST_PUT;
-import org.apache.geronimo.gshell.io.IO;
+
+import java.io.IOException;
 
 /**
  * A download monitor providing a simple spinning progress interface.
@@ -32,31 +34,55 @@
 public class ProgressSpinnerMonitor
     extends TransferListenerSupport
 {
+    private static final String CARRIAGE_RETURN = "\r";
+
     private IO io;
 
     private ProgressSpinner spinner = new ProgressSpinner();
 
     private long complete;
 
-    public ProgressSpinnerMonitor(final IO io) {
+    public ProgressSpinnerMonitor(final IO io) throws IOException {
         assert io != null;
 
         this.io = io;
     }
+    
+    private void print(final String message) {
+        if (!io.isQuiet()) {
+            io.out.print(message);
+            io.out.print(CARRIAGE_RETURN);
+            io.out.flush();
+        }
+    }
+
+    private void println(final String message) {
+        if (!io.isQuiet()) {
+            io.out.println(message);
+            io.out.flush();
+        }
+    }
+
+    public void transferInitiated(final TransferEvent event) {
+        assert event != null;
+
+        super.transferInitiated(event);
 
-    public void transferInitiated(TransferEvent event) {
         complete = 0;
 
         spinner.reset();
 
         String message = event.getRequestType() == REQUEST_PUT ? "Uploading" : "Downloading";
-
         String url = event.getWagon().getRepository().getUrl();
 
-        io.info("{}: {}/{}", message, url, event.getResource().getName());
+        println(message + ": " + url + "/" + event.getResource().getName());
     }
-
+    
     public void transferProgress(final TransferEvent event, final byte[] buffer, final int length) {
+        assert event != null;
+
+        super.transferProgress(event, buffer, length);
+
         long total = event.getResource().getContentLength();
         complete += length;
 
@@ -69,17 +95,6 @@
             message = complete + "/" + (total == UNKNOWN_LENGTH ? "?" : total + "b");
         }
 
-        io.info(spinner.spin(message));
-    }
-
-    public void transferCompleted(final TransferEvent event) {
-        long length = event.getResource().getContentLength();
-
-        if (length != UNKNOWN_LENGTH) {
-            String type = (event.getRequestType() == REQUEST_PUT ? "uploaded" : "downloaded");
-            String l = length >= 1024 ? (length / 1024) + "K" : length + "b";
-
-            io.info("{} {}", l, type);
-        }
+        print(spinner.spin(message));
     }
 }
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/TransferListenerSupport.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/TransferListenerSupport.java?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/TransferListenerSupport.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/monitor/TransferListenerSupport.java Wed May 21 07:48:06 2008
@@ -35,18 +35,24 @@
     protected final Logger log = LoggerFactory.getLogger(getClass());
 
     public void transferInitiated(final TransferEvent event) {
+        log.trace("Transfer initiated: {}", event);
     }
 
     public void transferStarted(final TransferEvent event) {
+        log.trace("Transfer started: {}", event);
     }
 
     public void transferProgress(final TransferEvent event, final byte[] buffer, final int length) {
+        log.trace("Transfer progress: {}, {}, {}", new Object[] { event, buffer, length });
     }
 
     public void transferCompleted(final TransferEvent event) {
+        log.trace("Transfer completed: {}", event);
     }
 
     public void transferError(final TransferEvent event) {
+        log.trace("Transfer error: {}", event);
+
         assert event != null;
 
         Throwable cause = event.getException();

Copied: geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java (from r658599, geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/logging/Slf4jLoggingManager.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java?p2=geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java&p1=geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/logging/Slf4jLoggingManager.java&r1=658599&r2=658718&rev=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/logging/Slf4jLoggingManager.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java Wed May 21 07:48:06 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.geronimo.gshell.logging;
+package org.apache.geronimo.gshell.plexus;
 
 import org.codehaus.plexus.logging.AbstractLogger;
 import org.codehaus.plexus.logging.BaseLoggerManager;
@@ -32,10 +32,21 @@
 public class Slf4jLoggingManager
     extends BaseLoggerManager
 {
+    // FIXME: Probably need to change this to avoid picking up the BaseLoggerManager, just implement everything ourselves
+    //        Might be able to use AbstractLoggerManager
+
     protected org.codehaus.plexus.logging.Logger createLogger(final String key) {
         return new LoggerImpl(getThreshold(), LoggerFactory.getLogger(key));
     }
 
+    public org.codehaus.plexus.logging.Logger getLoggerForComponent(final String role, final String roleHint) {
+        return createLogger(toMapKey(role, roleHint));
+    }
+
+    public void returnComponentLogger(final String role, final String roleHint) {
+        // Ignore
+    }
+    
     /**
      * Adapts the Plexus {@link org.codehaus.plexus.logging.Logger} interface to SLF4J
      */

Propchange: geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/gshell/trunk/gshell-support/gshell-plexus/src/main/java/org/apache/geronimo/gshell/plexus/Slf4jLoggingManager.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/gshell/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/pom.xml?rev=658718&r1=658717&r2=658718&view=diff
==============================================================================
--- geronimo/gshell/trunk/pom.xml (original)
+++ geronimo/gshell/trunk/pom.xml Wed May 21 07:48:06 2008
@@ -149,6 +149,18 @@
 
             <dependency>
                 <groupId>org.apache.maven.wagon</groupId>
+                <artifactId>wagon-provider-api</artifactId>
+                <version>1.0-beta-2</version>
+            </dependency>
+
+            <dependency>
+                <groupId>org.apache.maven.wagon</groupId>
+                <artifactId>wagon-file</artifactId>
+                <version>1.0-beta-2</version>
+            </dependency>
+            
+            <dependency>
+                <groupId>org.apache.maven.wagon</groupId>
                 <artifactId>wagon-http-lightweight</artifactId>
                 <version>1.0-beta-2</version>
                 <exclusions>
@@ -162,13 +174,7 @@
                     </exclusion>
                 </exclusions>
             </dependency>
-            
-            <dependency>
-                <groupId>org.apache.maven.wagon</groupId>
-                <artifactId>wagon-provider-api</artifactId>
-                <version>1.0-beta-2</version>
-            </dependency>
-            
+
             <dependency>
                 <groupId>commons-vfs</groupId>
                 <artifactId>commons-vfs</artifactId>