forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/etc build-old.xml
Date Wed, 30 Oct 2002 08:13:04 GMT
jefft       2002/10/30 00:13:04

  Added:       etc      build-old.xml
  Removed:     .        build-old.xml
  Log:
  Move the old build script out of the way
  
  Revision  Changes    Path
  1.1                  xml-forrest/etc/build-old.xml
  
  Index: build-old.xml
  ===================================================================
  <?xml version="1.0"?>
  <?xml-stylesheet type="text/xsl" href="./tools/antipede/resources/stylesheets/build.xsl"?>
  
  <!--<!DOCTYPE project SYSTEM "./tools/antipede/build.dtd" >-->
  <!DOCTYPE project [
    <!-- antipede -->
    <!ENTITY import-antipede  SYSTEM "./tools/antipede/build.xtarget">
  
  ]>
  <project default="interactive" basedir="." name="project build file">
  
  <description>
                     * ===================================== *
                     |   Krysalis Centipede Build System     |
                     * ===================================== *
                                       by
  
                     Nicola Ken Barozzi (nicolaken@apache.org)
                     Marc Johnson (mjohnson@apache.org)
  
  
                     For a simple interactive build, simply
                     run the build script (build.bat or build.sh)
  </description>
  
    <path id="classpath">
      <fileset dir="./lib/endorsed">
        <include name="*.jar"/>
      </fileset>
      <fileset dir="./lib/core">
        <include name="*.jar"/>
      </fileset>
      <fileset dir="./lib/optional">
        <include name="*.jar"/>
      </fileset>
    </path>
  
  
    <!-- =================================================================== -->
    <!-- Targets for this project                                            -->
    <!-- =================================================================== -->
  
    <target name="init" depends="-init">
      <property name="name"                  value="${xgump.module.project.name}"/>
      <property name="packages"              value="${xgump.module.project.packages}"/>
  
      <property name="build.root"            value="${xlayout.build.dir}"/>
      <property name="build.dir"             value="${xlayout.build.dir}"/>
      <property name="resource.dir"          value="${xlayout.source.resources.dir}"/>
      <property name="context.dir"           value="${xlayout.source.documentation.dir}"/>
      <property name="build.docs"            value="${xlayout.build.documentation.dir}"/>
      <property name="build.javadocs"        value="${xlayout.build.documentation.javadocs.dir}"/>
      <property name="build.context"         value="${xlayout.build.work.dir}"/>
      <property name="build.dest"            value="${xlayout.build.classes.dir}"/>
      <property name="build.scratchpad.dest" value="${xlayout.build.scratchpad.classes.dir}"/>
  
      <property name="tools.dir"             value="./tools"/>
      <property name="tools.jar"             value="${java.home}/../lib/tools.jar"/>
      <available file="${tools.jar}"         property="tools.jar.present"/>
  
    </target>
  
  
  
    <target name="run" depends="init">
  
      <antcall target="runforrestrun">
        <param name="getcvsmodule.package"      value="jakarta-poi"/>
        <param name="getcvsmodule.work.dir"     value="${build.dir}/work/forrest/cvsmodule"
/>
        <param name="documentation.source.dir"  value="${build.dir}/work/forrest/cvsmodule/jakarta-poi/src/documentation"/>
        <param name="deploy.username"           value="forrestbot"/>
        <param name="deploy.package-name"       value="jakarta-poi"/>
        <param name="deploy.data.dir"           value="${build.dir}/docs"/>
        <param name="deploy.hostname"           value="krysalis.sourceforge.net"/>
        <param name="deploy.remotedir"          value="/home/groups/k/kr/krysalis/htdocs/poi"/>
      </antcall>
  
    </target>
  
    <target name="runforrestrun" depends="getcvsmodule, prepare-docs, owdocs, deploy"/>
  
    <target name="updateforrestsite" depends="init, docs, deployforrestsite, sendlog"/>
  
    <target name="deployforrestsite" depends="init, docs">
      <antcall target="deploy">
        <param name="deploy.username"     value="forrestbot"/>
        <param name="deploy.package-name" value="xml-forrest"/>
        <param name="deploy.data.dir"     value="${build.dir}/docs"/>
        <param name="deploy.hostname"     value="krysalis.sourceforge.net"/>
        <param name="deploy.remotedir"    value="/home/groups/k/kr/krysalis/htdocs/forrest"/>
      </antcall>
    </target>
  
    <!-- =================================================================== -->
    <!-- Interactive build                                                   -->
    <!-- =================================================================== -->
    <target name="interactive" description="Interactive Build" depends="-init">
      <echo>
      --------------------------------------------------------------
  
            ${xgump.module.project.name} ${xgump.module.project.version.major}.${xgump.module.project.version.minor}
  [${YEAR}]
  
      --------------------------------------------------------------
       Using ${ant.version}
       Build file ${ant.file}
      --------------------------------------------------------------
       These are the most common build targets.
       You can also invoke them directly; see build.xml for more info.
       Builds will be in /build directory, distributions in /dist.
  
       forrest-typical targets:
  
       docs ------------- generates static Forrest website
       webapp ----------- builds webapp (.war) deployable version of Forrest website
       bot.run ---------- runs the forrestbot using the configuration specified in
                          forrestbot.conf.xml
  
       default centipede targets:
  
       compile ---------- compiles the source code
       test ------------- performs the jUnit tests
       jar -------------- create the jar files
       docs ------------- generates the html docs - clean not needed
       javadocs --------- generates the API documentation
       site ------------- generates the html site (docs+reports)
       clean ------------ cleans the build directory
       dist ------------- creates src and bin distributions
       scratchpad ------- build-run scratchpad code
       contrib ---------- build-run contributed code
  
  
      </echo>
      <property name="input.selection" value="docs"/>
      <centipede-user-input name="input.selection">Please select a target </centipede-user-input>
  
      <antcall target="call-cent">
        <param name="cent-name"   value="centipede"/>
        <param name="cent-target" value="splash"/>
      </antcall>
  
      <antcall target="${input.selection}"/>
  
    </target>
  
  
    <!-- ================================== -->
    <!--              Compile               -->
    <!-- ================================== -->
  
    <target  name="compile"   depends="-init"
             description="Compile java source code">
  
      <antcall target="call-cent">
        <param name="cent-name"   value="centipede"/>
        <param name="cent-target" value="compile"/>
      </antcall>
  
    </target>
  
    <!-- ================================== -->
    <!--              jar                   -->
    <!-- ================================== -->
  
    <target  name="jar"   depends="-init"
             description="Make jars">
  
      <antcall target="call-cent">
        <param name="cent-name"   value="centipede"/>
        <param name="cent-target" value="package"/>
      </antcall>
  
    </target>
  
    <!-- ================================== -->
    <!--              Scratchpad               -->
    <!-- ================================== -->
  
    <target  name="scratchpad"   depends="-init"
             description="Execute scratchpad targets">
  
      <ant antfile="${xlayout.source.scratchpad.targets.dir}/scratchpad.xml"/>
  
    </target>
  
    <!-- ================== -->
    <!-- Prepares the docs  -->
    <!-- ================== -->
    <target name="prepare-docs" depends="init, compile">
  
      <property name="centipede.tools.cents.forrest.loglevel" value="ERROR"/>
      <property name="use.skin" value="forrest-site"/>
  
      <property name="documentation.context.dir"  value="${resource.dir}"/>
      <property name="documentation.source.dir"   value="${context.dir}"/>
  
      <echo>Running docs generation from: ${documentation.source.dir}.</echo>
  
      <!-- define filters -->
      <filter token="skin"              value="${use.skin}"/>
      <filter token="link1"             value="apache"/>
      <filter token="link1.href"        value="http://www.apache.org/"/>
      <filter token="link2"             value="xml.apache"/>
      <filter token="link2.href"        value="http://xml.apache.org/"/>
      <!-- the breadcrumb script already generates it, so it needs to be kept blank -->
      <filter token="link3"             value=""/>
      <filter token="link3.href"        value=""/>
      <filter token="group-logo.src"    value="images/group-logo.gif"/>
      <filter token="group-logo.href"   value="http://xml.apache.org/"/>
      <filter token="group-logo.alt"    value="Apache XML logo"/>
      <filter token="project-logo.src"  value="images/project-logo.gif"/>
      <filter token="project-logo.href" value="http://xml.apache.org/forrest/"/>
      <filter token="project-logo.alt"  value="Forrest logo"/>
      <filter token="year" value="2002"/>
      <filter token="vendor" value="Apache Sofware Foundation"/>
  
  
      <mkdir dir="${build.context}"/>
      <mkdir dir="${build.docs}"/>
      <mkdir dir="${build.dir}/work"/>
  
  
      <!-- make filtered copy of XML docs -->
      <copy todir="${build.context}" filtering="on" overwrite="true">
        <fileset dir="${documentation.source.dir}" casesensitive="no">
          <include name="**/*.x*"/>
        </fileset>
      </copy>
  
      <!-- make non filtered copy of images -->
      <copy todir="${build.context}" filtering="off">
        <fileset dir="${documentation.source.dir}" casesensitive="no">
          <exclude name="**/*.x*"/>
        </fileset>
      </copy>
  
      <!-- Copy entity catalog, entities and class files -->
      <copy todir="${build.context}/resources/schema" filtering="on">
        <fileset dir="${resource.dir}/schema"/>
      </copy>
      <mkdir dir="${build.context}/WEB-INF/classes"/>
      <copy todir="${build.context}/WEB-INF/classes">
        <fileset dir="${build.context}/resources/schema">
          <include name="CatalogManager.properties"/>
        </fileset>
        <fileset dir="${build.dest}">
          <include name="**/*.class"/>
        </fileset>
        <fileset dir="${build.scratchpad.dest}">
          <include name="**/*.class"/>
        </fileset>
      </copy>
  
      <!-- Copy Cocoon configuration, sitemap and skin conf -->
      <copy todir="${build.context}" filtering="on">
        <fileset dir="${documentation.context.dir}/conf">
          <include name="sitemap.xmap"/>
          <include name="skinconf.xml"/>
          <include name="cocoon.xconf"/>
          <include name="logkit.xconf"/>
        </fileset>
      </copy>
      <copy todir="${build.context}/WEB-INF/" filtering="on">
        <fileset dir="${documentation.context.dir}/conf">
          <exclude name="sitemap.xmap"/>
        </fileset>
      </copy>
  
      <!-- Copy libraries -->
      <copy todir="${build.context}/library/" filtering="on">
        <fileset dir="${documentation.context.dir}/library">
  
        </fileset>
      </copy>
  
      <!-- Copy skins -->
      <copy todir="${build.context}/skins/" filtering="on">
        <fileset dir="${documentation.context.dir}/skins">
          <exclude name="**/images/**"/>
        </fileset>
      </copy>
      <copy todir="${build.context}/skins/" filtering="off">
        <fileset dir="${documentation.context.dir}/skins">
          <include name="**/images/**"/>
        </fileset>
      </copy>
  
      <!-- Copy the project descriptors -->
      <copy todir="${build.context}" filtering="on">
        <fileset dir=".">
          <include name="*.*ml"/>
        </fileset>
      </copy>
  
    </target>
  
    <!-- =================================================================== -->
    <!-- Prepares the docs to create a .war                                  -->
    <!-- =================================================================== -->
    <target name="webapp" depends="init, prepare-docs">
      <delete file="${build.context}/cocoon.xconf"/>
      <war warfile="${build.dir}/${name}.war"
           webxml="${build.context}/WEB-INF/web.xml"
           compress="true">
  
        <fileset dir="${build.context}">
          <exclude name="WEB-INF/web.xml"/>
        </fileset>
        <lib dir="lib/endorsed"/>
        <lib dir="lib/core"/>
        <lib dir="lib/optional"/>
        <lib dir="src/scratchpad/lib"/>
        <classes dir="${build.context}/WEB-INF/classes/"/>
  
      </war>
  
    </target>
  
    <target name="cleandocs" depends="init" description="* Cleans the build docs directories">
      <delete dir="${build.docs}"/>
    </target>
  
    <!-- =================================================================== -->
    <!-- Creates the API documentation                                       -->
    <!-- =================================================================== -->
    <target name="javadocs"
        description="* Generates the API documentation">
      <mkdir dir="${build.javadocs}"/>
      <javadoc packagenames="${packages}"
               sourcepath="${build.src}"
               destdir="${build.javadocs}"
               author="true"
               version="true"
               use="false"
               noindex="true"
               windowtitle="${Name} API"
               doctitle="${Name}"
               bottom="Copyright &#169; ${year} ${fullname} project. All Rights Reserved."
               stylesheetfile="${resource.dir}/javadoc.css">
        <classpath refid="classpath"/>
      </javadoc>
    </target>
  
    <!-- =================================================================== -->
    <!-- Validate xml                                                        -->
    <!-- =================================================================== -->
    <target name="validate-docs" description="Checks that the xml files are valid and conform
to the DTD.">
      <xmlvalidate failonerror="yes" lenient="yes" warn="yes"
         className="org.apache.xerces.parsers.SAXParser">
  
         <classpath>
           <fileset dir="./lib/endorsed">
             <include name="*.jar"/>
           </fileset>
         </classpath>
  
         <fileset dir="."
                  includes="*.x*" excludes="build.xml"/>
  
       </xmlvalidate>
    </target>
  
    <!-- =================================================================== -->
    <!-- The documentation system                                            -->
    <!-- =================================================================== -->
    <target name="docs"
            depends="cleandocs, owdocs"
            description="* Generates the documentation"/>
  
    <!-- =================================================================== -->
    <!-- The documentation system                                            -->
    <!-- =================================================================== -->
    <target name="owdocs"
            depends="prepare-docs"
            description="* Generates the documentation">
  
      <property name="dir.containing.docs" value="${build.context}"/>
  
      <echo message="-------------------------------------------------------------"/>
      <echo message="  Building docs, please stand by ..."/>
  
      <java classname="org.apache.cocoon.Main" fork="true" dir="${dir.containing.docs}"
failonerror="true">
        <arg value="-c."/>
        <arg value="-d../docs"/>
        <arg value="-w../work"/>
        <arg value="-b../brokenlinks.txt"/>
        <arg value="-k../work/logkit.xconf"/>
        <arg value="-u${centipede.tools.cents.forrest.loglevel}"/>
        <arg value="-V"/>
        <arg value="index.html"/>
        <classpath>
          <path refid="classpath"/>
          <fileset dir="${build.dir}">
            <include name="*.jar"/>
          </fileset>
          <fileset dir="${tools.dir}">
            <include name="*/lib/*.jar"/>
          </fileset>
          <pathelement location="${tools.jar}"/>
          <pathelement location="${build.context}/WEB-INF/classes"/>
        </classpath>
      </java>
  
      <echo message="  ...docs generated successfully in ${build.docs}"/>
      <echo message="-------------------------------------------------------------"/>
  
    </target>
  
    <!-- =================================================================== -->
    <!-- Creates the web site                                                -->
    <!-- =================================================================== -->
    <target name="site" depends="docs, javadocs"
        description="Generates the web site (for site maintainers only)">
      <mkdir dir="${site}"/>
      <copy todir="${site}" filtering="off">
        <fileset dir="${build.docs}">
        </fileset>
      </copy>
      <copy todir="${site}/apidocs" filtering="off">
        <fileset dir="${build.javadocs}"/>
      </copy>
    </target>
  
  
    <target name="getcvsmodule" depends="init">
  
      <property name="getcvsmodule.work.dir" value="${build.dir}/work/forrest/cvsmodule"
/>
      <property name="getcvsmodule.package" value="xml-forrest" />
  
      <delete dir="${getcvsmodule.work.dir}"/>
      <mkdir dir="${getcvsmodule.work.dir}"/>
  
      <cvspass cvsroot=":pserver:anoncvs@jakarta.apache.org:/home/cvspublic"
              password="anoncvs"
       />
  
      <cvs cvsRoot=":pserver:anoncvs@cvs.apache.org:/home/cvspublic"
           package="${getcvsmodule.package}"
           dest="${getcvsmodule.work.dir}"
           quiet="true"
      />
    </target>
  
    <target name="deploy" unless="deploy.username, deploy.package-name
                                      deploy.data.dir, deploy.hostname, deploy.remotedir">
    <!--
      deploy.username
      deploy.package-name
      deploy.data.dir
      deploy.hostname
      deploy.remotedir
     -->
  
      <property name="deploy.work.dir"  value="${build.dir}/work/forrest/deploy/${deploy.package-name}"/>
  
      <delete dir="${deploy.work.dir}"/>
      <mkdir dir="${deploy.work.dir}"/>
  
      <property name="deploy.tar.fullpath"
                value="${deploy.work.dir}/${deploy.package-name}-deploy"/>
  
      <tar tarfile="${deploy.tar.fullpath}.tar" basedir="${deploy.data.dir}"/>
      <gzip zipfile="${deploy.tar.fullpath}.tar.gz" src="${deploy.tar.fullpath}.tar"/>
      <delete file="${deploy.tar.fullpath}.tar"/>
  
      <exec dir="." executable="scp">
        <!--<arg value="-oProtocol=1"/>-->
        <arg value="${deploy.tar.fullpath}.tar.gz"/>
        <arg value="${deploy.username}@${deploy.hostname}:${deploy.remotedir}"/>
      </exec>
  
      <exec dir="." executable="ssh">
        <arg line="-n ${deploy.hostname} -l ${deploy.username} 'cd ${deploy.remotedir};gunzip
${deploy.package-name}-deploy.tar.gz;tar xUvf ${deploy.package-name}-deploy.tar;chmod -R g+u
*;rm ${deploy.package-name}-deploy.tar'"/>
      </exec>
  
      <delete file="${deploy.tar.fullpath}.tar.gz"/>
  
    </target>
  
    <target name="sendlog" depends="init" if="sendlog.to">
  
     <mail from="forrest-dev@xml.apache.org"
           tolist="${sendlog.to}"
           subject="[DO NOT REPLY] Building in the Forrest"
           files="forrestbot.log" />
  
    </target>
  
  
    <target name="testpoi" depends="init, testpoicvs, testpoigen, testpoideploy"/>
  
  
    <target name="testpoicvs" depends="init">
  
      <antcall target="getcvsmodule">
        <param name="getcvsmodule.package"  value="jakarta-poi"/>
        <param name="getcvsmodule.work.dir" value="${build.dir}/work/forrest/cvsmodule"
/>
      </antcall>
  
    </target>
  
    <target name="testpoigen" depends="init">
  
      <antcall target="prepare-docs">
        <param name="documentation.source.dir"  value="${build.dir}/work/forrest/cvsmodule/jakarta-poi/src/documentation"/>
      </antcall>
  
      <antcall target="owdocs"></antcall>
  
    </target>
  
    <target name="testpoideploy" depends="init">
  
  
      <antcall target="deploy">
        <param name="deploy.username"     value="forrestbot"/>
        <param name="deploy.package-name" value="jakarta-poi"/>
        <param name="deploy.data.dir"     value="${build.dir}/docs"/>
        <param name="deploy.hostname"     value="krysalis.sourceforge.net"/>
        <param name="deploy.remotedir"    value="/home/groups/k/kr/krysalis/htdocs/poi"/>
      </antcall>
  
    </target>
  
  
  
     <target name="forrestbar" depends="init">
  
        <mkdir dir="${build.dir}" />
        <mkdir dir="${build.dir}/work/forrestbar" />
  
        <jar jarfile="${build.dir}/work/forrestbar/forrestbar.jar">
           <fileset dir="src/resources/forrestbar" includes="content/**/*" />
        </jar>
  
        <copy file="src/resources/forrestbar/install.js" todir="${build.dir}/work/forrestbar"
overwrite="true" />
  
        <zip zipfile="${build.dir}/forrestbar.xpi" basedir="${build.dir}/work/forrestbar"
/>
  
     </target>
  
  
  
    <!-- ================================== -->
    <!--        Target used by Gump         -->
    <!-- ================================== -->
  
    <target  name="gump" description="Target used by Gump">
  
        <antcall target="docs"/>
        <antcall target="webapp"/>
  
    </target>
  
    <!-- ================================== -->
    <!--    Targets for the remote builds   -->
    <!-- ================================== -->
  
    <target name="bot.init" depends="init">
      <!-- initializes environment to start on bot targets -->
      <property name="bot.build.dir"              value="${xlayout.build.bot.dir}"/>
      <property name="bot.work.build.xml"         value="${bot.build.dir}/work.build.xml"/>
      <property name="bot.default.parameters.xml" value="${bot.build.dir}/default.parameters.xml"/>
      <property name="bot.forrestbot.xconf"       value="forrestbot.conf.xml" />
      <property file="ant-mail.properties" />
      <property name="bot.templates.build.xml"    value="${xlayout.source.resources.forrestbot.ant.dir}/templates.build.xml"
/>
      <property name="bot.work.builder.xslt"      value="${xlayout.source.resources.forrestbot.xslt.dir}/config2work.xsl"
/>
      <property name="bot.default.builder.xslt"   value="${xlayout.source.resources.forrestbot.xslt.dir}/config2defaults.xsl"
/>
      <mkdir dir="${bot.build.dir}" />
      <echo message="Using config file: ${bot.forrestbot.xconf}" />
    </target>
  
    <target name="bot.conf2build" depends="bot.init" >
  		<!-- remove previous versions to force generation again -->
  		<delete file="${bot.work.build.xml}" />
  		<delete file="${bot.default.parameters.xml}" />
  
      <!-- builds the different xml files this process needs.  -->
      <style in="${bot.forrestbot.xconf}"
         out="${bot.work.build.xml}"
         style="${bot.work.builder.xslt}"/>
      <style in="${bot.forrestbot.xconf}"
         out="${bot.default.parameters.xml}"
         style="${bot.default.builder.xslt}"/>
      <copy todir="${bot.build.dir}" file="${bot.templates.build.xml}"/>
    </target>
  
    <target name="bot.prepare-cp" depends="bot.init, compile" >
      <!-- todo: question if it is good practice to share WEB-INF classes -->
      <mkdir dir="${bot.build.dir}/WEB-INF/classes"/>
      <copy todir="${bot.build.dir}/WEB-INF/classes">
        <fileset dir="${resource.dir}/schema">
          <include name="CatalogManager.properties"/>
        </fileset>
        <fileset dir="${build.dest}">
          <include name="**/*.class"/>
        </fileset>
        <fileset dir="${build.scratchpad.dest}">
          <include name="**/*.class"/>
        </fileset>
      </copy>
  
      <path id="forrest.cp">
        <path refid="classpath"/>
        <fileset dir="${build.dir}">
          <include name="*.jar"/>
        </fileset>
        <fileset dir="${tools.dir}">
          <include name="*/lib/*.jar"/>
        </fileset>
        <pathelement location="${tools.jar}"/>
        <pathelement location="${bot.build.dir}/WEB-INF/classes"/>
      </path>
    </target>
  
    <target name="bot.run" depends="bot.conf2build, bot.prepare-cp" >
      <!-- delegates to the generated XML file -->
      <ant antfile="${bot.work.build.xml}" target="work" inheritRefs="true"/>
    </target>
  
    <target name="bot" depends="bot.run" />
  
    <!-- =================================================================== -->
    <!-- Import Ant-Centipede init targets - sets up basic build stuff       -->
    <!-- =================================================================== -->
    <!--
          This is the target that initializes tasks and properties used
          commonly in every other target.
  
          Remember to add depends="init" to every target, so that this
          target is called before any other.
  
          This target is internal; to make it unusable from the commandline,
          its name starts with a hyphen.
          To make it invisible when using -projecthelp, it lacks a description.
    -->
  
      &import-antipede;
  
  </project>
  
  
  

Mime
View raw message