You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2006/11/22 20:48:26 UTC

svn commit: r478304 - in /geronimo/genesis/trunk/build-harness: groovy.shlib installdeps maven maven.groovy verify

Author: jdillon
Date: Wed Nov 22 11:48:26 2006
New Revision: 478304

URL: http://svn.apache.org/viewvc?view=rev&rev=478304
Log:
Use shlib to contain the common sh muck

Added:
    geronimo/genesis/trunk/build-harness/groovy.shlib
Modified:
    geronimo/genesis/trunk/build-harness/installdeps
    geronimo/genesis/trunk/build-harness/maven
    geronimo/genesis/trunk/build-harness/maven.groovy
    geronimo/genesis/trunk/build-harness/verify

Added: geronimo/genesis/trunk/build-harness/groovy.shlib
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/groovy.shlib?view=auto&rev=478304
==============================================================================
--- geronimo/genesis/trunk/build-harness/groovy.shlib (added)
+++ geronimo/genesis/trunk/build-harness/groovy.shlib Wed Nov 22 11:48:26 2006
@@ -0,0 +1,42 @@
+#!/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$
+##
+
+BASEDIR=`cd "$DIRNAME" && pwd`
+
+export GROOVY_HOME="$BASEDIR/groovy"
+GROOVY="$GROOVY_HOME/bin/groovy"
+
+# Make sure we can exec it
+chmod +x "$GROOVY"
+
+# Use 1.5 for Groovy
+export JAVA_HOME="$JAVA_HOME_1_5"
+
+# Display the current environment
+set
+
+groovy() {
+    exec "$GROOVY" $*
+}
+

Modified: geronimo/genesis/trunk/build-harness/installdeps
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/installdeps?view=diff&rev=478304&r1=478303&r2=478304
==============================================================================
--- geronimo/genesis/trunk/build-harness/installdeps (original)
+++ geronimo/genesis/trunk/build-harness/installdeps Wed Nov 22 11:48:26 2006
@@ -25,16 +25,7 @@
 DIRNAME=`dirname $0`
 PROGNAME=`basename $0`
 
-BASEDIR=`cd "$DIRNAME" && pwd`
+. "$DIRNAME/groovy.shlib"
 
-export GROOVY_HOME="$BASEDIR/groovy"
-groovy="$GROOVY_HOME/bin/groovy"
+groovy "$PROGNAME.groovy" $@
 
-# Make sure we can exec it
-chmod +x "$groovy"
-
-# Use 1.5 for Groovy
-export JAVA_HOME="$JAVA_HOME_1_5"
-set
-
-exec "$groovy" "$PROGNAME.groovy" $@

Modified: geronimo/genesis/trunk/build-harness/maven
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/maven?view=diff&rev=478304&r1=478303&r2=478304
==============================================================================
--- geronimo/genesis/trunk/build-harness/maven (original)
+++ geronimo/genesis/trunk/build-harness/maven Wed Nov 22 11:48:26 2006
@@ -25,16 +25,7 @@
 DIRNAME=`dirname $0`
 PROGNAME=`basename $0`
 
-BASEDIR=`cd "$DIRNAME" && pwd`
+. "$DIRNAME/groovy.shlib"
 
-export GROOVY_HOME="$BASEDIR/groovy"
-groovy="$GROOVY_HOME/bin/groovy"
+groovy "$PROGNAME.groovy" $@
 
-# Make sure we can exec it
-chmod +x "$groovy"
-
-# Use 1.5 for Groovy
-export JAVA_HOME="$JAVA_HOME_1_5"
-set
-
-exec "$groovy" "$PROGNAME.groovy" $@

Modified: geronimo/genesis/trunk/build-harness/maven.groovy
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/maven.groovy?view=diff&rev=478304&r1=478303&r2=478304
==============================================================================
--- geronimo/genesis/trunk/build-harness/maven.groovy (original)
+++ geronimo/genesis/trunk/build-harness/maven.groovy Wed Nov 22 11:48:26 2006
@@ -46,6 +46,8 @@
             throw new Exception("Unable to use Java ${ver}; missing JAVA_HOME_${tmp}")
         }
         
+        println("Using JAVA_HOME: ${dir}")
+        
         this.javaHome = dir
     }
     
@@ -89,7 +91,7 @@
             def arg = iter.next()
             
             switch (arg) {
-                case '--java':
+                case [ '-j', '--java' ]:
                     setJava(iter.next())
                     break
                 

Modified: geronimo/genesis/trunk/build-harness/verify
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/verify?view=diff&rev=478304&r1=478303&r2=478304
==============================================================================
--- geronimo/genesis/trunk/build-harness/verify (original)
+++ geronimo/genesis/trunk/build-harness/verify Wed Nov 22 11:48:26 2006
@@ -25,16 +25,7 @@
 DIRNAME=`dirname $0`
 PROGNAME=`basename $0`
 
-BASEDIR=`cd "$DIRNAME" && pwd`
+. "$DIRNAME/groovy.shlib"
 
-export GROOVY_HOME="$BASEDIR/groovy"
-groovy="$GROOVY_HOME/bin/groovy"
+groovy "$PROGNAME.groovy" $@
 
-# Make sure we can exec it
-chmod +x "$groovy"
-
-# Use 1.5 for Groovy
-export JAVA_HOME="$JAVA_HOME_1_5"
-set
-
-exec "$groovy" "$PROGNAME.groovy" $@