geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r510780 - /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy
Date Fri, 23 Feb 2007 02:56:15 GMT
Author: jdillon
Date: Thu Feb 22 18:56:14 2007
New Revision: 510780

URL: http://svn.apache.org/viewvc?view=rev&rev=510780
Log:
Hook up base project version 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=510780&r1=510779&r2=510780
==============================================================================
--- 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
Thu Feb 22 18:56:14 2007
@@ -46,23 +46,28 @@
     //       Might simply override init() ?
     //
     
+    def getBaseVersion() {
+        def version = params.require('version')
+        def matcher = version =~ /([^-]*)-(.*)/
+        def version = matcher[0][1]
+        log.info "Base version: $version"
+        return version
+    }
+    
     def build = {
         def maven = new MavenCommand(context)
         
-        def version = params.require('version')
-        log.info "Project version: $version"
-        
         //
         // For this project, we need to get the java version from
         // AH configuration (since 1.2 and 2.0 use differnt versions)
         //
         
-        switch (params.require('anthill.workflow')) {
-            case 'build 1.2':
+        switch (baseVersion) {
+            case '1.2':
                 maven.javaVersion = 1.4
                 break
             
-            case 'build 2.0':
+            case '2.0':
                 maven.javaVersion = 1.5
                 break
         }
@@ -99,12 +104,12 @@
         ant.mkdir(dir: "$targetDir/repository")
         
         // Determine the set of artifacts based on the workflow since this will differ from
version to version :-(
-        switch (params.require('anthill.workflow')) {
-            case 'build 1.2':
+        switch (baseVersion) {
+            case '1.2':
                 Geronimo12Collector.collect(ant, sourceDir, targetDir)
                 break
             
-            case 'build 2.0':
+            case '2.0':
                 fail("TODO: Need to figure out what the set of dependencies are required
for running tests for 2.0")
                 break
         }
@@ -203,29 +208,16 @@
         // AH configuration (since 1.2 and 2.0 use differnt versions)
         //
         
-        //
-        // FIXME: Crapski... this won't work, we don't have a good
-        //        workflow name to determine which version is which :-(
-        //
-        
-        /*
         args << '--java-version'
-        switch (params.require('anthill.workflow')) {
-            case 'build 1.2':
+        switch (baseVersion) {
+            case '1.2':
                 args << 1.4
                 break
             
-            case 'build 2.0':
+            case '2.0':
                 args << 1.5
-                    break
+                break
         }
-        */
-        
-        //
-        // HACK: Just hard-code 1.4 for now...
-        //
-        args << '--java-version'
-        args << 1.4
         
         args << '--web'
         args << params.require('webcontainer')



Mime
View raw message