geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r532210 - /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy
Date Wed, 25 Apr 2007 06:07:41 GMT
Author: jdillon
Date: Tue Apr 24 23:07:40 2007
New Revision: 532210

URL: http://svn.apache.org/viewvc?view=rev&rev=532210
Log:
Hack up the library muck to try and optimize agent i/o, really need to rewrite all this library
muck

Modified:
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy?view=diff&rev=532210&r1=532209&r2=532210
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy
Tue Apr 24 23:07:40 2007
@@ -166,13 +166,42 @@
         def repo = new gbuild.config.libraries.GBuildRepository()
         
         def getLibrary = { name, version, dir ->
-            def lib = LibraryManager.getLibrary(repo, name, version).copy(dir, '*.svn')
-            lib.unlock()
+            def lib = LibraryManager.getLibrary(repo, name, version)
+            
+            //
+            // HACK: Use custom copy to use a shared working copy for libraries
+            //       to reduce I/O on build agents.
+            //
+            
+            def excludesFile = File.createTempFile('rsync-excludes', '.txt')
+            excludesFile.deleteOnExit()
+            excludesFile.withPrintWriter { writer ->
+                writer.println('*.svn')
+            }
+            
+            ant.exec(executable: 'rsync') {
+                arg(value: '--archive')
+                arg(value: '--recursive')
+                arg(value: '--delete')
+                arg(value: '--whole-file')
+                arg(value: "--exclude-from=$excludesFile")
+                arg(value: "${lib.baseDir}/")
+                arg(value: "${dir}/")
+            }
+            
+            excludesFile.delete()
+            
             return lib
         }
         
-        def tckDir = new File('target/tck').canonicalFile
-        def riDir = new File('target/ri').canonicalFile
+        //
+        // HACK: Root the TCK & RI working copies out of the projects build space
+        //       to re-use between iterations
+        //
+        
+        def workspaceDir = new File("${System.properties['user.home']}/gbuild/workspace/$baseVersion").canonicalFile
+        def tckDir = new File(workspaceDir, 'tck')
+        def riDir = new File(workspaceDir, 'ri')
         
         switch (baseVersion) {
             case '1.2':



Mime
View raw message