geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r703411 - in /geronimo/gshell/trunk: ./ gshell-application/src/main/java/org/apache/geronimo/gshell/application/ gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/ gshell-assembly/src/main/underlay/etc/ gshell...
Date Fri, 10 Oct 2008 11:25:34 GMT
Author: jdillon
Date: Fri Oct 10 04:25:34 2008
New Revision: 703411

URL: http://svn.apache.org/viewvc?rev=703411&view=rev
Log:
Added --application and --settings options for Main, added addLocation() to the builders,
doesn't do anything yet though
Make ApplicationModelLocator use the TCL to better support launching from an IDE
Fixed some spelling problems
Added timing of application/plugin load, as well as artifact resolution, so we can see where
the slow bits are (looks like its mostly gshell-artifact stuff)
Starting gshell-ivy module to see if we can use Apache Ivy instead of Maven Artifact for artifact
resolution
Changed command resolution logs to trace (most at least)

Added:
    geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ExtensionMapConfigurer.java
  (contents, props changed)
      - copied, changed from r703134, geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ExtentionMapConfigurer.java
Removed:
    geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ExtentionMapConfigurer.java
Modified:
    geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ApplicationModelLocator.java
    geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java
    geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml
    geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/Main.java
    geronimo/gshell/trunk/gshell-cli/src/main/resources/org/apache/geronimo/gshell/cli/Main.properties
    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-spring/pom.xml
    geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerImpl.java
    geronimo/gshell/trunk/gshell-support/gshell-vfs-truezip/src/main/resources/META-INF/spring/components.xml
    geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/MimeTypeMapConfigurer.java
    geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/resources/META-INF/spring/components.xml
    geronimo/gshell/trunk/gshell-support/pom.xml
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationFactoryBean.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-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/builder/ShellBuilderImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginManagerImpl.java
    geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandResolverImpl.java
    geronimo/gshell/trunk/pom.xml

Modified: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ApplicationModelLocator.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ApplicationModelLocator.java?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ApplicationModelLocator.java
(original)
+++ geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/ApplicationModelLocator.java
Fri Oct 10 04:25:34 2008
@@ -25,6 +25,8 @@
 import org.slf4j.LoggerFactory;
 
 import java.net.URL;
+import java.util.List;
+import java.util.ArrayList;
 
 /**
  * Locates {@link ApplicationModel} instances.
@@ -37,18 +39,33 @@
 
     private final ApplicationModelMarshaller marshaller = new ApplicationModelMarshaller();
 
+    private final List<String> locations = new ArrayList<String>();
+
     //
     // FIXME: Need to make this more robust, allow a file override/hint look in META-INF/gshell,
etc.
     //
 
-    //
-    // TODO: Use builder pattern to add additonal bits to help location
-    //
-    
+    public ApplicationModelLocator addLocation(final String location) {
+        if (location != null) {
+            log.debug("Adding location: {}", location);
+        }
+
+        locations.add(location);
+
+        return this;
+    }
+
     public ApplicationModel locate() throws Exception {
         log.debug("Locating application model descriptor");
 
-        URL url = getClass().getClassLoader().getResource("application.xml");
+        // TODO: look for locations, based on reverse view of locations list
+
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        URL url = cl.getResource("application.xml");
+
+        if (url == null) {
+            throw new RuntimeException("Unable to locate application model descriptor");
+        }
 
         log.debug("Application model descriptor URL: {}", url);
         

Modified: geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java
(original)
+++ geronimo/gshell/trunk/gshell-application/src/main/java/org/apache/geronimo/gshell/application/settings/SettingsModelLocator.java
Fri Oct 10 04:25:34 2008
@@ -23,6 +23,10 @@
 import org.apache.geronimo.gshell.model.settings.SettingsModelMarshaller;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import sun.java2d.loops.GraphicsPrimitiveMgr;
+
+import java.util.List;
+import java.util.ArrayList;
 
 /**
  * Locates {@link SettingsModel} instances.
@@ -35,13 +39,21 @@
 
     private final SettingsModelMarshaller marshaller = new SettingsModelMarshaller();
 
+    private final List<String> locations = new ArrayList<String>();
+
     //
     // FIXME: Need to make this more robust, allow a file override/hint look in META-INF/gshell,
user.home, etc.
     //
 
-    //
-    // TODO: Use builder pattern to add additonal bits to help location
-    //
+    public SettingsModelLocator addLocation(final String location) {
+        if (location != null) {
+            log.debug("Adding location: {}", location);
+        }
+
+        // TODO:
+        
+        return this;
+    }
 
     public SettingsModel locate() throws Exception {
         log.debug("Locating settings model descriptor");

Modified: 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=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml (original)
+++ geronimo/gshell/trunk/gshell-assembly/src/main/underlay/etc/application.xml Fri Oct 10
04:25:34 2008
@@ -62,11 +62,6 @@
 
             <dependency>
                 <groupId>org.apache.geronimo.gshell.support</groupId>
-                <artifactId>gshell-vfs</artifactId>
-            </dependency>
-
-            <dependency>
-                <groupId>org.apache.geronimo.gshell.support</groupId>
                 <artifactId>gshell-vfs-truezip</artifactId>
             </dependency>
         </dependencyGroup>
@@ -93,11 +88,11 @@
                 <artifactId>gshell-vfs</artifactId>
             </plugin>
             
+            <!--
             <plugin>
                 <artifactId>gshell-remote</artifactId>
             </plugin>
-
-            <!--
+            
             <plugin>
                 <artifactId>gshell-optional</artifactId>
             </plugin>

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=703411&r1=703410&r2=703411&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 Oct 10 04:25:34 2008
@@ -62,10 +62,6 @@
     //
 
     //
-    // TODO: Add --application and --settings
-    //
-
-    //
     // TODO: Add --file <file>, which will run: source <file> 
     //
 
@@ -82,6 +78,12 @@
         System.setProperty("gshell.log.console.level", level);
     }
 
+    @Option(name="-a", aliases={"--application"})
+    private String applicationDescriptor;
+
+    @Option(name="-s", aliases={"--settings"})
+    private String settingsDescriptor;
+
     @Option(name="-e", aliases={"--exception"})
     private void setException(boolean flag) {
     	if (flag) {
@@ -215,11 +217,13 @@
             builder.setIo(io);
 
             // Find our settings descriptor
-            SettingsModel settingsModel = new SettingsModelLocator().locate();
+            SettingsModel settingsModel = new SettingsModelLocator().
+                    addLocation(settingsDescriptor).locate();
             builder.setSettingsModel(settingsModel);
 
             // Find our application descriptor
-            ApplicationModel applicationModel = new ApplicationModelLocator().locate();
+            ApplicationModel applicationModel = new ApplicationModelLocator().
+                    addLocation(applicationDescriptor).locate();
             builder.setApplicationModel(applicationModel);
 
             // --help and --version need access to the application's information, so we have
to handle these options late

Modified: geronimo/gshell/trunk/gshell-cli/src/main/resources/org/apache/geronimo/gshell/cli/Main.properties
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-cli/src/main/resources/org/apache/geronimo/gshell/cli/Main.properties?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-cli/src/main/resources/org/apache/geronimo/gshell/cli/Main.properties
(original)
+++ geronimo/gshell/trunk/gshell-cli/src/main/resources/org/apache/geronimo/gshell/cli/Main.properties
Fri Oct 10 04:25:34 2008
@@ -27,6 +27,12 @@
 
 option.interactive=Run in interactive mode
 
+option.applicationDescriptor=Application descriptor
+option.applicationDescriptor.token=FILE
+
+option.settingsDescriptor=Settings descriptor
+option.settingsDescriptor.token=FILE
+
 option.setException=Enable exception stack traces
 
 option.setDebug=Enable DEBUG output

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=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-artifact/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-artifact/pom.xml Fri Oct 10 04:25:34 2008
@@ -51,6 +51,11 @@
 
         <dependency>
             <groupId>org.apache.geronimo.gshell.support</groupId>
+            <artifactId>gshell-chronos</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.gshell.support</groupId>
             <artifactId>gshell-io</artifactId>
         </dependency>
 

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=703411&r1=703410&r2=703411&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
Fri Oct 10 04:25:34 2008
@@ -31,6 +31,7 @@
 import org.apache.maven.wagon.events.TransferListener;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
+import org.apache.geronimo.gshell.chronos.StopWatch;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -108,8 +109,12 @@
 
         log.debug("Resolving request: {}", request);
 
+        StopWatch watch = new StopWatch(true);
+
         ArtifactResolutionResult result = artifactResolver.resolve(request);
 
+        log.debug("Resolution completed after: {}", watch);
+
         return validateResolutionResult(request, result);
     }
 

Modified: geronimo/gshell/trunk/gshell-support/gshell-spring/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-spring/pom.xml?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-spring/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-spring/pom.xml Fri Oct 10 04:25:34 2008
@@ -47,6 +47,11 @@
             <groupId>org.slf4j</groupId>
             <artifactId>jcl-over-slf4j</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.gshell.support</groupId>
+            <artifactId>gshell-chronos</artifactId>
+        </dependency>
         
         <dependency>
             <groupId>org.springframework</groupId>

Modified: geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerImpl.java?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-spring/src/main/java/org/apache/geronimo/gshell/spring/BeanContainerImpl.java
Fri Oct 10 04:25:34 2008
@@ -26,6 +26,7 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.NoSuchBeanDefinitionException;
 import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor;
+import org.apache.geronimo.gshell.chronos.StopWatch;
 
 import java.net.URL;
 import java.util.Arrays;
@@ -90,14 +91,22 @@
     public void loadBeans(final String[] locations) throws Exception {
         assert locations != null;
 
+        log.debug("Loading beans; locations: {}", locations);
+
+        StopWatch watch = new StopWatch(true);
+
         context.configure(locations);
         context.refresh();
+
+        log.debug("Loaded beans after: {}", watch);
     }
 
     public BeanContainer createChild(final String id, final List<URL> classPath) {
         assert id != null;
         // classPath may be null
 
+        log.debug("Creating child container: {}", id);
+
         if (log.isTraceEnabled()) {
             log.trace("Creating child container: {}", id);
             

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs-truezip/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs-truezip/src/main/resources/META-INF/spring/components.xml?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs-truezip/src/main/resources/META-INF/spring/components.xml
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs-truezip/src/main/resources/META-INF/spring/components.xml
Fri Oct 10 04:25:34 2008
@@ -38,8 +38,8 @@
         </property>
     </bean>
 
-    <bean class="org.apache.geronimo.gshell.vfs.config.ExtentionMapConfigurer">
-        <property name="extention" value="zip"/>
+    <bean class="org.apache.geronimo.gshell.vfs.config.ExtensionMapConfigurer">
+        <property name="extension" value="zip"/>
         <property name="scheme" value="zip"/>
     </bean>
 
@@ -57,8 +57,8 @@
         </property>
     </bean>
 
-    <bean class="org.apache.geronimo.gshell.vfs.config.ExtentionMapConfigurer">
-        <property name="extention" value="tar"/>
+    <bean class="org.apache.geronimo.gshell.vfs.config.ExtensionMapConfigurer">
+        <property name="extension" value="tar"/>
         <property name="scheme" value="tar"/>
     </bean>
 
@@ -76,8 +76,8 @@
         </property>
     </bean>
 
-    <bean class="org.apache.geronimo.gshell.vfs.config.ExtentionMapConfigurer">
-        <property name="extention" value="jar"/>
+    <bean class="org.apache.geronimo.gshell.vfs.config.ExtensionMapConfigurer">
+        <property name="extension" value="jar"/>
         <property name="scheme" value="jar"/>
     </bean>
 

Copied: geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ExtensionMapConfigurer.java
(from r703134, geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ExtentionMapConfigurer.java)
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ExtensionMapConfigurer.java?p2=geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ExtensionMapConfigurer.java&p1=geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ExtentionMapConfigurer.java&r1=703134&r2=703411&rev=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ExtentionMapConfigurer.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ExtensionMapConfigurer.java
Fri Oct 10 04:25:34 2008
@@ -22,19 +22,19 @@
 import javax.annotation.PostConstruct;
 
 /**
- * Configures an extention mapping.
+ * Configures an extension mapping.
  *
  * @version $Rev$ $Date$
  */
-public class ExtentionMapConfigurer
-extends FileSystemManagerConfigurerSupport
+public class ExtensionMapConfigurer
+    extends FileSystemManagerConfigurerSupport
 {
-    private String extention;
+    private String extension;
 
     private String scheme;
 
-    public void setExtention(final String extention) {
-        this.extention = extention;
+    public void setExtension(final String extension) {
+        this.extension = extension;
     }
 
     public void setScheme(final String scheme) {
@@ -43,10 +43,15 @@
 
     @PostConstruct
     public void init() {
-        // TODO: Complain on null
+        if (extension == null) {
+            throw new RuntimeException("Missing property: extension");
+        }
+        if (scheme == null) {
+            throw new RuntimeException("Missing property: scheme");
+        }
 
-        log.debug("Adding extention mapping: {} -> {}", extention, scheme);
+        log.debug("Adding extension mapping: {} -> {}", extension, scheme);
         ConfigurableFileSystemManager fsm = getFileSystemManager();
-        fsm.addExtensionMap(extention, scheme);
+        fsm.addExtensionMap(extension, scheme);
     }
 }
\ No newline at end of file

Propchange: geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/ExtensionMapConfigurer.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/MimeTypeMapConfigurer.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/MimeTypeMapConfigurer.java?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/MimeTypeMapConfigurer.java
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/java/org/apache/geronimo/gshell/vfs/config/MimeTypeMapConfigurer.java
Fri Oct 10 04:25:34 2008
@@ -43,7 +43,12 @@
 
     @PostConstruct
     public void init() {
-        // TODO: Complain on null
+        if (mimeType == null) {
+            throw new RuntimeException("Missing property: mimeType");
+        }
+        if (scheme == null) {
+            throw new RuntimeException("Missing property: scheme");
+        }
 
         log.debug("Adding mime-type mapping: {} -> {}", mimeType, scheme);
         ConfigurableFileSystemManager fsm = getFileSystemManager();

Modified: geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/resources/META-INF/spring/components.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/resources/META-INF/spring/components.xml?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/resources/META-INF/spring/components.xml
(original)
+++ geronimo/gshell/trunk/gshell-support/gshell-vfs/src/main/resources/META-INF/spring/components.xml
Fri Oct 10 04:25:34 2008
@@ -96,22 +96,22 @@
     -->
 
     <!--
-    <bean class="org.apache.geronimo.gshell.vfs.config.ExtentionMapConfigurer">
+    <bean class="org.apache.geronimo.gshell.vfs.config.ExtensionMapConfigurer">
         <property name="extention" value="bz2"/>
         <property name="scheme" value="bz2"/>
     </bean>
 
-    <bean class="org.apache.geronimo.gshell.vfs.config.ExtentionMapConfigurer">
+    <bean class="org.apache.geronimo.gshell.vfs.config.ExtensionMapConfigurer">
         <property name="extention" value="gz"/>
         <property name="scheme" value="gz"/>
     </bean>
 
-    <bean class="org.apache.geronimo.gshell.vfs.config.ExtentionMapConfigurer">
+    <bean class="org.apache.geronimo.gshell.vfs.config.ExtensionMapConfigurer">
         <property name="extention" value="tgz"/>
         <property name="scheme" value="tar"/>
     </bean>
 
-    <bean class="org.apache.geronimo.gshell.vfs.config.ExtentionMapConfigurer">
+    <bean class="org.apache.geronimo.gshell.vfs.config.ExtensionMapConfigurer">
         <property name="extention" value="tar"/>
         <property name="scheme" value="tbz2"/>
     </bean>

Modified: geronimo/gshell/trunk/gshell-support/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/pom.xml?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/pom.xml (original)
+++ geronimo/gshell/trunk/gshell-support/pom.xml Fri Oct 10 04:25:34 2008
@@ -59,6 +59,7 @@
         <module>gshell-vfs-meta</module>
         <module>gshell-vfs-truezip</module>
         <module>gshell-security</module>
+        <module>gshell-ivy</module>
     </modules>
 
 </project>
\ No newline at end of file

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationFactoryBean.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationFactoryBean.java?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationFactoryBean.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-bootstrap/src/main/java/org/apache/geronimo/gshell/wisdom/application/ApplicationFactoryBean.java
Fri Oct 10 04:25:34 2008
@@ -27,7 +27,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 
 /**
- * ???
+ * Provides access to the {@link Application} instance.
  *
  * @version $Rev$ $Date$
  */
@@ -43,7 +43,7 @@
         assert applicationManager != null;
         Application app = applicationManager.getApplication();
 
-        log.debug("Applictaion: {}", app);
+        log.debug("Application: {}", app);
 
         return app;
     }

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=703411&r1=703410&r2=703411&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
Fri Oct 10 04:25:34 2008
@@ -37,6 +37,7 @@
 import org.apache.geronimo.gshell.shell.Shell;
 import org.apache.geronimo.gshell.spring.BeanContainer;
 import org.apache.geronimo.gshell.spring.BeanContainerAware;
+import org.apache.geronimo.gshell.chronos.StopWatch;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
@@ -165,6 +166,8 @@
     private ApplicationImpl loadApplication(final ApplicationConfiguration config) throws
Exception {
         assert config != null;
 
+        StopWatch watch = new StopWatch(true);
+
         ApplicationImpl app = new ApplicationImpl(config);
 
         ApplicationModel model = app.getModel();
@@ -188,6 +191,8 @@
         
         applicationContainer = child;
 
+        log.debug("Application loaded in: {}", watch);
+
         return app;
     }
 

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=703411&r1=703410&r2=703411&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 Oct 10 04:25:34 2008
@@ -177,8 +177,7 @@
     public Shell create() throws Exception {
         log.debug("Building");
 
-        StopWatch watch = new StopWatch();
-        watch.start();
+        StopWatch watch = new StopWatch(true);
         
         // Set some defaults
         if (applicationConfig.getIo() == null) {

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginManagerImpl.java?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginManagerImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/plugin/PluginManagerImpl.java
Fri Oct 10 04:25:34 2008
@@ -32,6 +32,7 @@
 import org.apache.geronimo.gshell.spring.BeanContainer;
 import org.apache.geronimo.gshell.spring.BeanContainerAware;
 import org.apache.geronimo.gshell.wisdom.application.ApplicationConfiguredEvent;
+import org.apache.geronimo.gshell.chronos.StopWatch;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
@@ -121,6 +122,8 @@
         assert application != null;
         assert artifact != null;
 
+        StopWatch watch = new StopWatch(true);
+
         log.debug("Loading plugin: {}", artifact.getId());
 
         Set<Artifact> artifacts = resolveArtifacts(application, artifact);
@@ -145,6 +148,8 @@
 
         plugin.activate();
 
+        log.debug("Loaded plugin in: {}", watch);
+        
         eventPublisher.publish(new PluginLoadedEvent(plugin, artifact));
     }
 

Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandResolverImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandResolverImpl.java?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandResolverImpl.java
(original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/registry/CommandResolverImpl.java
Fri Oct 10 04:25:34 2008
@@ -40,6 +40,7 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
+import java.util.Arrays;
 
 /**
  * {@link CommandResolver} component.
@@ -112,7 +113,7 @@
         assert name != null;
         assert variables != null;
 
-        log.debug("Resolving alias for name: {}", name);
+        log.trace("Resolving alias for name: {}", name);
         
         AliasCommand command = null;
 
@@ -120,7 +121,7 @@
             FileObject file = fileSystemAccess.resolveFile(getAliasesDirectory(), name);
 
             if (file != null && file.exists()) {
-                log.debug("Resolved file: {}", file);
+                log.trace("Resolved file: {}", file);
 
                 // Make sure whatever file we resolved is actually a meta file
                 if (!isMetaFile(file)) {
@@ -148,7 +149,7 @@
         assert name != null;
         assert variables != null;
 
-        log.debug("Resolving command file: {}", name);
+        log.trace("Resolving command file: {}", name);
 
         // Special handling for root & group
         if (name.equals("/")) {
@@ -158,18 +159,18 @@
             return getGroupDirectory(variables);
         }
         
-        String[] searchPath = getSearchPath(variables);
+        Collection<String> searchPath = getSearchPath(variables);
 
-        log.debug("Search path: {}", searchPath);
+        log.trace("Search path: {}", searchPath);
 
         FileObject groupDir = getGroupDirectory(variables);
 
-        log.debug("Group dir: {}", groupDir);
+        log.trace("Group dir: {}", groupDir);
 
         FileObject file = null;
 
         for (String pathElement : searchPath) {
-            log.debug("Resolving file; name={}, pathElement={}", name, pathElement);
+            log.trace("Resolving file; name={}, pathElement={}", name, pathElement);
 
             FileObject dir;
             
@@ -183,11 +184,11 @@
                 dir = fileSystemAccess.resolveFile(groupDir, pathElement);
             }
 
-            log.debug("Dir: {}", dir);
+            log.trace("Dir: {}", dir);
 
             FileObject tmp = fileSystemAccess.resolveFile(dir, name);
 
-            log.debug("File: {}", tmp);
+            log.trace("File: {}", tmp);
 
             if (tmp.exists()) {
                 file = tmp;
@@ -196,7 +197,7 @@
         }
 
         if (file != null) {
-            log.debug("Resolved file: {}", file);
+            log.trace("Resolved file: {}", file);
 
             // Make sure whatever file we resolved is actually a meta file
             if (!isMetaFile(file)) {
@@ -214,20 +215,20 @@
         return file;
     }
 
-    private String[] getSearchPath(final Variables vars) {
+    private Collection<String> getSearchPath(final Variables vars) {
         assert vars != null;
 
         Object tmp = vars.get(PATH);
 
         if (tmp instanceof String) {
-            return ((String)tmp).split(PATH_SEPARATOR);
+            return Arrays.asList(((String)tmp).split(PATH_SEPARATOR));
         }
         else if (tmp != null) {
             log.error("Invalid type for variable '" + PATH + "'; expected String; found:
" + tmp.getClass());
         }
 
         // Return the default search path (group then root)
-        return new String[] { ".", "/" };
+        return Arrays.asList(".", "/");
     }
 
     public Collection<Command> resolveCommands(String name, Variables variables) throws
CommandException {
@@ -245,7 +246,7 @@
         try {
             FileObject file = resolveCommandFile(name, variables);
 
-            log.debug("Resolved (for commands): {}", file);
+            log.trace("Resolved (for commands): {}", file);
 
             if (file != null && file.exists()) {
                 if (file.getType().hasChildren()) {
@@ -330,7 +331,7 @@
     private Command createCommand(final FileObject file) throws FileSystemException, CommandException
{
         assert file != null;
 
-        log.debug("Creating command for file: {}", file);
+        log.trace("Creating command for file: {}", file);
 
         Command command = null;
 
@@ -360,7 +361,7 @@
 
         String name = file.getName().getBaseName();
 
-        log.debug("Creating command for alias: {}", name);
+        log.trace("Creating command for alias: {}", name);
 
         AliasCommand command = container.getBean(AliasCommand.class);
 
@@ -378,7 +379,7 @@
     private GroupCommand createGroupCommand(final FileObject file) throws FileSystemException
{
         assert file != null;
 
-        log.debug("Creating command for group: {}", file);
+        log.trace("Creating command for group: {}", file);
 
         GroupCommand command = container.getBean(GroupCommand.class);
         command.setFile(file);

Modified: geronimo/gshell/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/pom.xml?rev=703411&r1=703410&r2=703411&view=diff
==============================================================================
--- geronimo/gshell/trunk/pom.xml (original)
+++ geronimo/gshell/trunk/pom.xml Fri Oct 10 04:25:34 2008
@@ -251,6 +251,12 @@
             </dependency>
             
             <dependency>
+                <groupId>org.apache.geronimo.gshell.support</groupId>
+                <artifactId>gshell-ivy</artifactId>
+                <version>1.0-alpha-2-SNAPSHOT</version>
+            </dependency>
+            
+            <dependency>
                 <groupId>org.apache.geronimo.gshell</groupId>
                 <artifactId>gshell-api</artifactId>
                 <version>1.0-alpha-2-SNAPSHOT</version>



Mime
View raw message