geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r475546 - in /geronimo/genesis/trunk/build-harness: build installdeps maven maven.groovy verify
Date Thu, 16 Nov 2006 02:53:28 GMT
Author: jdillon
Date: Wed Nov 15 18:53:27 2006
New Revision: 475546

URL: http://svn.apache.org/viewvc?view=rev&rev=475546
Log:
Adding launcher scripts
Added timeout support to maven cmd

Added:
    geronimo/genesis/trunk/build-harness/installdeps   (with props)
    geronimo/genesis/trunk/build-harness/maven   (with props)
    geronimo/genesis/trunk/build-harness/verify   (with props)
Removed:
    geronimo/genesis/trunk/build-harness/build
Modified:
    geronimo/genesis/trunk/build-harness/maven.groovy

Added: geronimo/genesis/trunk/build-harness/installdeps
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/installdeps?view=auto&rev=475546
==============================================================================
--- geronimo/genesis/trunk/build-harness/installdeps (added)
+++ geronimo/genesis/trunk/build-harness/installdeps Wed Nov 15 18:53:27 2006
@@ -0,0 +1,31 @@
+#!/bin/sh
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+##
+## $Rev$ $Date$
+##
+
+DIRNAME=`dirname $0`
+PROGNAME=`basename $0`
+
+groovy="$DIRNAME/groovy/bin/groovy"
+chmod +x "$groovy"
+
+exec "$groovy" "$PROGNAME.groovy" $@

Propchange: geronimo/genesis/trunk/build-harness/installdeps
------------------------------------------------------------------------------
    svn:executable = *

Added: geronimo/genesis/trunk/build-harness/maven
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/maven?view=auto&rev=475546
==============================================================================
--- geronimo/genesis/trunk/build-harness/maven (added)
+++ geronimo/genesis/trunk/build-harness/maven Wed Nov 15 18:53:27 2006
@@ -0,0 +1,31 @@
+#!/bin/sh
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+##
+## $Rev$ $Date$
+##
+
+DIRNAME=`dirname $0`
+PROGNAME=`basename $0`
+
+groovy="$DIRNAME/groovy/bin/groovy"
+chmod +x "$groovy"
+
+exec "$groovy" "$PROGNAME.groovy" $@

Propchange: geronimo/genesis/trunk/build-harness/maven
------------------------------------------------------------------------------
    svn:executable = *

Modified: geronimo/genesis/trunk/build-harness/maven.groovy
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/maven.groovy?view=diff&rev=475546&r1=475545&r2=475546
==============================================================================
--- geronimo/genesis/trunk/build-harness/maven.groovy (original)
+++ geronimo/genesis/trunk/build-harness/maven.groovy Wed Nov 15 18:53:27 2006
@@ -31,6 +31,8 @@
     
     def javaHome = System.getenv("JAVA_HOME")
     
+    int timeout
+    
     def MavenBuilder() {
         // Enable emacs mode to disable [task] prefix on output
         def p = ant.getAntProject()
@@ -48,7 +50,21 @@
     }
     
     def maven(pom, args) {
+        if (javaHome == null) {
+            throw new Exception("Please define JAVA_HOME; or use --java <ver>")
+        }
+        
         ant.exec(executable: "mvn", failonerror: true) {
+            // Get a reference to the current node so we can conditionally set attributes
+            def node = current.wrapper
+            
+            // Maybe set timeout
+            if (timeout > 0) {
+                println("Timeout after: ${timeout} seconds");
+                def millis = timeout * 1000
+                node.setAttribute('timeout', "${millis}")
+            }
+            
             arg(value: "--file")
             arg(file: "${pom}")
             arg(value: "-Doutput.dir=${outdir}")
@@ -69,13 +85,16 @@
         while (iter.hasNext()) {
             def arg = iter.next()
             
-            println arg
-            
             switch (arg) {
                 case '--java':
                     setJava(iter.next())
                     break
                 
+                case '--timeout':
+                    timeout = Integer.parseInt(iter.next())
+                    break
+                
+                // HACK: Groovy's use of commons-cli eats up an '--' so need to use '---'
to skip
                 case '---':
                     while (iter.hasNext()) {
                         args.add(iter.next())
@@ -94,10 +113,11 @@
             }
         }
         
-        println "Pom: ${pom}"
-        println "Args: ${args}"
+        if (pom == null) {
+            throw new Exception("Missing pom")
+        }
         
-        // maven(pom, args)
+        maven(pom, args)
     }
 }
 

Added: geronimo/genesis/trunk/build-harness/verify
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/verify?view=auto&rev=475546
==============================================================================
--- geronimo/genesis/trunk/build-harness/verify (added)
+++ geronimo/genesis/trunk/build-harness/verify Wed Nov 15 18:53:27 2006
@@ -0,0 +1,31 @@
+#!/bin/sh
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+##
+## $Rev$ $Date$
+##
+
+DIRNAME=`dirname $0`
+PROGNAME=`basename $0`
+
+groovy="$DIRNAME/groovy/bin/groovy"
+chmod +x "$groovy"
+
+exec "$groovy" "$PROGNAME.groovy" $@

Propchange: geronimo/genesis/trunk/build-harness/verify
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message