geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hogst...@apache.org
Subject svn commit: r566336 - /geronimo/server/branches/2.0.1/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Date Wed, 15 Aug 2007 20:46:21 GMT
Author: hogstrom
Date: Wed Aug 15 13:46:20 2007
New Revision: 566336

URL: http://svn.apache.org/viewvc?view=rev&rev=566336
Log:
Plugin installer downloads a different version of dependency than the one specified 

Modified:
    geronimo/server/branches/2.0.1/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java

Modified: geronimo/server/branches/2.0.1/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0.1/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java?view=diff&rev=566336&r1=566335&r2=566336
==============================================================================
--- geronimo/server/branches/2.0.1/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
(original)
+++ geronimo/server/branches/2.0.1/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Wed Aug 15 13:46:20 2007
@@ -689,6 +689,20 @@
             monitor.getResults().setCurrentMessage("Downloading " + configID);
             monitor.getResults().setCurrentFilePercent(-1);
             OpenResult result = openStream(configID, repos, username, password, monitor);
+            // Check if the result is already in server's repository
+            if(configManager.getArtifactResolver().queryArtifacts(result.getConfigID()).length
> 0) {
+                String msg = "Not downloading "+configID+". Query for "+configID+" resulted
in "+result.getConfigID()
+                             +" which is already available in server's repository.";
+                monitor.getResults().setCurrentMessage(msg);
+                log.info(msg);
+                if(result.getStream() != null) {
+                    try {
+                        result.getStream().close();
+                    } catch(IOException ignored) {
+                    }
+                }
+                return;
+            }
             try {
                 File tempFile = downloadFile(result, monitor);
                 if (tempFile == null) {



Mime
View raw message