geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r721599 - in /geronimo/gshell/trunk: gshell-cli/ gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/ gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ gshell-wisdom/gshell-wisdom-bootstrap/sr...
Date Sat, 29 Nov 2008 00:31:58 GMT
Author: jdillon
Date: Fri Nov 28 16:31:58 2008
New Revision: 721599

URL: http://svn.apache.org/viewvc?rev=721599&view=rev
Log:
Hook up the default download monitor

Modified:
    geronimo/gshell/trunk/gshell-cli/pom.xml
    geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
    geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactResolverImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilder.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java

Modified: geronimo/gshell/trunk/gshell-cli/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-cli/pom.xml?rev=721599&r1=721598&r2=721599&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-cli/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-cli/pom.xml Fri Nov 28 16:31:58 2008
@@ -59,6 +59,11 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.geronimo.gshell.support</groupId>
+            <artifactId>gshell-artifact</artifactId>
+        </dependency>
+        
+        <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-api</artifactId>
         </dependency>

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=721599&r1=721598&r2=721599&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
Fri Nov 28 16:31:58 2008
@@ -20,6 +20,9 @@
 package org.apache.geronimo.gshell.cli;
 
 import org.apache.geronimo.gshell.ansi.Ansi;
+import org.apache.geronimo.gshell.application.model.ApplicationModel;
+import org.apache.geronimo.gshell.artifact.ArtifactResolver;
+import org.apache.geronimo.gshell.artifact.transfer.monitor.ProgressSpinnerMonitor;
 import org.apache.geronimo.gshell.clp.Argument;
 import org.apache.geronimo.gshell.clp.CommandLineProcessor;
 import org.apache.geronimo.gshell.clp.Option;
@@ -35,7 +38,6 @@
 import org.apache.geronimo.gshell.terminal.WindowsTerminal;
 import org.apache.geronimo.gshell.wisdom.builder.ShellBuilder;
 import org.apache.geronimo.gshell.wisdom.builder.ShellBuilderImpl;
-import org.apache.geronimo.gshell.application.model.ApplicationModel;
 
 import java.util.List;
 import java.util.concurrent.atomic.AtomicReference;
@@ -212,6 +214,10 @@
             builder.setClassLoader(getClass().getClassLoader());
             builder.setIo(io);
 
+            // Configure the download monitor
+            ArtifactResolver artifactResolver = builder.getContainer().getBean(ArtifactResolver.class);
+            artifactResolver.setTransferListener(new ProgressSpinnerMonitor(io));
+
             // --help and --version need access to the application's information, so we have
to handle these options late
             if (help|version) {
                 ApplicationModel applicationModel = builder.getApplicationModel();

Modified: geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactResolverImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactResolverImpl.java?rev=721599&r1=721598&r2=721599&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactResolverImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact-maven/src/main/java/org/apache/geronimo/gshell/artifact/maven/ArtifactResolverImpl.java
Fri Nov 28 16:31:58 2008
@@ -52,8 +52,9 @@
     }
 
     public void setTransferListener(final TransferListener listener) {
+        assert listener != null;
+        
         // TODO: Hookup adapter to wagon manager
-        throw new Error();
     }
 
     public Result resolve(final Request request) throws Failure {

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilder.java?rev=721599&r1=721598&r2=721599&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilder.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilder.java
Fri Nov 28 16:31:58 2008
@@ -24,6 +24,7 @@
 import org.apache.geronimo.gshell.command.Variables;
 import org.apache.geronimo.gshell.io.IO;
 import org.apache.geronimo.gshell.shell.ShellFactory;
+import org.apache.geronimo.gshell.spring.BeanContainer;
 
 /**
  * Builds {@link org.apache.geronimo.gshell.shell.Shell} instanes.
@@ -33,6 +34,8 @@
 public interface ShellBuilder
     extends ShellFactory
 {
+    BeanContainer getContainer();
+
     ClassLoader getClassLoader();
 
     void setClassLoader(ClassLoader classLoader);

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java?rev=721599&r1=721598&r2=721599&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java
Fri Nov 28 16:31:58 2008
@@ -60,7 +60,7 @@
         return container;
     }
 
-    private BeanContainer getContainer() {
+    public BeanContainer getContainer() {
         if (container == null) {
             try {
                 container = createContainer();



Mime
View raw message