geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r706298 - in /geronimo/server/trunk/framework/modules: geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/ geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/
Date Mon, 20 Oct 2008 14:10:49 GMT
Author: linsun
Date: Mon Oct 20 07:10:49 2008
New Revision: 706298

URL: http://svn.apache.org/viewvc?rev=706298&view=rev
Log:
GERONIMO-4370 improve usage of default-repository in plugin catalog

Modified:
    geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandDeploy.java
    geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListConfigurations.java
    geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java

Modified: geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandDeploy.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandDeploy.java?rev=706298&r1=706297&r2=706298&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandDeploy.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandDeploy.java
Mon Oct 20 07:10:49 2008
@@ -42,7 +42,7 @@
         ProgressObject po = super.runCommand(mgr, out, inPlace, tlist, module, plan);
         waitForProgress(out, po);
         if(po.getDeploymentStatus().isFailed()) {
-            throw new DeploymentException("Unable to distribute "+(module == null ? plan.getName()
: module.getName())+": "+po.getDeploymentStatus().getMessage());
+            throw new DeploymentException("Unable to deploy "+(module == null ? plan.getName()
: module.getName())+": "+po.getDeploymentStatus().getMessage());
         }
         return mgr.start(po.getResultTargetModuleIDs());
     }

Modified: geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListConfigurations.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListConfigurations.java?rev=706298&r1=706297&r2=706298&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListConfigurations.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandListConfigurations.java
Mon Oct 20 07:10:49 2008
@@ -41,6 +41,7 @@
 import org.apache.geronimo.kernel.config.NoSuchStoreException;
 import org.apache.geronimo.system.plugin.DownloadResults;
 import org.apache.geronimo.system.plugin.PluginInstallerGBean;
+import org.apache.geronimo.system.plugin.SourceRepository;
 import org.apache.geronimo.system.plugin.model.PluginArtifactType;
 import org.apache.geronimo.system.plugin.model.PluginListType;
 import org.apache.geronimo.system.plugin.model.PluginType;
@@ -222,6 +223,8 @@
 
     public PluginListType getInstallList(PluginListType plugins, ConsoleReader consoleReader,
String repo) throws IOException {
         Map<String, Collection<PluginType>> categories = writePluginList(plugins,
consoleReader);
+        List<String> defaultRepoLocations = plugins.getDefaultRepository();
+        
         if (categories == null) {
             return null;
         }
@@ -258,9 +261,15 @@
             PluginType target = available.get(selection - 1);
             list.getPlugin().add(target);
         }
+        
         if (repo != null) {
             list.getDefaultRepository().add(repo);
         }
+        
+        //let's add the repo's default-repository to the list
+        for (String defaultRepoLocation : defaultRepoLocations) {
+            list.getDefaultRepository().add(defaultRepoLocation);
+        }
         return list;
     }
 

Modified: geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java?rev=706298&r1=706297&r2=706298&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Mon Oct 20 07:10:49 2008
@@ -791,13 +791,20 @@
         }
         if (!restrictToDefaultRepository) {
             List<String> repoLocations;
+            List<String> defaultRepoLocations;
+
             if (!instance.getSourceRepository().isEmpty()) {
                 repoLocations = instance.getSourceRepository();
-            } else {
-                repoLocations = pluginsToInstall.getDefaultRepository();
-            }
-            for (String repoLocation : repoLocations) {
-                SourceRepository repo = pluginRepositoryList.getSourceRepository(repoLocation);
+                for (String repoLocation : repoLocations) {
+                    SourceRepository repo = pluginRepositoryList.getSourceRepository(repoLocation);
+                    repos.add(repo);
+                }
+            } 
+            
+            //always add the default repository location no matter if the plugin instance
contains source-repository.
+            defaultRepoLocations = pluginsToInstall.getDefaultRepository();
+            for (String defaultRepoLocation : defaultRepoLocations) {
+                SourceRepository repo = pluginRepositoryList.getSourceRepository(defaultRepoLocation);
                 repos.add(repo);
             }
         }



Mime
View raw message