geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r356034 - in /geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly: BaseConfigInstaller.java LocalConfigInstaller.java RepoConfigInstaller.java
Date Sun, 11 Dec 2005 21:41:30 GMT
Author: djencks
Date: Sun Dec 11 13:41:23 2005
New Revision: 356034

URL: http://svn.apache.org/viewcvs?rev=356034&view=rev
Log:
GERONIMO-1334 prevent assembly plugin from re-installing already present cars

Modified:
    geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/BaseConfigInstaller.java
    geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/LocalConfigInstaller.java
    geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/RepoConfigInstaller.java

Modified: geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/BaseConfigInstaller.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/BaseConfigInstaller.java?rev=356034&r1=356033&r2=356034&view=diff
==============================================================================
--- geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/BaseConfigInstaller.java
(original)
+++ geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/BaseConfigInstaller.java
Sun Dec 11 13:41:23 2005
@@ -113,9 +113,13 @@
     }
 
     protected void execute(URI configId, InstallAdapter installAdapter, Repository sourceRepo,
FileSystemRepository targetRepo) throws IOException, InvalidConfigException {
+        if (installAdapter.containsConfiguration(configId)) {
+            System.out.println("Configuration " + configId + " already present in configuration
store");
+            return;
+        }
         GBeanData config = installAdapter.install(sourceRepo, configId);
         List dependencies = (List) config.getAttribute("dependencies");
-        System.out.println("Installed configuration " + artifact);
+        System.out.println("Installed configuration " + configId);
 
         FileWriteMonitor monitor = new StartFileWriteMonitor();
 
@@ -143,6 +147,7 @@
 
         GBeanData install(Repository sourceRepo, URI configId) throws IOException, InvalidConfigException;
 
+        boolean containsConfiguration(URI configID);
     }
 
     protected static class StartFileWriteMonitor implements FileWriteMonitor {

Modified: geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/LocalConfigInstaller.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/LocalConfigInstaller.java?rev=356034&r1=356033&r2=356034&view=diff
==============================================================================
--- geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/LocalConfigInstaller.java
(original)
+++ geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/LocalConfigInstaller.java
Sun Dec 11 13:41:23 2005
@@ -48,6 +48,10 @@
                 GBeanData config = store.install2(artifact);
                 return config;
             }
+
+            public boolean containsConfiguration(URI configID) {
+                return store.containsConfiguration(configID);
+            }
         };
         Repository sourceRepo = new InnerRepository();
         URI rootURI = targetRoot.toURI().resolve(targetRepository);

Modified: geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/RepoConfigInstaller.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/RepoConfigInstaller.java?rev=356034&r1=356033&r2=356034&view=diff
==============================================================================
--- geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/RepoConfigInstaller.java
(original)
+++ geronimo/branches/1.0/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/RepoConfigInstaller.java
Sun Dec 11 13:41:23 2005
@@ -87,6 +87,10 @@
             }
             return config;
         }
+
+        public boolean containsConfiguration(URI configID) {
+            return targetRepo.hasURI(configID);
+        }
     }
 
 }



Mime
View raw message