User: user57  
  Date: 01/12/05 19:25:26

  Modified:    .        build.bat build.sh build.xml
  Log:
   o fixed up jboss-website to use new build.xml stuff
   o added generation of dtds.ear (minor hack) to get the /j2ee/dtd/* stuff
     back online.
  
  Revision  Changes    Path
  1.2       +2 -2      website-snapshots/build.bat
  
  Index: build.bat
  ===================================================================
  RCS file: /cvsroot/jboss/website-snapshots/build.bat,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.bat 2001/11/20 00:42:20     1.1
  +++ build.bat 2001/12/06 03:25:26     1.2
  @@ -8,7 +8,7 @@
   REM
   REM  ======================================================================
   REM
  -REM $Id: build.bat,v 1.1 2001/11/20 00:42:20 user57 Exp $
  +REM $Id: build.bat,v 1.2 2001/12/06 03:25:26 user57 Exp $
   REM
   REM Authors:
   REM     Jason Dillon <[EMAIL PROTECTED]>
  @@ -32,7 +32,7 @@
   REM set JAXP_DOM_FACTORY=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
   REM set JAXP_SAX_FACTORY=org.apache.xerces.jaxp.SAXParserFactoryImpl
   
  -set ANT_OPTS=-Djavax.xml.parsers.DocumentBuilderFactory=%JAXP_DOM_FACTORY% 
-Djavax.xml.parsers.SAXParserFactory=%JAXP_SAX_FACTORY%
  +set ANT_OPTS=-Djava.protocol.handler.pkgs=planet57.net.protocol 
-Djavax.xml.parsers.DocumentBuilderFactory=%JAXP_DOM_FACTORY% 
-Djavax.xml.parsers.SAXParserFactory=%JAXP_SAX_FACTORY% -Dbuild.script=build.bat
   
   REM ******************************************************
   REM - "for" loops have been unrolled for compatibility
  
  
  
  1.2       +15 -2     website-snapshots/build.sh
  
  Index: build.sh
  ===================================================================
  RCS file: /cvsroot/jboss/website-snapshots/build.sh,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.sh  2001/11/20 00:42:20     1.1
  +++ build.sh  2001/12/06 03:25:26     1.2
  @@ -8,7 +8,7 @@
   ##                                                                          ##
   ### ====================================================================== ###
   
  -# $Id: build.sh,v 1.1 2001/11/20 00:42:20 user57 Exp $
  +# $Id: build.sh,v 1.2 2001/12/06 03:25:26 user57 Exp $
   
   PROGNAME=`basename $0`
   DIRNAME=`dirname $0`
  @@ -129,12 +129,25 @@
        ANT_OPTS="$ANT_OPTS -Djavax.xml.parsers.SAXParserFactory=$JAXP_SAX_FACTORY"
       fi
   
  +    # need to specify planet57/buildmagic protocol handler package
  +    ANT_OPTS="$ANT_OPTS -Djava.protocol.handler.pkgs=planet57.net.protocol"
  +
  +    # setup some build properties
  +    ANT_OPTS="$ANT_OPTS -Dbuild.script=$0"
  +
       # 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 some stuff for ant
       export ANT ANT_HOME ANT_OPTS
  -    exec $ANT $ANT_OPTIONS "$@"
  +
  +    # execute in debug mode, or simply execute
  +    if [ "x$ANT_DEBUG" != "x" ]; then
  +     /bin/sh -x $ANT $ANT_OPTIONS "$@"
  +    else
  +     exec $ANT $ANT_OPTIONS "$@"
  +    fi
   }
   
   ##
  
  
  
  1.3       +111 -284  website-snapshots/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /cvsroot/jboss/website-snapshots/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml 2001/11/21 22:42:35     1.2
  +++ build.xml 2001/12/06 03:25:26     1.3
  @@ -1,5 +1,7 @@
   <?xml version="1.0" encoding="UTF-8"?>
  -<!DOCTYPE project>
  +<!DOCTYPE project [
  +  <!ENTITY buildmagic SYSTEM "resource://planet57/tools/buildmagic/common.xml">
  +]>
   
   <!-- ====================================================================== -->
   <!--                                                                        -->
  @@ -10,111 +12,34 @@
   <!--                                                                        -->
   <!-- ====================================================================== -->
   
  -<!-- $Id: build.xml,v 1.2 2001/11/21 22:42:35 user57 Exp $ -->
  +<!-- $Id: build.xml,v 1.3 2001/12/06 03:25:26 user57 Exp $ -->
   
   <project default="main" name="JBoss Website/Snapshots">
   
     <!-- ================================================================== -->
  -  <!-- Initialization                                                     -->
  +  <!-- Setup                                                              -->
     <!-- ================================================================== -->
   
  -  <!-- Load Buildmagic extention tasks. -->
  -  <taskdef resource="planet57/tools/buildmagic/task/autoload.properties"/>
  -  <taskdef name="property" classname="planet57.tools.buildmagic.task.Property"/>
  -
  -  <!-- Initialize the build system. -->
  -  <target name="init" unless="init.disable">
  -    <!-- Perform any setup required if we are a child of another build -->
  -    <call target="_init-child"/>
  -
  -    <!-- Setup the basic project roots. -->
  -    <path id="project.root"><pathelement location=".."/></path>
  -    <property name="project.root" refid="project.root"/> 
  -    <property name="project.build" value="${project.root}/build"/>
  -  
  -    <!-- Include user and project property overrides. -->
  -    <property file="${user.home}/.buildmagic.properties"/>
  -    <property file="${user.home}/.ant.properties"/>
  -
  -    <!-- Setup the project environment. -->
  -    <property file="${project.build}/local.properties"/>
  -    <property name="project.tools" value="${project.root}/tools"/>
  -    <property name="project.thirdparty" value="${project.root}/thirdparty"/>
  -
  -    <!-- Setup the module environment. -->
  -    <property name="module.root" value="${basedir}"/>
  -    <available file="${module.root}/etc/local.properties-example"
  -            property="init.have-local-properties"/>
  -    <call target="_init-local-properties"/>
  -    <property file="${module.root}/local.properties"/>
  -    <property name="module.source" value="${module.root}/src"/>
  -    <property name="module.output" value="${module.root}/output"/>
  -    <property name="module.tools" value="${module.root}/tools"/>
  -    <property name="module.thirdparty" value="${module.root}/thirdparty"/>
  -
  -    <!-- Setup the build.log -->
  -    <call target="_init-buildlog"/>
  -
  -    <!-- Load common properties -->
  -    <property resource="planet57/tools/buildmagic/common.properties"/>
  -
  -    <!-- Setup the build timestamp & build identifer properties -->
  -    <tstamp>
  -      <format property="build.number" pattern="yyyyMMddHHmm"/>
  -    </tstamp>
  -    <property name="build.id" value="${build.number}"/>
  -
  -    <!-- Invoke the configure task -->
  -    <call target="_configure"/>
  -
  -    <!-- Late bind properties & install filters -->
  -    <resolver force="${buildmagic.resolveproperties.force}"/>
  -    <propertyfilter all="${buildmagic.propertyfilter.all}"/>
  -    <!-- Show some information -->
  -    <call target="_init-show-environment"/>
  +  <!--
  +     | Include the common Buildmagic elements.
  +     |
  +     | This defines several different targets, properties and paths.
  +     | It also sets up the basic extention tasks amoung other things.
  +   -->
   
  -    <!-- Finish up -->
  -    <property name="init.disable" value="true"/>
  -  </target>
  +  &buildmagic;
   
  -  <!-- Perform any setup required if we are a child of another build -->
  -  <target name="_init-child" if="init.have-parent">
  -    <!-- Disable the build.log, our parent will catch it -->
  -    <property name="init-buildlog.disable" value="true"/>
  -  </target>
   
  -  <!-- Install the local.properties example if it is there -->
  -  <target name="_init-local-properties" if="init.have-local-properties">
  -    <!-- Setup the local.properties file as needed -->
  -    <copy file="${module.root}/etc/local.properties-example"
  -          tofile="${module.root}/local.properties" filtering="yes"/>
  -    <property file="${module.root}/local.properties"/>
  -  </target>
  +  <!-- ================================================================== -->
  +  <!-- Initialization                                                     -->
  +  <!-- ================================================================== -->
   
  -  <!-- Initialize the build.log -->
  -  <target name="_init-buildlog" unless="init-buildlog.disable">
  -    <record name="${basedir}/build.log" append="no" loglevel="info"/>
  -    <property name="init-buildlog.disable" value="true"/>
  -  </target>
  +  <!--
  +     | Initialize the build system.  Must depend on '_buildmagic:init'.  
  +     | Other targets should depend on 'init' or things will mysteriously fail.
  +   -->
   
  -  <!-- Show the running environment if -Dinit.verbose=true -->
  -  <target name="_init-show-environment" if="init.verbose">
  -    <echo><![CDATA[
  -project.root:    ${project.root}
  -module.root:     ${module.root}
  -user.home:       ${user.home}
  -build.compiler:  ${build.compiler}
  -java.home:       ${java.home}
  -java.class.path: ${java.class.path}
  -java.version:    ${java.version}
  -java.vendor:     ${java.vendor}
  -java.vm.version: ${java.vm.version}
  -java.vm.name:    ${java.vm.name}
  -java.vm.info:    ${java.vm.info}
  -os.name:         ${os.name}
  -os.arch:         ${os.arch}
  -os.version:      ${os.version}
  -]]></echo>
  +  <target name="init" unless="init.disable" depends="_buildmagic:init">
     </target>
   
   
  @@ -123,35 +48,26 @@
     <!-- ================================================================== -->
   
     <!--
  -     | Configure the build system.
  +     | Configure the build system.  
        |
  -     | Configuration elements should be placed in the appropriate 
  -     | _configure-* targets.
  +     | This target is invoked by the Buildmagic initialization logic and 
  +     | should contain module specific configuration elements.
      -->
  +
  +  <target name="configure" unless="configure.disable">
   
  -  <target name="_configure" unless="configure.disable">
  -    <!-- Module name(s) & version -->
  +    <!-- =================== -->
  +    <!-- Basic Configuration -->
  +    <!-- =================== -->
  +
       <property name="module.name" value="website"/>
       <property name="module.Name" value="JBoss Website Snapshots"/>
       <property name="module.version" value="DEV"/>
  -
  -    <!-- Invoke the rest of the configuration targets -->
  -    <call target="_configure-tools"/>
  -    <call target="_configure-libraries"/>
  -    <call target="_configure-modules"/>
  -    <call target="_configure-tasks"/>
   
  -    <!-- Load common task properties -->
  -    <property resource="planet57/tools/buildmagic/task.properties"/>
  -  </target>
  +    <!-- ========= -->
  +    <!-- Libraries -->
  +    <!-- ========= -->
   
  -  <!-- Configure the thirdparty tools required to build this module. -->
  -  <target name="_configure-tools" unless="configure-tools.disable">
  -    <!-- No non-standard tools are required for this module. -->
  -  </target>
  -
  -  <!-- Configure the thirdparty libraries required by this module. -->
  -  <target name="_configure-libraries" unless="configure-libraries.disable">
       <!-- JUnit -->
       <property name="junit.junit.root" value="${project.thirdparty}/junit/junit"/>
       <property name="junit.junit.lib" value="${junit.junit.root}/lib"/>
  @@ -162,17 +78,19 @@
       <!-- The combined library classpath -->
       <path id="library.classpath">
       </path>
  -  </target>
   
  -  <!-- Configure the external modules which this module depends on. -->
  -  <target name="_configure-modules" unless="configure-modules.disable">
  +    <!-- ======= -->
  +    <!-- Modules -->
  +    <!-- ======= -->
  +
       <!-- The combined dependent module classpath -->
       <path id="dependentmodule.classpath">
       </path>
  -  </target>
   
  -  <!-- Configure the tasks used by this module. -->
  -  <target name="_configure-tasks" unless="configure-tasks.disable">
  +    <!-- ===== -->
  +    <!-- Tasks -->
  +    <!-- ===== -->
  +
       <!-- Where source files live -->
       <property name="source.metadata" value="${module.source}/metadata"/>
   
  @@ -181,6 +99,7 @@
       <property name="build.snapshots" value="${module.output}/snapshots"/>
       <property name="build.snapshots.tmp" value="${build.snapshots}/tmp"/>
       <property name="build.lib" value="${module.output}/lib"/>
  +    <property name="build.dtd" value="${module.output}/dtd"/>
   
       <!-- Install/Release structure -->
       <property name="install.id" value="${module.name}-${module.version}"/>
  @@ -244,7 +163,8 @@
          description="Compile all source files."
          depends="init,
                      compile-metadata,
  -                   compile-snapshots"/>
  +                   compile-snapshots,
  +                   compile-dtds"/>
   
     <!-- Compile metadata -->
     <target name="compile-metadata" depends="init">
  @@ -263,10 +183,10 @@
       <mkdir dir="${build.snapshots.tmp}"/>
       <echo>Exporting CVS modules for snaphots...</echo>
   
  +    <!-- Make sure there is an entry for this cvsroot -->
  +    <cvspass cvsroot="${snapshot.cvsroot}" password=""/>
   
  -  <!-- Make sure there is an entry for this cvsroot -->
  -    
  -  <cvspass cvsroot="${snapshot.cvsroot}" password=""/>
  +    <!-- Export the modules -->
       <cvs cvsroot="${snapshot.cvsroot}"
         command="-Q -r -f -z3 export"
         date="TODAY" 
  @@ -309,7 +229,7 @@
   
       <!-- build jboss-mq.zip -->
   
  -      <zip zipfile="${build.snapshots}/jboss-mq.zip">
  +    <zip zipfile="${build.snapshots}/jboss-mq.zip">
         <fileset dir="${build.snapshots.tmp}">
           <include name="jboss-mq/**"/>
         </fileset>
  @@ -359,6 +279,19 @@
          zipfile="${build.snapshots}/jboss-plugins.tgz"/>
     </target>
   
  +  <!-- Extract the dtd's from jboss-all/server module -->
  +
  +  <target name="compile-dtds"
  +       depends="compile-snapshots">
  +    <mkdir dir="${build.dtd}"/>
  +    <copy todir="${build.dtd}" filtering="no">
  +      <fileset 
dir="${build.snapshots.tmp}/jboss-all/server/src/resources/org/jboss/metadata">
  +        <include name="*.dtd"/>
  +      </fileset>
  +    </copy>
  +  </target>
  +
  +
     <!-- ================================================================== -->
     <!-- Archives                                                           -->
     <!-- ================================================================== -->
  @@ -383,6 +316,20 @@
           <include name="snapshots.war"/>
         </fileset>
       </ear>
  +
  +    <war warfile="${build.lib}/dtds.war"
  +      webxml="${build.metadata}/dtds-web.xml">
  +      <fileset dir="${build.dtd}">
  +        <include name="*.dtd"/>
  +      </fileset>
  +    </war>
  +
  +    <ear earfile="${build.lib}/dtds.ear"
  +      appxml="${build.metadata}/dtds-application.xml">
  +      <fileset dir="${build.lib}">
  +        <include name="dtds.war"/>
  +      </fileset>
  +    </ear>
     </target>
   
   
  @@ -401,187 +348,67 @@
   
   
     <!-- ================================================================== -->
  -  <!-- Install                                                            -->
  +  <!-- Install & Release                                                  -->
     <!-- ================================================================== -->
   
  -  <target name="install" depends="all">
  -    <!-- Copy the output directory to the install directory -->
  -    <mkdir dir="${install.root}"/>
  -    <copy todir="${install.root}" filtering="no">
  -      <fileset dir="${module.output}">
  -         <include name="**/*"/>
  -         <exclude name="${install.id}/**"/>
  -      </fileset>
  -    </copy>
  -  </target>
  +  <target name="install" 
  +       description="Install the structure for a release."
  +       depends="all, _buildmagic:install:default"/>
   
  +  <target name="release" depends="install"/>
   
  -  <!-- ================================================================== -->
  -  <!-- Release                                                            -->
  -  <!-- ================================================================== -->
  +  <target name="release-zip" 
  +       description="Builds a ZIP distribution."
  +       depends="release, _buildmagic:release:zip"/>
   
  -  <!-- 
  -     | Builds a release distribution.
  -   -->
  +  <target name="release-tar" 
  +       description="Builds a TAR distribution."
  +       depends="release, _buildmagic:release:tar"/>
   
  -  <target name="release" depends="install">
  -    <!-- install handles most of the work -->
  -  </target>
  -
  -  <target name="release-zip" depends="release"
  -       description="Builds a ZIP release distribution.">
  -    <zip zipfile="${module.output}/${release.id}.zip">
  -      <fileset dir="${module.output}">
  -        <include name="${release.id}/**"/>
  -      </fileset>
  -    </zip>
  -  </target>
  -
  -  <target name="release-tar" depends="release"
  -       description="Builds a TAR release distribution.">
  -    <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
  -      basedir="${module.output}"
  -      includes="${release.id}/**">
  -    </tar>
  -  </target>
  -
  -  <target name="release-tgz" depends="release-tar"
  -       description="Builds a TAR-GZIP release distribution.">
  -    <gzip src="${module.output}/${release.id}.tar"
  -       zipfile="${module.output}/${release.id}.tgz"/>
  -  </target>
  +  <target name="release-tgz" 
  +       description="Builds a TAR-GZ distribution."
  +       depends="release, _buildmagic:release:tgz"/>
   
  -  <target name="release-all" depends="release-zip, release-tgz"
  -       description="Builds a distribution for each archive type."/>
  +  <target name="release-all"
  +       description="Builds a distribution for each archive type."
  +       depends="release-zip, release-tgz"/>
   
   
     <!-- ================================================================== -->
  -  <!-- Tests                                                              -->
  -  <!-- ================================================================== -->
  -
  -  <!--
  -     | Run all tests.
  -   -->
  -
  -  <target name="tests" depends="init, tests-junit, tests-reports" 
  -       description="Execute all tests.">
  -  </target>
  -
  -  <!--
  -     | Run JUnit tests.
  -   -->
  -
  -  <target name="tests-junit" depends="jars">
  -    <mkdir dir="${build.reports}"/>
  -    <junit dir="${module.output}"
  -        printsummary="${junit.printsummary}" 
  -        haltonerror="${junit.haltonerror}" 
  -        haltonfailure="${junit.haltonfailure}" 
  -        fork="${junit.fork}"
  -        timeout="${junit.timeout}"
  -        jvm="${junit.jvm}">
  -
  -      <jvmarg value="${junit.jvm.options}"/>
  -
  -      <classpath>
  -        <pathelement location="${build.classes}"/>
  -        <path refid="javac.classpath"/>
  -      </classpath>
  -
  -      <formatter type="${junit.formatter.type}"
  -              usefile="${junit.formatter.usefile}"/>
  -
  -      <batchtest todir="${build.reports}"
  -              haltonerror="${junit.batchtest.haltonerror}" 
  -              haltonfailure="${junit.batchtest.haltonfailure}" 
  -              fork="${junit.batchtest.fork}">
  -
  -        <fileset dir="${build.classes}">
  -          <include name="**/*TestCase.class"/>
  -          <include name="**/*TestSuite.class"/>
  -        </fileset>
  -      </batchtest>
  -    </junit>
  -  </target>
  -
  -  <target name="reports" depends="tests-reports" 
  -       description="Generates all reports."/>
  -
  -  <target name="tests-reports" depends="tests-reports-html"/>
  -
  -  <target name="tests-reports-html" depends="compile">
  -    <mkdir dir="${build.reports}/html"/>
  -
  -    <junitreport todir="${build.reports}">
  -      <fileset dir="${build.reports}">
  -        <include name="TEST-*.xml"/>
  -      </fileset>
  -      <report format="frames" todir="${build.reports}/html"/>
  -    </junitreport>
  -  </target>
  -
  -
  -  <!-- ================================================================== -->
     <!-- Cleaning                                                           -->
     <!-- ================================================================== -->
   
     <!-- Clean up all build output -->
  -  <target name="clean" depends="init"
  -       description="Cleans up most generated files.">
  -    <delete dir="${module.output}"/>
  +  <target name="clean" 
  +       description="Cleans up most generated files."
  +       depends="_buildmagic:clean">
     </target>
   
     <!-- Clean up all generated files -->
  -  <target name="clobber" depends="clean"
  -       description="Cleans up all generated files.">
  -    <delete file="${module.root}/local.properties"/>
  -    <delete file="${module.root}/build.log"/>
  -  </target>
  -
  -
  -  <!-- ================================================================== -->
  -  <!-- Workspace                                                          -->
  -  <!-- ================================================================== -->
  -
  -  <target name="update-project" depends="init">
  -    <echo>Updating project workspace...</echo>
  -    <cvs command="update -d" dest="${project.root}"/>
  -  </target>
  -
  -  <target name="update-module" depends="init">
  -    <echo>Updating module workspace...</echo>
  -    <cvs command="update -d" dest="${module.root}"/>
  +  <target name="clobber" 
  +       description="Cleans up all generated files."
  +       depends="_buildmagic:clobber, clean">
     </target>
   
   
     <!-- ================================================================== -->
  -  <!-- Help                                                               -->
  -  <!-- ================================================================== -->
  -
  -  <target name="help" depends="init">
  -    <projecthelp taskname="help">
  -      <header><![CDATA[
  -  The ${module.Name} module.
  -]]></header>
  -      <footer><![CDATA[
  -    -projecthelp for all targets
  -    -help for full options
  -]]></footer>
  -    </projecthelp>
  -  </target>
  -
  -
  -  <!-- ================================================================== -->
     <!-- Misc.                                                              -->
     <!-- ================================================================== -->
   
  -  <target name="main" depends="most"
  -       description="Executes the default target (most)."/>
  +  <target name="main"
  +       description="Executes the default target (most)."
  +       depends="most"/>
       
  -  <target name="all" depends="jars, docs"
  -       description="Builds everything."/>
  -
  -  <target name="most" depends="jars"
  -       description="Builds almost everything."/>
  +  <target name="all"
  +       description="Builds everything."
  +       depends="jars, docs"/>
  +
  +  <target name="most" 
  +       description="Builds almost everything."
  +       depends="jars"/>
  +
  +  <target name="help" 
  +          description="Show this help message."
  +       depends="_buildmagic:help:standard"/>
   
   </project>
  
  
  

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

Reply via email to