geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r437260 - in /geronimo/genesis/trunk: README.txt bootstrap bootstrap.bat bootstrap.xml build build.bat
Date Sun, 27 Aug 2006 00:26:09 GMT
Author: jdillon
Date: Sat Aug 26 17:26:08 2006
New Revision: 437260

URL: http://svn.apache.org/viewvc?rev=437260&view=rev
Log:
Use Ant-based bootstrap

Added:
    geronimo/genesis/trunk/bootstrap.bat   (with props)
    geronimo/genesis/trunk/bootstrap.xml   (with props)
Removed:
    geronimo/genesis/trunk/build
    geronimo/genesis/trunk/build.bat
Modified:
    geronimo/genesis/trunk/README.txt
    geronimo/genesis/trunk/bootstrap

Modified: geronimo/genesis/trunk/README.txt
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/README.txt?rev=437260&r1=437259&r2=437260&view=diff
==============================================================================
--- geronimo/genesis/trunk/README.txt (original)
+++ geronimo/genesis/trunk/README.txt Sat Aug 26 17:26:08 2006
@@ -6,6 +6,8 @@
 Genesis currently must be bootstrapped, which will build all modules that are
 used as extentions by config/project-config.
 
+You will need Ant installed and available in the search path of your shell.
+
 To perform a clean bootstrap simply run:
 
     ./bootstrap

Modified: geronimo/genesis/trunk/bootstrap
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/bootstrap?rev=437260&r1=437259&r2=437260&view=diff
==============================================================================
--- geronimo/genesis/trunk/bootstrap (original)
+++ geronimo/genesis/trunk/bootstrap Sat Aug 26 17:26:08 2006
@@ -1,36 +1,23 @@
 #!/bin/sh
 ##
-## $Id$
+## $Rev$ $Date$
 ##
 
 PROGNAME=`basename "$0"`
 DIRNAME=`dirname "$0"`
 
-warn() {
-    echo "${PROGNAME}: $*"
-}
+# OS specific support (must be 'true' or 'false').
+cygwin=false;
+case "`uname`" in
+    CYGWIN*)
+        cygwin=true
+        ;;
+esac
+
+# Translate PWD into a Windows path for better compatibility
+if $cygwin ; then
+    PWD=`cygpath --windows $PWD`
+fi
 
-die() {
-    warn "$*"
-    exit 1
-}
+ant $BUILD_OPTIONS -f bootstrap.xml "$@"
 
-clean() {
-    echo "Cleaning..."
-    
-    rm -rf ~/.m2/repository/org/apache/geronimo/genesis
-    
-    for x in `find "$DIRNAME" -name target -type d`; do
-        rm -rf "$x"
-    done
-}
-
-main() {
-    clean
-    
-    "$DIRNAME/build"
-    
-    echo "Done"
-}
-
-main | 2>&1 tee bootstrap.log

Added: geronimo/genesis/trunk/bootstrap.bat
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/bootstrap.bat?rev=437260&view=auto
==============================================================================
--- geronimo/genesis/trunk/bootstrap.bat (added)
+++ geronimo/genesis/trunk/bootstrap.bat Sat Aug 26 17:26:08 2006
@@ -0,0 +1,21 @@
+@echo off
+rem 
+rem $Rev$ $Date$
+rem 
+
+if not "%ECHO%" == "" echo %ECHO%
+
+setlocal
+set DIRNAME=%~dp0%
+set PROGNAME=%~nx0%
+set ARGS=%*
+
+ant %BUILD_OPTIONS% -f bootstrap.xml %ARGS%
+
+:END
+
+endlocal
+
+if not "%PAUSE%" == "" pause
+
+:END_NO_PAUSE

Propchange: geronimo/genesis/trunk/bootstrap.bat
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Propchange: geronimo/genesis/trunk/bootstrap.bat
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/genesis/trunk/bootstrap.bat
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/genesis/trunk/bootstrap.xml
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/bootstrap.xml?rev=437260&view=auto
==============================================================================
--- geronimo/genesis/trunk/bootstrap.xml (added)
+++ geronimo/genesis/trunk/bootstrap.xml Sat Aug 26 17:26:08 2006
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Rev$ $Date$ -->
+
+<project default="bootstrap">
+    
+    <macrodef name="mvn">
+        <attribute name="goal"/>
+        <attribute name="dir" default="${basedir}"/>
+        <sequential>
+            <exec executable="mvn${platform.script.ext}" dir="@{dir}">
+                <arg value="@{goal}"/>
+            </exec>
+        </sequential>
+    </macrodef>
+    
+    <macrodef name="build-stage">
+        <attribute name="name"/>
+        <sequential>
+            <exec executable="mvn${platform.script.ext}" dir="${basedir}">
+                <arg value="-Dstage=@{name}"/>
+                <arg value="install"/>
+            </exec>
+        </sequential>
+    </macrodef>
+    
+    <target name="init" depends="init:discover, init:windows, init:defaults">
+        <record name="${basedir}/bootstrap.log"/>
+        <echo>Starting bootstrap build...</echo>
+    </target>
+    
+    <target name="init:discover">
+        <condition property="isWindows">
+            <os family="windows"/>
+        </condition>
+    </target>
+    
+    <target name="init:windows" if="isWindows">
+        <property name="platform.script.ext" value=".bat"/>
+    </target>
+    
+    <target name="init:defaults">
+        <property name="platform.script.ext" value=""/>
+    </target>
+    
+    
+    <!-- ===== -->
+    <!-- Steps -->
+    <!-- ===== -->
+    
+    <target name="bootstrap" depends="clean, stage1, stage2"/>
+    
+    <target name="stage1" depends="init">
+        <build-stage name="bootstrap"/>
+    </target>
+    
+    <target name="stage2" depends="init">
+        <mvn goal="install"/>
+    </target>
+    
+    
+    <!-- ======== -->
+    <!-- Cleaning -->
+    <!-- ======== -->
+    
+    <target name="clean" depends="clean:init, clean:minimal">
+        <delete dir="${basedir}/thirdparty"/>
+        
+        <mvn goal="clean"/>
+    </target>
+    
+    <target name="clean:init" depends="init">
+        <echo>Cleaning...</echo>
+        
+        <mkdir dir="${user.home}/.m2/repository"/>
+    </target>
+    
+    <target name="clean:minimal" depends="clean:init" if="clean-minimal">
+        <echo>Cleaning (minimal)...</echo>
+        
+        <delete>
+            <fileset dir="${user.home}/.m2/repository">
+                <include name="org/apache/geronimo/genesis/**"/>
+            </fileset>
+        </delete>
+    </target>
+
+</project>

Propchange: geronimo/genesis/trunk/bootstrap.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/genesis/trunk/bootstrap.xml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/genesis/trunk/bootstrap.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message