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/08/23 03:54:40 UTC
svn commit: r433827 - in /geronimo/trunk: BUILDING.txt bootstrap
bootstrap.bat bootstrap.xml
Author: jdillon
Date: Tue Aug 22 18:54:39 2006
New Revision: 433827
URL: http://svn.apache.org/viewvc?rev=433827&view=rev
Log:
Changed the bootstrapping to be handled by Ant for cross platform compatibility
Added:
geronimo/trunk/bootstrap.bat (with props)
geronimo/trunk/bootstrap.xml (with props)
Modified:
geronimo/trunk/BUILDING.txt
geronimo/trunk/bootstrap
Modified: geronimo/trunk/BUILDING.txt
URL: http://svn.apache.org/viewvc/geronimo/trunk/BUILDING.txt?rev=433827&r1=433826&r2=433827&view=diff
==============================================================================
--- geronimo/trunk/BUILDING.txt (original)
+++ geronimo/trunk/BUILDING.txt Tue Aug 22 18:54:39 2006
@@ -6,6 +6,7 @@
* J2SE SDK 1.4.2+ (http://java.sun.com/j2se/1.4.2)
* Maven 2.0.4+ (http://maven.apache.org)
+ * Ant 1.6.5+ (http://ant.apache.org) - Used only to bootstrap
NOTE: If you use JDK 1.5 you may run into unexpected errors, so stick to 1.4.
@@ -21,11 +22,11 @@
clean your local Maven 2 repository, download some sources and build them
and kick off the Geronimo build.
+You will need Ant installed and available in the search path of your shell.
+
To start the bootstrap build simply:
./bootstrap
-
-NOTE: Windows users will need Cygwin to execute this script.
The end result will be a set of functional distributions in m2-assemblies/*/target
which you can unpack and startup, as in:
Modified: geronimo/trunk/bootstrap
URL: http://svn.apache.org/viewvc/geronimo/trunk/bootstrap?rev=433827&r1=433826&r2=433827&view=diff
==============================================================================
--- geronimo/trunk/bootstrap (original)
+++ geronimo/trunk/bootstrap Tue Aug 22 18:54:39 2006
@@ -1,140 +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
-}
-
-now() {
- date +'%H:%M:%S %Z %Y'
-}
-
-begin() {
- warn "Starting bootstrap build..."
-}
-
-abort() {
- die "Aborted ($startdate to `now`)"
-}
-
-complete() {
- if [ "$1" == "0" ]; then
- warn "Completed ($startdate to `now`)"
- else
- die "Failed ($startdate to `now`)"
- fi
-}
-
-clean() {
- echo "Cleaning..."
-
- if [ "x$BOOTSTRAP_NOCLEAN_REPO" = "x" ]; then
- echo "Deep cleaning ~/.m2/repository"
-
- rm -rf ~/.m2/repository
- else
- echo "Shallow cleaning ~/.m2/repository/org/apache/geronimo"
-
- rm -rf ~/.m2/repository/org/apache/geronimo/modules
- rm -rf ~/.m2/repository/org/apache/geronimo/configs
- rm -rf ~/.m2/repository/org/apache/geronimo/applications
- rm -rf ~/.m2/repository/org/apache/geronimo/assemblies
- rm -rf ~/.m2/repository/org/apache/geronimo/plugins
- fi
-
- rm -rf "$DIRNAME/thirdparty"
-
- for x in `find "$DIRNAME" -name target -type d`; do
- rm -rf "$x"
- done
-
- mvn clean
-}
-
-stage() {
- echo "Starting stage: $1"
-
- mvn -Dstage=$1
-
- if [ "$?" != "0" ]; then
- die "Bootstrap failed in stage $1"
- fi
-}
-
-specs() {
- echo "Building Specs..."
-
- (
- mkdir -p "$DIRNAME/thirdparty"
- cd "$DIRNAME/thirdparty"
-
- svn co http://svn.apache.org/repos/asf/geronimo/specs/trunk specs
- (
- cd specs
- mvn install
-
- if [ "$?" != "0" ]; then
- die "Bootstrap failed building Specs"
- fi
- )
- )
-}
-
-openejb2() {
- echo "Building OpenEJB2..."
-
- (
- mkdir -p "$DIRNAME/thirdparty"
- cd "$DIRNAME/thirdparty"
-
- svn co http://svn.codehaus.org/openejb/trunk/openejb2
- (
- cd openejb2
- mvn -Dmaven.test.skip=true install
-
- if [ "$?" != "0" ]; then
- die "Bootstrap failed building OpenEJB"
- fi
- )
- )
-}
-
-minimal() {
- BOOTSTRAP_NOCLEAN_REPO=true
-
- begin && (
- clean
- mvn
- ) && complete $?
-}
-
-main() {
- startdate=`now`
-
- trap abort STOP KILL INT ABRT
-
- if [ "x$1" != "x" ]; then
- $*
- else
- begin && (
- clean
- specs && \
- stage "bootstrap" && \
- openejb2 && \
- stage "assemble"
- ) && complete $?
- fi
-}
-
-main "$@" | 2>&1 tee bootstrap.log
+ant $BUILD_OPTIONS -f bootstrap.xml "$@"
Added: geronimo/trunk/bootstrap.bat
URL: http://svn.apache.org/viewvc/geronimo/trunk/bootstrap.bat?rev=433827&view=auto
==============================================================================
--- geronimo/trunk/bootstrap.bat (added)
+++ geronimo/trunk/bootstrap.bat Tue Aug 22 18:54:39 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/trunk/bootstrap.bat
------------------------------------------------------------------------------
svn:eol-style = CRLF
Propchange: geronimo/trunk/bootstrap.bat
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: geronimo/trunk/bootstrap.xml
URL: http://svn.apache.org/viewvc/geronimo/trunk/bootstrap.xml?rev=433827&view=auto
==============================================================================
--- geronimo/trunk/bootstrap.xml (added)
+++ geronimo/trunk/bootstrap.xml Tue Aug 22 18:54:39 2006
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Rev$ $Date -->
+
+<project default="bootstrap">
+
+ <macrodef name="build-thirdparty">
+ <attribute name="url"/>
+ <attribute name="name"/>
+ <sequential>
+ <mkdir dir="${basedir}/thirdparty"/>
+
+ <exec executable="svn" dir="${basedir}/thirdparty">
+ <arg value="co"/>
+ <arg value="@{url}"/>
+ <arg value="@{name}"/>
+ </exec>
+
+ <exec executable="mvn" dir="${basedir}/thirdparty/@{name}">
+ <arg value="install"/>
+ </exec>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="build-stage">
+ <attribute name="name"/>
+ <sequential>
+ <exec executable="mvn" dir="${basedir}">
+ <arg value="-Dstage=@{name}"/>
+ <arg value="install"/>
+ </exec>
+ </sequential>
+ </macrodef>
+
+ <target name="init">
+ <record name="${basedir}/bootstrap.log"/>
+ <echo>Starting bootstrap build...</echo>
+ </target>
+
+
+ <!-- ===== -->
+ <!-- Steps -->
+ <!-- ===== -->
+
+ <target name="bootstrap" depends="clean, specs, modules, openejb2, assemble"/>
+
+ <target name="modules" depends="init">
+ <build-stage name="bootstrap"/>
+ </target>
+
+ <target name="assemble" depends="init">
+ <build-stage name="assemble"/>
+ </target>
+
+ <target name="minimal" depends="init">
+ <antcall target="clean">
+ <param name="clean-minimal" value="true"/>
+ </antcall>
+
+ <exec executable="mvn" dir="${basedir}">
+ <arg value="install"/>
+ </exec>
+ </target>
+
+
+ <!-- ======== -->
+ <!-- Cleaning -->
+ <!-- ======== -->
+
+ <target name="clean" depends="clean:init, clean:minimal, clean:full">
+ <delete dir="${basedir}/thirdparty"/>
+
+ <exec executable="mvn">
+ <arg value="clean"/>
+ </exec>
+ </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/modules/**"/>
+ <include name="org/apache/geronimo/configs/**"/>
+ <include name="org/apache/geronimo/applications/**"/>
+ <include name="org/apache/geronimo/assemblies/**"/>
+ <include name="org/apache/geronimo/plugins/**"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="clean:full" depends="clean:init" unless="clean-minimal">
+ <echo>Cleaning (full)...</echo>
+
+ <delete dir="${user.home}/.m2/repository"/>
+ </target>
+
+
+ <!-- ========== -->
+ <!-- Thirdparty -->
+ <!-- ========== -->
+
+ <target name="specs" depends="init">
+ <echo>Building Specs...</echo>
+ <build-thirdparty url="http://svn.apache.org/repos/asf/geronimo/specs/trunk" name="specs"/>
+ </target>
+
+ <target name="openejb2" depends="init">
+ <echo>Building OpenEJB2...</echo>
+ <build-thirdparty url="http://svn.codehaus.org/openejb/trunk/openejb2" name="openejb2"/>
+ </target>
+
+</project>
Propchange: geronimo/trunk/bootstrap.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/trunk/bootstrap.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: geronimo/trunk/bootstrap.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml