geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r661682 - in /geronimo/gshell/trunk: gshell-bootstrap/src/main/java/org/apache/geronimo/gshell/bootstrap/ gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/ gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/ gshell-c...
Date Fri, 30 May 2008 12:26:08 GMT
Author: jdillon
Date: Fri May 30 05:26:07 2008
New Revision: 661682

URL: http://svn.apache.org/viewvc?rev=661682&view=rev
Log:
Drop javadoc muck for now, some comments about where to drop in interpolation

Removed:
    geronimo/gshell/trunk/gshell-bootstrap/src/main/java/org/apache/geronimo/gshell/bootstrap/package-info.java
    geronimo/gshell/trunk/gshell-cli/src/main/java/org/apache/geronimo/gshell/cli/package-info.java
    geronimo/gshell/trunk/gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/annotation/package-info.java
    geronimo/gshell/trunk/gshell-command-api/src/main/java/org/apache/geronimo/gshell/command/package-info.java
    geronimo/gshell/trunk/gshell-command-api/src/main/java/org/apache/geronimo/gshell/shell/package-info.java
    geronimo/gshell/trunk/gshell-commands/gshell-bsf/src/main/java/org/apache/geronimo/gshell/commands/bsf/package-info.java
    geronimo/gshell/trunk/gshell-commands/gshell-builtins/src/main/java/org/apache/geronimo/gshell/commands/builtins/package-info.java
    geronimo/gshell/trunk/gshell-commands/gshell-optional/src/main/java/org/apache/geronimo/gshell/commands/optional/package-info.java
    geronimo/gshell/trunk/gshell-commands/gshell-vfs/src/main/java/org/apache/geronimo/gshell/commands/vfs/package-info.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/package-info.java
    geronimo/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/package-info.java
    geronimo/gshell/trunk/gshell-parser/src/main/java/org/apache/geronimo/gshell/parser/package-info.java
    geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/plugin/package-info.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-client/src/main/java/org/apache/geronimo/gshell/remote/client/package-info.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/crypto/package-info.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/message/package-info.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-common/src/main/java/org/apache/geronimo/gshell/remote/package-info.java
    geronimo/gshell/trunk/gshell-remote/gshell-remote-server/src/main/java/org/apache/geronimo/gshell/remote/server/package-info.java
    geronimo/gshell/trunk/gshell-support/gshell-ansi/src/main/java/org/apache/geronimo/gshell/ansi/package-info.java
    geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/handler/package-info.java
    geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/package-info.java
    geronimo/gshell/trunk/gshell-support/gshell-clp/src/main/java/org/apache/geronimo/gshell/clp/setter/package-info.java
    geronimo/gshell/trunk/gshell-support/gshell-common/src/main/java/org/apache/geronimo/gshell/common/io/package-info.java
    geronimo/gshell/trunk/gshell-support/gshell-common/src/main/java/org/apache/geronimo/gshell/common/package-info.java
    geronimo/gshell/trunk/gshell-support/gshell-common/src/main/java/org/apache/geronimo/gshell/common/tostring/package-info.java
    geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/package-info.java
    geronimo/gshell/trunk/gshell-support/gshell-i18n/src/main/java/org/apache/geronimo/gshell/i18n/package-info.java
    geronimo/gshell/trunk/gshell-support/gshell-prefs/src/main/java/org/apache/geronimo/gshell/prefs/package-info.java
    geronimo/gshell/trunk/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/message/package-info.java
    geronimo/gshell/trunk/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/request/package-info.java
    geronimo/gshell/trunk/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/ssl/package-info.java
    geronimo/gshell/trunk/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/stream/package-info.java
    geronimo/gshell/trunk/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/base/package-info.java
    geronimo/gshell/trunk/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/package-info.java
    geronimo/gshell/trunk/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/ssl/package-info.java
    geronimo/gshell/trunk/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/tcp/package-info.java
    geronimo/gshell/trunk/gshell-whisper/src/main/java/org/apache/geronimo/gshell/whisper/transport/vm/package-info.java
Modified:
    geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java
    geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java
    geronimo/gshell/trunk/gshell-support/gshell-artifact/src/main/java/org/apache/geronimo/gshell/artifact/DefaultArtifactManager.java

Modified: geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java?rev=661682&r1=661681&r2=661682&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java
(original)
+++ geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java
Fri May 30 05:26:07 2008
@@ -20,6 +20,7 @@
 package org.apache.geronimo.gshell.application;
 
 import org.apache.geronimo.gshell.GShell;
+import org.apache.geronimo.gshell.settings.SettingsManager;
 import org.apache.geronimo.gshell.plugin.CommandDiscoverer;
 import org.apache.geronimo.gshell.plugin.CommandCollector;
 import org.apache.geronimo.gshell.artifact.ArtifactManager;
@@ -72,7 +73,10 @@
 
     @Requirement
     private ArtifactManager artifactManager;
-    
+
+    @Requirement
+    private SettingsManager settingsManager;
+
     private GShellPlexusContainer parentContainer;
 
     private GShellPlexusContainer container;
@@ -107,15 +111,7 @@
         // Validate the configuration
         config.validate();
 
-        Application application = config.getApplication();
-        log.debug("Application ID: {}", application.getId());
-        log.trace("Application descriptor: {}", application);
-
-        // Apply artifact manager configuration settings for application
-        configureArtifactManager(application);
-
-        // Create the application container
-        container = createContainer(application);
+        configure(config.getApplication());
 
         // Create a new context
         applicationContext = new ApplicationContext() {
@@ -133,6 +129,21 @@
         };
     }
 
+    private void configure(final Application application) throws Exception {
+        assert application != null;
+
+        // TODO: Add application interpolation here, include settings properties
+        
+        log.debug("Application ID: {}", application.getId());
+        log.trace("Application descriptor: {}", application);
+
+        // Apply artifact manager configuration settings for application
+        configureArtifactManager(application);
+
+        // Create the application container
+        container = createContainer(application);
+    }
+
     private void configureArtifactManager(final Application application) throws Exception
{
         assert application != null;
         assert artifactManager != null;
@@ -187,18 +198,15 @@
     private List<URL> createClassPath(final Application application) throws Exception
{
         assert application != null;
 
-        ArtifactFactory factory = artifactManager.getArtifactFactory();
-
-        Artifact originating = factory.createArtifact("dummy", "dummy", "dummy", null, "jar");
-
         ArtifactResolutionRequest request = new ArtifactResolutionRequest();
-        request.setArtifact(originating);
         request.setFilter(new ScopeArtifactFilter(Artifact.SCOPE_RUNTIME));
 
         Set<Artifact> artifacts = new LinkedHashSet<Artifact>();
         List<Dependency> dependencies = application.dependencies(true); // include
groups
 
         if (!dependencies.isEmpty()) {
+            ArtifactFactory factory = artifactManager.getArtifactFactory();
+
             log.debug("Application dependencies:");
 
             for (Dependency dep : dependencies) {

Modified: geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java?rev=661682&r1=661681&r2=661682&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java
(original)
+++ geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/settings/DefaultSettingsManager.java
Fri May 30 05:26:07 2008
@@ -58,7 +58,7 @@
 
         // Validate the configuration
         config.validate();
-        
+
         Settings settings = config.getSettings();
         if (settings != null) {
             configure(settings);
@@ -72,6 +72,8 @@
     private void configure(final Settings settings) throws Exception {
         assert settings != null;
 
+        // TODO: Add settings interpolation here
+        
         // Setup remote repositories
         for (RemoteRepository repo : settings.remoteRepositories()) {
             artifactManager.getRepositoryManager().addRemoteRepository(repo.getId(), repo.getLocationUri());

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=661682&r1=661681&r2=661682&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 May 30 05:26:07 2008
@@ -25,6 +25,7 @@
 import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
 import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
 import org.apache.maven.artifact.resolver.ArtifactResolver;
+import org.apache.maven.artifact.Artifact;
 import org.apache.maven.wagon.events.TransferListener;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
@@ -90,6 +91,13 @@
             request.setMetadataSource(artifactMetadataSource);
         }
 
+        // If there is no artifact, then assume we want to do some full transitive resolve
and install a dummy artifact
+        Artifact originating = request.getArtifact();
+        if (originating == null) {
+            originating = artifactFactory.createArtifact("dummy", "dummy", "dummy", null,
"jar");
+            request.setArtifact(originating);
+        }
+
         log.debug("Resolving request: {}", request);
 
         ArtifactResolutionResult result = artifactResolver.resolve(request);



Mime
View raw message