User: user57 Date: 01/07/25 21:09:11 Modified: . build.xml Added: . build config.xml Log: o initial project control files Revision Changes Path 1.2 +318 -0 build/build.xml Index: build.xml =================================================================== RCS file: /cvsroot/jboss/build/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- build.xml 2001/07/26 03:32:41 1.1 +++ build.xml 2001/07/26 04:09:11 1.2 @@ -0,0 +1,318 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE project [ <!ENTITY config SYSTEM "file:./config.xml"> ]> + +<!-- ====================================================================== --> +<!-- --> +<!-- JBoss, the OpenSource EJB server --> +<!-- --> +<!-- Distributable under LGPL license. --> +<!-- See terms of license at http://www.gnu.org. --> +<!-- --> +<!-- ====================================================================== --> +<!-- --> +<!-- Configuration Files (in order of precedence): --> +<!-- --> +<!-- ${project.config}/build.xml* (this file) --> +<!-- ${project.config}/override.properties --> +<!-- ${user.home}/.buildmagic.properties --> +<!-- ${user.home}/.ant.properties --> +<!-- ${project.config}/local.properties --> +<!-- ${project.config}/config.properties --> +<!-- ${project.config}/config.xml* --> +<!-- --> +<!-- * Required --> +<!-- --> +<!-- ====================================================================== --> + +<!-- $Id: build.xml,v 1.2 2001/07/26 04:09:11 user57 Exp $ --> + +<project name="jboss" default="main" basedir=".."> + + <!-- ================================================================== --> + <!-- Basic project configuration --> + <!-- ================================================================== --> + + <!-- Define ${project.root} to equal ${basedir} --> + <property name="project.root" value="${basedir}"/> + + <!-- Define ${project.config} to equal ${basedir} --> + <property name="project.config" value="${basedir}/build"/> + + <!-- Include project & user-global property overrides --> + <property file="${project.config}/override.properties"/> + <property file="${user.home}/.buildmagic.properties"/> + <property file="${user.home}/.ant.properties"/> + + <!-- Specify where the root directory where build output will be placed --> + <property name="project.output" value="${project.config}/output"/> + + <!-- Specify where released files will be placed --> + <property name="project.build" value="${project.output}"/> + + <!-- Specify where released files will be placed --> + <property name="project.release" value="${project.output}/release"/> + + <!-- Project support directories --> + <property name="tools.root" value="${project.root}/tools"/> + <property name="thirdparty.root" value="${project.root}/thirdparty"/> + + <!-- Include user local property overrides --> + <property file="${project.config}/local.properties"/> + + <!-- Include config property overrides --> + <property file="${project.config}/config.properties"/> + + <!-- Load project configuration --> + &config; + + + <!-- ================================================================== --> + <!-- Initialize, Configure and Bootstrap the build system --> + <!-- ================================================================== --> + + <!-- Bootstrap all required extensions --> + <target name="bootstrap" depends="bootstrap-init" unless="project-bootstraped-already"> + <!-- Build local Ant extensions (if required) --> + <!-- Mark things as bootstrapped --> + <property name="project-bootstraped-already" value="true"/> + <echo>Using BuildMagic from ${buildmagic.root}</echo> + </target> + + <!-- Fail if the required dependencies are missing --> + <target name="bootstrap-init" depends="bootstrap-check" unless="project-have-bootstrap-dependencies-already"> + <echo>Missing some or all of the required dependencies.</echo> + <fail message="Can not continue."/> + </target> + + <!-- Check for required libraries --> + <target name="bootstrap-check" unless="project-bootstraped-already"> + <!-- BuildMagic --> + <available classname="planet57.tools.buildmagic.task.Taskdef" + classpathref="buildmagic.classpath" + property="project-have-bootstrap-dependencies-already"/> + </target> + + <!-- Configure the project and module build systems --> + <target name="configure" + depends="project-configure, all-configure" + unless="project-configured-already"/> + + <!-- Configure the project build system --> + <target name="project-configure" unless="project-configured-already"> + <!-- Where example files will live --> + <property name="project.examples" value="${project.config}/etc"/> + <!-- The extension for example files --> + <property name="project.examples.extension" value="-example"/> + + <!-- Put the example files in place --> + <copy todir="${project.config}" filtering="yes"> + <fileset dir="${project.examples}/"> + <include name="**/*${project.examples.extension}"/> + </fileset> + <mapper type="glob" from="*${project.examples.extension}" to="*"/> + </copy> + + <!-- Execute project configure hook --> + <antcall target="configure-hook"/> + + <!-- Mark things as configured --> + <property name="project-configured-already" value="true"/> + </target> + + <!-- Disable execution of the configure target --> + <target name="disable-configure"> + <property name="project-configured-already" value="true"/> + </target> + + <!-- Initialize the build system --> + <target name="init" depends="project-configure, bootstrap" unless="project-initialized-already"> + <!-- Setup timestamp properties --> + <tstamp> + <format property="build.number" pattern="yyyyMMddHHmm"/> + </tstamp> + <property name="build.id" value="${build.number}"/> + + <!-- Load a better version of taskdef --> + <taskdef name="installtask" + classname="planet57.tools.buildmagic.task.Taskdef" + classpathref="buildmagic.classpath"/> + + <!-- Load all of the BuildMagic tasks --> + <installtask classpathref="buildmagic.classpath"> + <task resource="planet57/tools/buildmagic/task/autoload.properties"/> + </installtask> + + <!-- Load common BuildMagic properties --> + <property resource="planet57/tools/buildmagic/common.properties" + classpathref="buildmagic.classpath"/> + + <!-- Show some informative fluff --> + <echo>Project root is ${project.root}</echo> + + <!-- Execute project init hook --> + <antcall target="init-hook"/> + + <!-- Resolve all properties & install filters --> + <resolver force="${buildmagic.resolveproperties.force}"/> + <propertyfilter all="${buildmagic.propertyfilter.all}"/> + + <!-- Mark things as initialized --> + <property name="project-initialized-already" value="true"/> + </target> + + <!-- Disable execution of the init target --> + <target name="disable-init"> + <property name="project-initialized-already" value="true"/> + </target> + + + <!-- ================================================================== --> + <!-- Builds a release distribution. --> + <!-- ================================================================== --> + + <target name="release" depends="all-install" + description="Builds a release distribution."> + <property name="release.id" value="${project.name}-${project.version}-${build.id}"/> + <property name="release.prefix" value="${project.name}-${project.version}"/> + <property name="release.jar" value="${project.output}/${release.id}.jar"/> + + <!-- Build a jar for the release --> + <mkdir dir="${project.output}"/> + <jar jarfile="${release.jar}"> + <zipfileset dir="${project.release}" + prefix="${release.prefix}"> + <include name="**"/> + </zipfileset> + </jar> + </target> + + <target name="all-install" depends="init"> + <mkdir dir="${project.release}"/> + <!-- run 'install' on all modules --> + <execmodules root="${project.root}" modules="${modules}" target="install"> + <property name="install.root" value="${project.release}"/> + <property name="install.lib" value="${install.root}/lib"/> + <property name="install.doc" value="${install.root}/doc"/> + <property name="install.example" value="${install.root}/example"/> + <property name="install.bin" value="${install.root}/bin"/> + <property name="install.api" value="${install.doc}/api"/> + <property name="install.module.doc" value="${install.doc}/${module}"/> + <property name="install.module.api" value="${install.api}/${module}"/> + <header message="${executemodules.header}"/> + <footer message="${executemodules.footer}"/> + </execmodules> + </target> + + + <!-- ================================================================== --> + <!-- Module Pass-through Targets --> + <!-- ================================================================== --> + + <target name="all-configure" depends="init"> + <!-- run 'configure' on all modules --> + <execmodules root="${project.root}" modules="${modules}" target="configure"> + <header message="${executemodules.header}"/> + <footer message="${executemodules.footer}"/> + </execmodules> + </target> + + <target name="all-compile" depends="init"> + <!-- run 'compile' on all modules --> + <execmodules root="${project.root}" modules="${modules}" target="compile"> + <header message="${executemodules.header}"/> + <footer message="${executemodules.footer}"/> + </execmodules> + </target> + + <target name="all-docs" depends="init"> + <!-- run 'docs' on all modules --> + <execmodules root="${project.root}" modules="${modules}" target="docs"> + <header message="${executemodules.header}"/> + <footer message="${executemodules.footer}"/> + </execmodules> + </target> + + <target name="all-jars" depends="init"> + <!-- run 'jars' on all modules --> + <execmodules root="${project.root}" modules="${modules}" target="jars"> + <header message="${executemodules.header}"/> + <footer message="${executemodules.footer}"/> + </execmodules> + </target> + + <target name="all-tests" depends="init"> + <!-- run 'tests' on all modules --> + <execmodules root="${project.root}" modules="${modules}" target="tests"> + <header message="${executemodules.header}"/> + <footer message="${executemodules.footer}"/> + </execmodules> + </target> + + <target name="all-release" depends="init"> + <!-- run 'release' on all modules --> + <execmodules root="${project.root}" modules="${modules}" target="release"> + <header message="${executemodules.header}"/> + <footer message="${executemodules.footer}"/> + </execmodules> + </target> + + + <!-- ================================================================== --> + <!-- Cleans up generated stuff --> + <!-- ================================================================== --> + + <!-- Clean up all build output --> + <target name="clean" depends="init" + description="Cleans up most generated files."> + + <!-- run 'clean' on all modules --> + <execmodules root="${project.root}" modules="${modules}" target="clean"> + <header message="${executemodules.header}"/> + <footer message="${executemodules.footer}"/> + </execmodules> + + <delete dir="${project.build}"/> + <delete dir="${project.release}"/> + <delete dir="${project.output}"/> + </target> + + <!-- Clean up all generated files --> + <target name="clobber" depends="disable-configure, clean" + description="Cleans up all generated files."> + <!-- Clean up configure generated files --> + <delete file="${project.config}/local.properties" quiet="true"/> + + <!-- run 'clobber' on all modules --> + <execmodules root="${project.root}" modules="${modules}" target="clobber"> + <header message="${executemodules.header}"/> + <footer message="${executemodules.footer}"/> + </execmodules> + </target> + + + <!-- ================================================================== --> + <!-- Other Targets --> + <!-- ================================================================== --> + + <target name="main" depends="install" + description="Executes the default target (install)."/> + + <target name="all" depends="release" + description="Builds everything."/> + + <target name="compile" depends="all-compile" + description="Compile all modules."/> + + <target name="install" depends="all-install" + description="Install all modules."/> + + <target name="docs" depends="all-docs" + description="Build all documentation."/> + + <target name="jars" depends="all-jars" + description="Builds all jar files."/> + + <target name="tests" depends="all-tests" + description="Execute all tests."/> + +</project> 1.1 build/build Index: build =================================================================== #!/bin/sh ### ====================================================================== ### ## ## ## Copyright (c) 1998-2000 by Jason Dillon <[EMAIL PROTECTED]> ## ## ## ## This file is part of Buildmagic. ## ## ## ## This library is free software; you can redistribute it and/or modify ## ## it under the terms of the GNU Lesser General Public License as ## ## published by the Free Software Foundation; either version 2 of the ## ## License, or (at your option) any later version. ## ## ## ## This library is distributed in the hope that it will be useful, but ## ## WITHOUT ANY WARRANTY; without even the implied warranty of ## ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## ## Lesser General Public License for more details. ## ## ## ### ====================================================================== ### ## ## ## This is the main entry point for the build system. ## ## Users should be sure to execute this file rather than 'ant' to ensure ## ## the correct version is being used with the correct configuration. ## ## ## ### ====================================================================== ### # $Id: build,v 1.1 2001/07/26 04:09:11 user57 Exp $ PROGNAME=`basename $0` DIRNAME=`dirname $0` GREP="grep" # the default search path for ant ANT_SEARCH_PATH="../tools/apache/ant ../tools/ant ./tools/apache/ant ./tools/ant ./ant" # the default build file name ANT_BUILD_FILE="build.xml" # the default arguments ANT_OPTIONS="-find $ANT_BUILD_FILE" # the required version of Ant ANT_VERSION="1.3" # # Helper to complain. # die() { echo "${PROGNAME}: $*" exit 1 } # # Helper to source a file if it exists. # maybe_source() { for file in $*; do if [ -f "$file" ]; then . $file fi done } # # Main function. # main() { # if there is a build config file. then source it maybe_source "$DIRNAME/build.conf" "$HOME/.build.conf" # try our best to find ANT if [ "x$ANT" = "x" ]; then if [ "x$ANT_HOME" = "x" ]; then search="$ANT_SEARCH_PATH" else search="$ANT_HOME" fi found="" for d in $search; do ANT_HOME="$d" ANT="$d/bin/ant" if [ -x "$ANT" ]; then # found one found="true" break fi done # complain if we did not find anything if [ "$found" != "true" ]; then die "Could not locate Ant; check \$ANT or \$ANT_HOME." fi fi # make sure we have one if [ ! -x "$ANT" ]; then die "Ant file is not executable: $ANT" fi # perhaps check the version if [ "x$ANT_VERSION_CHECK" != "x" ]; then result="`$ANT -version 2>&1 | $GREP $ANT_VERSION`x" if [ "$result" = "x" ]; then die "Ant version $ANT_VERSION is required to build." fi fi export ANT exec $ANT $ANT_OPTIONS "$@" } ## ## Bootstrap ## main "$@" 1.1 build/config.xml Index: config.xml =================================================================== <!-- ====================================================================== --> <!-- --> <!-- JBoss, the OpenSource EJB server --> <!-- --> <!-- Distributable under LGPL license. --> <!-- See terms of license at http://www.gnu.org. --> <!-- --> <!-- ====================================================================== --> <!-- --> <!-- Project configuration. --> <!-- --> <!-- Define configuration elements that are used by the project build --> <!-- system here. --> <!-- --> <!-- ====================================================================== --> <!-- $Id: config.xml,v 1.1 2001/07/26 04:09:11 user57 Exp $ --> <!-- ================================================================== --> <!-- Project Setup --> <!-- ================================================================== --> <!-- Project name(s) & version --> <property name="project.name" value="${ant.project.name}"/> <property name="project.Name" value="JBoss"/> <property name="project.version" value="2.5alpha"/> <!-- ================================================================== --> <!-- Tool Setup --> <!-- ================================================================== --> <!-- BuildMagic --> <property name="buildmagic.root" value="${tools.root}/planet57/buildmagic"/> <property name="buildmagic.lib" value="${buildmagic.root}/lib"/> <path id="buildmagic.classpath"> <fileset dir="${buildmagic.lib}"> <include name="**/*.jar"/> </fileset> </path> <!-- ================================================================== --> <!-- Task Setup --> <!-- ================================================================== --> <property name="executemodules.header" value=" ====> Executing ${target} in module '${module}' ..."/> <property name="executemodules.footer" value=" <==== Finished with ${target} in module '${module}'."/> <!-- ================================================================== --> <!-- Modules Setup --> <!-- ================================================================== --> <!-- This is the list of modules --> <property name="modules" value="server"/> <!-- ================================================================== --> <!-- Initialization & Configure Hooks --> <!-- ================================================================== --> <!-- Executed at the end of the 'configure' target --> <target name="configure-hook"> <!-- Execute custom configuration tasks here. --> </target> <!-- Executed at the end of the 'init' target --> <target name="init-hook"> <!-- Execute custom initialization tasks here. --> </target> _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
