User: user57  
  Date: 01/08/30 15:34:32

  Added:       .        build.bat build.sh build.xml
  Log:
   o added build files
  
  Revision  Changes    Path
  1.1                  newsite/build.bat
  
  Index: build.bat
  ===================================================================
  @echo off
  REM  ======================================================================
  REM
  REM  This is the main entry point for the build system.
  REM
  REM  Users should be sure to execute this file rather than 'ant' to ensure
  REM  the correct version is being used with the correct configuration.
  REM
  REM  ======================================================================
  REM
  REM $Id: build.bat,v 1.1 2001/08/30 22:34:32 user57 Exp $
  REM
  REM Authors:
  REM     Jason Dillon <[EMAIL PROTECTED]>
  REM     Sacha Labourey  <[EMAIL PROTECTED]>
  REM
  
  REM ******************************************************
  REM Ignore the users classpath, cause it might mess
  REM things up
  REM ******************************************************
  
  set CLASSPATH=
  
  
  REM ******************************************************
  REM - "for" loops have been unrolled for compatibility
  REM   with some WIN32 systems.
  REM ******************************************************
  
  set NAMES=tools;tools\ant;tools\apache\ant
  set SUBFOLDERS=..;..\..;..\..\..;..\..\..\..
  
  REM ******************************************************
  REM ******************************************************
  
  SET EXECUTED=FALSE
  for %%i in (%NAMES%) do call :subLoop %%i %1 %2 %3 %4 %5 %6
  
  goto :EOF
  
  
  REM ******************************************************
  REM ********* Search for names in the subfolders *********
  REM ******************************************************
  
  :subLoop
  for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%1\bin\ant.bat %2 %3 %4 %5 %6 %7
  
  goto :EOF
  
  
  REM ******************************************************
  REM ************ Test if ANT Batch file exists ***********
  REM ******************************************************
  
  :testIfExists
  if exist %1 call :BatchFound %1 %2 %3 %4 %5 %6 %7 %8
  
  goto :EOF
  
  
  REM ******************************************************
  REM ************** Batch file has been found *************
  REM ******************************************************
  
  :BatchFound
  if (%EXECUTED%)==(FALSE) call :ExecuteBatch %1 %2 %3 %4 %5 %6 %7 %8
  set EXECUTED=TRUE
  
  goto :EOF
  
  REM ******************************************************
  REM ************* Execute Batch file only once ***********
  REM ******************************************************
  
  :ExecuteBatch
  echo Calling %1 %2 %3 %4 %5 %6 %7 %8
  call %1 %2 %3 %4 %5 %6 %7 %8
  
  :end
  
  
  1.1                  newsite/build.sh
  
  Index: build.sh
  ===================================================================
  #!/bin/sh
  ### ====================================================================== ###
  ##                                                                          ##
  ##  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.sh,v 1.1 2001/08/30 22:34:32 user57 Exp $
  
  PROGNAME=`basename $0`
  DIRNAME=`dirname $0`
  GREP="grep"
  ROOT="/"
  
  # the default search path for ant
  ANT_SEARCH_PATH="\
      tools
      tools/ant \
      tools/apache/ant \
      ant"
  
  # the default build file name
  ANT_BUILD_FILE="build.xml"
  
  # the default arguments
  ANT_OPTIONS="-find $ANT_BUILD_FILE"
  
  # the jaxp parser to use
  if [ "x$JAXP" = "x" ]; then
      # Default to crimson
      JAXP="crimson"
  fi
  
  #
  # 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
  }
  
  search() {
      search="$*"
      for d in $search; do
        ANT_HOME="`pwd`/$d"
        ANT="$ANT_HOME/bin/ant"
        if [ -x "$ANT" ]; then
            # found one
            echo $ANT_HOME
            break
        fi
      done
  }
  
  #
  # Main function.
  #
  main() {
      # if there is a build config file. then source it
      maybe_source "$DIRNAME/build.conf" "$HOME/.build.conf"
  
      # try the search path
      ANT_HOME=`search $ANT_SEARCH_PATH`
  
      # try looking up to root
      if [ "x$ANT_HOME" = "x" ]; then
        target="build"
        _cwd=`pwd`
  
        while [ "x$ANT_HOME" = "x" ] && [ "$cwd" != "$ROOT" ]; do
            cd ..
            cwd=`pwd`
            ANT_HOME=`search $ANT_SEARCH_PATH`
        done
  
        # make sure we get back
        cd $_cwd
  
        if [ "$cwd" != "$ROOT" ]; then
            found="true"
        fi
  
        # 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
      ANT=$ANT_HOME/bin/ant
      if [ ! -x "$ANT" ]; then
        die "Ant file is not executable: $ANT"
      fi
  
      # specify the jaxp parser impls to use
      case "$JAXP" in
        crimson)
            JAXP_DOM_FACTORY="org.apache.crimson.jaxp.DocumentBuilderFactoryImpl"
            JAXP_SAX_FACTORY="org.apache.crimson.jaxp.SAXParserFactoryImpl"
            ;;
           
        xerces)
            JAXP_DOM_FACTORY="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"
            JAXP_SAX_FACTORY="org.apache.xerces.jaxp.SAXParserFactoryImpl"
            ;;
      esac
  
      if [ "x$JAXP_DOM_FACTORY" != "x" ]; then
        ANT_OPTS="$ANT_OPTS 
-Djavax.xml.parsers.DocumentBuilderFactory=$JAXP_DOM_FACTORY"
      fi
      if [ "x$JAXP_SAX_FACTORY" != "x" ]; then
        ANT_OPTS="$ANT_OPTS -Djavax.xml.parsers.SAXParserFactory=$JAXP_SAX_FACTORY"
      fi
  
      # change to the directory where the script lives so users are not forced
      # to be in the same directory as build.xml
      cd $DIRNAME
  
      export ANT ANT_HOME ANT_OPTS
      exec $ANT $ANT_OPTIONS "$@"
  }
  
  ##
  ## Bootstrap
  ##
  
  main "$@"
  
  
  
  1.1                  newsite/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE project>
  
  <!-- ====================================================================== -->
  <!--                                                                        -->
  <!--  JBoss, the OpenSource J2EE webOS                                      -->
  <!--                                                                        -->
  <!--  Distributable under LGPL license.                                     -->
  <!--  See terms of license at http://www.gnu.org.                           -->
  <!--                                                                        -->
  <!-- ====================================================================== -->
  
  <!-- $Id: build.xml,v 1.1 2001/08/30 22:34:32 user57 Exp $ -->
  
  <project default="main" name="JBoss/Website">
  
    <!-- ================================================================== -->
    <!-- Initialization                                                     -->
    <!-- ================================================================== -->
  
    <!-- Load Buildmagic extention tasks. -->
    <taskdef name="taskdef" classname="planet57.tools.buildmagic.task.Taskdef"/>
    <taskdef resource="planet57/tools/buildmagic/task/autoload.properties"/>
  
    <!-- Setup the basic project roots. -->
    <path id="project.root"><pathelement location=".."/></path>
    <property name="project.root" refid="project.root"/>
    <property name="control.root" value="${project.root}/build"/>
    
    <!-- Include user and project property overrides. -->
    <property file="${user.home}/.buildmagic.properties"/>
    <property file="${user.home}/.ant.properties"/>
    <property file="${control.root}/local.properties"/>
  
    <!-- Setup the basic environment for a project build module. -->
    <property name="project.output" value="${control.root}/output"/>
    <property name="project.release" value="${project.output}"/>
    <property name="tools.root" value="${project.root}/tools"/>
    <property name="thirdparty.root" value="${project.root}/thirdparty"/>
  
    <!-- Setup the basic environment for a source module. -->
    <property name="module.root" value="${basedir}"/>
    <property name="module.source" value="${module.root}/src"/>
    <property name="module.output" value="${module.root}/output"/>
    <property name="module.build" value="${module.output}"/>
    <property name="module.release" value="${module.output}"/>
    <property file="${module.root}/local.properties"/>
  
    <!-- Initialize the build system. -->
    <target name="init" unless="initialized-already" depends="init-buildlog">
      <tstamp>
        <format property="build.number" pattern="yyyyMMddHHmm"/>
      </tstamp>
      <property name="build.id" value="DEV"/>
  
      <property resource="planet57/tools/buildmagic/common.properties"/>
      <property resource="planet57/tools/buildmagic/task.properties"/>
  
      <moduleinfo/>
      <resolver force="${buildmagic.resolveproperties.force}"/>
      <propertyfilter all="${buildmagic.propertyfilter.all}"/>
      <property name="initialized-already" value="true"/>
    </target>
  
    <target name="init-buildlog" unless="buildlog-disabled">
      <record name="${basedir}/build.log" append="no" loglevel="info"/>
    </target>
  
  
    <!-- ================================================================== -->
    <!-- Module Configuration                                               -->
    <!-- ================================================================== -->
  
    <!-- Module name(s) & version -->
    <property name="module.name" value="website"/>
    <property name="module.Name" value="JBoss Website"/>
    <property name="module.version" value="unspecified"/>
  
  
    <!-- ================================================================== -->
    <!-- Tool Configuration                                                 -->
    <!-- ================================================================== -->
  
    <!-- No non-standard tools are required for this module. -->
  
  
    <!-- ================================================================== -->
    <!-- Library Configuration                                              -->
    <!-- ================================================================== -->
  
    <!-- The combined library classpath -->
    <path id="library.classpath">
    </path>
  
  
    <!-- ================================================================== -->
    <!-- Dependent Module Configuration                                     -->
    <!-- ================================================================== -->
   
    <!-- This module does not depend on any other modules. -->
  
    <!-- The combined depedant module classpath -->
    <path id="dependentmodule.classpath">
    </path>
  
  
    <!-- ================================================================== -->
    <!-- Task Configuration                                                 -->
    <!-- ================================================================== -->
  
    <!-- The combined thirdparty classpath -->
    <path id="thirdparty.classpath">
      <path refid="library.classpath"/>
      <path refid="dependentmodule.classpath"/>
    </path>
  
    <!-- This module is based on Java 1.2 -->
    <property name="javac.target" value="1.2"/>
  
    <!-- classpath and local.classpath must have a value using with a path -->
    <property name="classpath" value=""/>
    <property name="local.classpath" value=""/>
  
    <!-- The classpath required to build classes. -->
    <path id="javac.classpath">
      <pathelement path="${classpath}"/>
      <pathelement path="${local.classpath}"/>
      <path refid="thirdparty.classpath"/>
    </path>
  
    <!-- Packages to include when generating api documentation -->
    <property name="javadoc.packages" value="org.jboss.*"/>
  
    <!-- The classpath required to build javadocs. -->
    <path id="javadoc.classpath">
      <path refid="javac.classpath"/>
    </path>
  
    <!-- Where source files live -->
    <property name="source.metadata" value="${module.source}/metadata"/>
    <property name="source.examples" value="${module.source}/examples"/>
    <property name="source.stylesheets" value="${module.source}/stylesheets"/>
    <property name="source.docs" value="${module.source}/docs"/>
    <property name="source.xdocs" value="${module.source}/xdocs"/>
  
    <!-- Where build generated files will go -->
    <property name="build.metadata" value="${module.build}/metadata"/>
    <property name="build.docs" value="${module.build}/docs"/>
    <property name="build.xdocs" value="${module.build}/xdocs"/>
    <property name="build.stylesheets" value="${module.build}/stylesheets"/>
    <property name="build.html" value="${module.build}/html"/>
    <property name="build.html.fancy" value="${build.html}/fancy"/>
    <property name="build.html.plain" value="${build.html}/plain"/>
    <property name="build.html.printable" value="${build.html}/printable"/>
    <property name="build.pdf" value="${module.build}/pdf"/>
    <property name="build.jars" value="${module.build}/lib"/>
  
    <!-- Where release generated files will go -->
    <property name="release.id" value="${module.name}-${module.version}-${build.id}"/>
    <property name="release.root" value="${module.release}/${release.id}"/>
  
    <property name="release.bin" value="${release.root}/bin"/>
    <property name="release.client" value="${release.root}/client"/>
    <property name="release.conf" value="${release.root}/conf"/>
    <property name="release.conf.default" value="${release.conf}/default"/>
    <property name="release.db" value="${release.root}/db"/>
    <property name="release.deploy" value="${release.root}/deploy"/>
    <property name="release.deploy.lib" value="${release.deploy}/lib"/>
    <property name="release.lib" value="${release.root}/lib"/>
    <property name="release.lib.ext" value="${release.lib}/ext"/>
    <property name="release.log" value="${release.root}/log"/>
    <property name="release.tmp" value="${release.root}/tmp"/>
  
    <!-- Documentation and examples -->
    <property name="release.docs" value="${release.root}/docs"/>
    <property name="release.manual" value="${release.root}/manual"/>
    <property name="release.examples" value="${release.docs}/examples"/>
    <property name="release.api" value="${release.docs}/api"/>
    <property name="release.module.docs" value="${release.docs}/${module.name}"/>
    <property name="release.module.api" value="${release.api}/${module.name}"/>
  
  
    <!-- ================================================================== -->
    <!-- Compile                                                            -->
    <!-- ================================================================== -->
  
    <!-- 
       |  Compile everything.
       |
       |  This target should depend on other compile-* targets for each 
       |  different type of compile that needs to be performed, short of
       |  documentation compiles.
      -->
    <target name="compile" depends="init, compile-docs, compile-metadata"
          description="Compile all source files."/>
  
    <!-- Compile metadata -->
    <target name="compile-metadata" depends="init">
      <mkdir dir="${build.metadata}"/>
      <copy todir="${build.metadata}" filtering="yes">
        <fileset dir="${source.metadata}">
           <include name="**/*"/>
        </fileset>
      </copy>
    </target>
  
    <!-- Compile doc sources & support files -->
    <target name="compile-docs" depends="init">
      <mkdir dir="${build.docs}"/>
      <copy todir="${build.docs}" filtering="no">
        <fileset dir="${source.docs}">
           <include name="**/*"/>
        </fileset>
      </copy>
    </target>
  
  
    <!-- ================================================================== -->
    <!-- Build Jars                                                         -->
    <!-- ================================================================== -->
  
    <!-- Build all jar files. -->
    <target name="jars" depends="compile" description="Builds all jar files.">
      <mkdir dir="${build.jars}"/>
  
      <!-- build the website wars
      <war warfile="${build.jars}/manual.war"
         webxml="${build.metadata}/manual-web.xml">
        <zipfileset prefix="HTML/fancy" dir="${build.html.fancy}"/>
        <zipfileset prefix="HTML/printable" dir="${build.html.printable}"/>
      </war>
      -->
     </target>
  
  
    <!-- ================================================================== -->
    <!-- Build documents                                                    -->
    <!-- ================================================================== -->
  
    <!-- 
       |  Create all generated documenation.
       |
       |  This target should depend on other docs-* targets for each 
       |  different type of docuementation that is to be generated.
     -->
    <target name="docs" depends="init"
          description="Builds the default documentation."/>
  
  
    <!-- ================================================================== -->
    <!-- Builds a release distribution.                                     -->
    <!-- ================================================================== -->
  
    <target name="release" depends="all"
          description="Builds a release distribution.">
      <!-- Copy the static documents (docs) -->
      <mkdir dir="${release.manual}"/>
      <copy todir="${release.manual}" filtering="no">
        <fileset dir="${module.build}">
           <include name="html/**/*"/>
           <include name="pdf/**/*.pdf"/>
        </fileset>
      </copy>
    </target>
  
    <target name="release-archive-prepare" depends="release">
      <mkdir dir="${module.release}"/>
      <property name="release.archive.basename"
              value="${module.release}/${release.id}"/>
    </target>
  
    <target name="release-zip" depends="release-archive-prepare"
          description="Builds a ZIP release distribution.">
      <zip zipfile="${release.archive.basename}.zip">
        <fileset dir="${module.release}">
          <include name="${release.id}/**"/>
        </fileset>
      </zip>
    </target>
  
    <target name="release-tar" depends="release-archive-prepare"
          description="Builds a TAR release distribution.">
      <tar tarfile="${release.archive.basename}.tar" longfile="gnu"
         basedir="${module.release}"
         includes="${release.id}/**">
      </tar>
    </target>
  
    <target name="release-tgz" depends="release-tar"
          description="Builds a TAR-GZIP release distribution.">
      <gzip src="${release.archive.basename}.tar"
          zipfile="${release.archive.basename}.tgz"/>
    </target>
  
    <target name="release-all" depends="release-zip, release-tgz"
          description="Builds a distribution for each archive type."/>
  
  
    <!-- ================================================================== -->
    <!-- Cleans up generated stuff                                          -->
    <!-- ================================================================== -->
  
    <!-- Clean up all build output -->
    <target name="clean" depends="init"
          description="Cleans up most generated files.">
      <delete dir="${module.build}"/>
      <delete dir="${module.release}"/>
      <delete dir="${module.output}"/>
    </target>
  
    <!-- Clean up all generated files -->
    <target name="clobber" depends="clean"
          description="Cleans up all generated files.">
      <delete file="${module.root}/build.log"/>
    </target>
  
  
    <!-- ================================================================== -->
    <!-- Other Targets                                                      -->
    <!-- ================================================================== -->
  
    <target name="help">
      <projecthelp taskname="help">
        <header><![CDATA[
    The ${module.Name} module.
  ]]></header>
        <footer><![CDATA[
      -projecthelp for all targets
      -help for full options
  ]]></footer>
      </projecthelp>
    </target>
  
    <target name="main" depends="most"
          description="Executes the default target (most)."/>
      
    <target name="all" depends="jars"
          description="Builds everything."/>
  
    <target name="most" depends="jars"
          description="Builds almost everything."/>
  
    <target name="min" depends="compile"
          description="Builds a minimal subset."/>
  
    <target name="tests" depends="init"
          description="Execute all tests."/>
  
  </project>
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to