geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r478310 - in /geronimo/genesis/trunk/build-harness: ./ bin/
Date Wed, 22 Nov 2006 20:10:45 GMT
Author: jdillon
Date: Wed Nov 22 12:10:44 2006
New Revision: 478310

URL: http://svn.apache.org/viewvc?view=rev&rev=478310
Log:
Move scripts to bin/

Added:
    geronimo/genesis/trunk/build-harness/bin/
    geronimo/genesis/trunk/build-harness/bin/groovy.shlib
      - copied, changed from r478304, geronimo/genesis/trunk/build-harness/groovy.shlib
    geronimo/genesis/trunk/build-harness/bin/installdeps   (with props)
    geronimo/genesis/trunk/build-harness/bin/installdeps.groovy
      - copied, changed from r475540, geronimo/genesis/trunk/build-harness/installdeps.groovy
    geronimo/genesis/trunk/build-harness/bin/maven   (with props)
    geronimo/genesis/trunk/build-harness/bin/maven.groovy
      - copied, changed from r478304, geronimo/genesis/trunk/build-harness/maven.groovy
    geronimo/genesis/trunk/build-harness/bin/prepare   (with props)
    geronimo/genesis/trunk/build-harness/bin/verify   (with props)
    geronimo/genesis/trunk/build-harness/bin/verify.groovy
      - copied, changed from r475540, geronimo/genesis/trunk/build-harness/verify.groovy
Removed:
    geronimo/genesis/trunk/build-harness/groovy.shlib
    geronimo/genesis/trunk/build-harness/installdeps
    geronimo/genesis/trunk/build-harness/installdeps.groovy
    geronimo/genesis/trunk/build-harness/maven
    geronimo/genesis/trunk/build-harness/maven.groovy
    geronimo/genesis/trunk/build-harness/verify
    geronimo/genesis/trunk/build-harness/verify.groovy

Copied: geronimo/genesis/trunk/build-harness/bin/groovy.shlib (from r478304, geronimo/genesis/trunk/build-harness/groovy.shlib)
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/bin/groovy.shlib?view=diff&rev=478310&p1=geronimo/genesis/trunk/build-harness/groovy.shlib&r1=478304&p2=geronimo/genesis/trunk/build-harness/bin/groovy.shlib&r2=478310
==============================================================================
--- geronimo/genesis/trunk/build-harness/groovy.shlib (original)
+++ geronimo/genesis/trunk/build-harness/bin/groovy.shlib Wed Nov 22 12:10:44 2006
@@ -22,7 +22,8 @@
 ## $Rev$ $Date$
 ##
 
-BASEDIR=`cd "$DIRNAME" && pwd`
+export BINDIR=`cd "$DIRNAME" && pwd`
+export BASEDIR=`cd "$BINDIR/.." && pwd`
 
 export GROOVY_HOME="$BASEDIR/groovy"
 GROOVY="$GROOVY_HOME/bin/groovy"
@@ -34,9 +35,12 @@
 export JAVA_HOME="$JAVA_HOME_1_5"
 
 # Display the current environment
-set
+# set
 
 groovy() {
-    exec "$GROOVY" $*
+    (
+        cd "$BINDIR"
+        exec "$GROOVY" "$PROGNAME.groovy" $*
+    )
 }
 

Added: geronimo/genesis/trunk/build-harness/bin/installdeps
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/bin/installdeps?view=auto&rev=478310
==============================================================================
--- geronimo/genesis/trunk/build-harness/bin/installdeps (added)
+++ geronimo/genesis/trunk/build-harness/bin/installdeps Wed Nov 22 12:10:44 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`
+
+. "$DIRNAME/groovy.shlib"
+
+groovy "$PROGNAME.groovy" $@
+

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

Copied: geronimo/genesis/trunk/build-harness/bin/installdeps.groovy (from r475540, geronimo/genesis/trunk/build-harness/installdeps.groovy)
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/bin/installdeps.groovy?view=diff&rev=478310&p1=geronimo/genesis/trunk/build-harness/installdeps.groovy&r1=475540&p2=geronimo/genesis/trunk/build-harness/bin/installdeps.groovy&r2=478310
==============================================================================
--- geronimo/genesis/trunk/build-harness/installdeps.groovy (original)
+++ geronimo/genesis/trunk/build-harness/bin/installdeps.groovy Wed Nov 22 12:10:44 2006
@@ -27,7 +27,7 @@
     
     def m2RepoCache = new File(homedir, ".m2/repository")
     
-    def basedir = new File(".").getCanonicalFile()
+    def basedir = new File(System.getenv("BASEDIR").getCanonicalFile()
     
     def depsdir = new File(basedir, "dependencies")
     

Added: geronimo/genesis/trunk/build-harness/bin/maven
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/bin/maven?view=auto&rev=478310
==============================================================================
--- geronimo/genesis/trunk/build-harness/bin/maven (added)
+++ geronimo/genesis/trunk/build-harness/bin/maven Wed Nov 22 12:10:44 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`
+
+. "$DIRNAME/groovy.shlib"
+
+groovy $@
+

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

Copied: geronimo/genesis/trunk/build-harness/bin/maven.groovy (from r478304, geronimo/genesis/trunk/build-harness/maven.groovy)
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/bin/maven.groovy?view=diff&rev=478310&p1=geronimo/genesis/trunk/build-harness/maven.groovy&r1=478304&p2=geronimo/genesis/trunk/build-harness/bin/maven.groovy&r2=478310
==============================================================================
--- geronimo/genesis/trunk/build-harness/maven.groovy (original)
+++ geronimo/genesis/trunk/build-harness/bin/maven.groovy Wed Nov 22 12:10:44 2006
@@ -22,11 +22,8 @@
 //
 
 class MavenBuilder
+    extends CliSupport
 {
-    def ant = new AntBuilder()
-    
-    def basedir = new File(".").getCanonicalFile()
-    
     def repodir = new File(basedir, "repository")
     
     def javaHome = System.getenv("JAVA_HOME")
@@ -39,7 +36,7 @@
         p.getBuildListeners()[0].setEmacsMode(true)
     }
     
-    def setJava(ver) {
+    def setJavaVersion(ver) {
         def tmp = ver.replace(".", "_")
         def dir = System.getenv("JAVA_HOME_${tmp}")
         if (dir == null) {
@@ -51,37 +48,6 @@
         this.javaHome = dir
     }
     
-    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: "-Dmaven.repo.local=${repodir}")
-            arg(value: '--batch-mode')
-            arg(value: '--errors')
-            
-            arg(value: '--file')
-            arg(file: "${pom}")
-            
-            args.each {
-                arg(value: "${it}")
-            }
-            
-            env(key: "JAVA_HOME", file: javaHome)
-        }
-    }
-    
     def main(args) {
         def iter = args.toList().iterator()
         args = []
@@ -92,7 +58,7 @@
             
             switch (arg) {
                 case [ '-j', '--java' ]:
-                    setJava(iter.next())
+                    setJavaVersion(iter.next())
                     break
                 
                 case '--timeout':
@@ -119,6 +85,10 @@
                         throw new Exception("Unexpected argument: ${arg}")
                     }
                     pom = new File(arg)
+                    if (!pom.isAbsolute()) {
+                        pom = new File(basedir, arg)
+                    }
+                    break
             }
         }
         
@@ -127,6 +97,40 @@
         }
         
         maven(pom, args)
+    }
+    
+    def maven(pom, args) {
+        assert pom != null
+        assert args != null
+        
+        if (javaHome == null) {
+            throw new Exception("Please define JAVA_HOME; or use --java <ver>")
+        }
+        
+        ant.exec(executable: "mvn", dir: basedir, 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: "-Dmaven.repo.local=${repodir}")
+            arg(value: '--batch-mode')
+            arg(value: '--errors')
+            
+            arg(value: '--file')
+            arg(file: "${pom}")
+            
+            args.each {
+                arg(value: "${it}")
+            }
+            
+            env(key: "JAVA_HOME", file: javaHome)
+        }
     }
 }
 

Added: geronimo/genesis/trunk/build-harness/bin/prepare
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/bin/prepare?view=auto&rev=478310
==============================================================================
--- geronimo/genesis/trunk/build-harness/bin/prepare (added)
+++ geronimo/genesis/trunk/build-harness/bin/prepare Wed Nov 22 12:10:44 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`
+
+. "$DIRNAME/groovy.shlib"
+
+groovy "$PROGNAME.groovy" $@
+

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

Added: geronimo/genesis/trunk/build-harness/bin/verify
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/bin/verify?view=auto&rev=478310
==============================================================================
--- geronimo/genesis/trunk/build-harness/bin/verify (added)
+++ geronimo/genesis/trunk/build-harness/bin/verify Wed Nov 22 12:10:44 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`
+
+. "$DIRNAME/groovy.shlib"
+
+groovy "$PROGNAME.groovy" $@
+

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

Copied: geronimo/genesis/trunk/build-harness/bin/verify.groovy (from r475540, geronimo/genesis/trunk/build-harness/verify.groovy)
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/bin/verify.groovy?view=diff&rev=478310&p1=geronimo/genesis/trunk/build-harness/verify.groovy&r1=475540&p2=geronimo/genesis/trunk/build-harness/bin/verify.groovy&r2=478310
==============================================================================
--- geronimo/genesis/trunk/build-harness/verify.groovy (original)
+++ geronimo/genesis/trunk/build-harness/bin/verify.groovy Wed Nov 22 12:10:44 2006
@@ -23,7 +23,7 @@
 
 class VerifyOutputs
 {
-    def basedir = new File(".").getCanonicalFile()
+    def basedir = new File(System.getenv("BASEDIR").getCanonicalFile()
     
     def outdir = new File(basedir, "output")
     



Mime
View raw message