geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r563785 - /geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Date Wed, 08 Aug 2007 08:08:49 GMT
Author: vamsic007
Date: Wed Aug  8 01:08:48 2007
New Revision: 563785

URL: http://svn.apache.org/viewvc?view=rev&rev=563785
Log:
GERONIMO-3351 Plugin installer downloads a different version of dependency than the one specified
  o Merging rev 563782 from branches\2.0
  o A "query" for a (SNAPSHOT) version from remote repository sometimes results in a different
version (call it "result").  And if result version is already in the server's repository,
there is no point in downloading it again.  It is resulting in an error while copying the
downloaded artifact to server's repository when it already exists.

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

Modified: geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java?view=diff&rev=563785&r1=563784&r2=563785
==============================================================================
--- geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-system/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Wed Aug  8 01:08:48 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