You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ha...@apache.org on 2002/06/03 22:47:41 UTC

cvs commit: jakarta-avalon-apps/hsql build.xml

hammant     2002/06/03 13:47:41

  Modified:    hsql     build.xml
  Log:
  dist target now working
  
  Revision  Changes    Path
  1.20      +60 -42    jakarta-avalon-apps/hsql/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-apps/hsql/build.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- build.xml	19 May 2002 09:28:59 -0000	1.19
  +++ build.xml	3 Jun 2002 20:47:40 -0000	1.20
  @@ -28,56 +28,49 @@
     <property name="build.xdoclet" value="${build.dir}/xdoclet"/>
     <property name="build.src" value="${build.dir}/src"/>
     <property name="build.classes" value="${build.dir}/classes"/>
  -  <property name="build.xdocs" value="${build.dir}/xdocs"/>
  +  <property name="build.javadocs" value="${build.dir}/javadocs"/>  
     <property name="build.docs" value="${build.dir}/docs"/>
     <property name="build.context" value="${build.dir}/documentation"/>  
  +  <property name="build.xdocs" value="${build.dir}/xdocs"/>  
   
     <!-- Set the properties for source directories -->
     <property name="src.dir" value="src"/>
     <property name="java.dir" value="${src.dir}/java"/>
     <property name="manifest.dir" value="${src.dir}/manifest"/>
     <property name="conf.dir" value="${src.dir}/conf"/>
  -  <property name="tools.dir" location="../../jakarta-avalon/tools"/>
  -  <property name="docs.dir" value="docs"/>
  -  <property name="xdocs.dir" value="${src.dir}/xdocs"/>  
  +  <property name="docs.dir" value="docs"/> 
     <property name="context.dir" value="../../jakarta-avalon/src/documentation"/>  
  -  <property name="junit.jar" value="${tools.dir}/lib/junit-3.7.jar"/>
  -  <property name="tools.jar" value="${java.home}/../lib/tools.jar"/>  
  +  <property name="xdocs.dir" value="${src.dir}/xdocs"/>   
  +  <property name="tools.dir" location="../../jakarta-avalon/tools"/>
   
     <property name="dist.base" value="distributions"/>
   
     <path id="project.class.path">
  -    <pathelement path="${java.class.path}" />
  -    <pathelement location="xerces.jar2"/>  
  +    <pathelement path="${java.class.path}" /> 
       <pathelement path="${build.classes}" />
  -
       <fileset dir="../common/lib">
         <include name="*.jar" />
       </fileset>
  -    
       <fileset dir="lib">
         <include name="*.jar" />
  -    </fileset>    
  -    
  +    </fileset>
     </path>
   
  +
     <path id="tools.class.path">
  -    <pathelement location="${junit.jar}"/>
  +    <path refid="project.class.path"/>
  +    <pathelement location="${xerces.jar}"/>
  +    <pathelement location="${xalan.jar}"/>
       <pathelement location="${tools.jar}"/>
  -    <fileset dir="${tools.dir}/lib"/>
  -    <fileset dir="${tools.dir}/ext"/>
  +    <fileset dir="${tools.dir}/lib">
  +      <exclude name="ant.jar" />
  +    </fileset>
     </path>
   
     <taskdef name="sar" classname="org.apache.avalon.phoenix.tools.tasks.Sar">
       <classpath refid="project.class.path" />
     </taskdef>
   
  -  <!-- Help on usage -->
  -  <target name="help" depends="usage"/>
  -  <target name="usage">
  -    <echo message="Run ant -projecthelp to get a list of targets to run"/>
  -  </target>
  -
     <!-- Setup the filters -->
     <target name="setup-filters">
       <filter token="Name" value="Avalon Apps - HSQL"/>
  @@ -107,10 +100,6 @@
     <!-- Compiles project -->
     <target name="compile">
   
  -    <available classname="org.hsqldb.HsqlServerFactory" 
  -        classpathref="project.class.path" 
  -        property="hsql.present"/>
  -
       <mkdir dir="${build.classes}"/>
   
       <javac srcdir="${java.dir}"
  @@ -119,8 +108,7 @@
              optimize="${build.optimize}"
              deprecation="${build.deprecation}">
         <classpath refid="project.class.path" />
  -      <exclude name="org/apache/avalon/hsql/**"
  -               unless="hsql.present" />
  +               
       </javac>
   
       <copy todir="${build.classes}">
  @@ -133,7 +121,7 @@
     </target>
   
     <!-- Make .xinfo and manifest automatically for blocks -->
  -  <target name="phoenix-xdoclet" depends="compile" if="hsql.present">
  +  <target name="phoenix-xdoclet" depends="compile">
     
       <mkdir dir="${build.xdoclet}"/>
     
  @@ -154,7 +142,7 @@
     </target>
   
     <!-- Jars up project -->
  -  <target name="jars" depends="phoenix-xdoclet" if="hsql.present">
  +  <target name="jars" depends="phoenix-xdoclet">
   
       <mkdir dir="${build.lib}"/>
   
  @@ -170,10 +158,10 @@
   
     </target>
   
  -  <target name="main" depends="sars" description="Default target to generate build products minus docs" if="hsql.present"/>
  -  <target name="all" depends="main,docs" description="Generate build products including docs" if="hsql.present"/>
  +  <target name="main" depends="sars" description="Default target to generate build products minus docs"/>
  +  <target name="all" depends="main,docs" description="Generate build products including docs"/>
    
  -  <target name="sars" depends="jars" if="hsql.present">
  +  <target name="sars" depends="jars">
   
       <sar sarfile="${build.lib}/avalon-hsql.sar"
            config="${conf.dir}/avalon-hsql-config.xml"
  @@ -237,7 +225,6 @@
       <mkdir dir="${build.xdocs}"/>
       <mkdir dir="${build.docs}"/>
       <mkdir dir="${build.dir}/work"/>
  -    <!-- <mkdir dir="../../docs/apps/hsql"/> TODO -->
   
       <!-- Base pointers for non-xdocs documentation. Override these in .ant.properties to link to local docs -->
       <copy todir="${build.context}" filtering="on">
  @@ -282,8 +269,8 @@
     
     <target name="site" depends="docs" description=" Places Docs ready for hosting on website">  
     
  -    <mkdir dir="../site/docs/apps/hsql"/>     
  -    <copy todir="../site/docs/apps/hsql">
  +    <mkdir dir="../site/docs/apps/${name}"/>     
  +    <copy todir="../site/docs/apps/${name}">
         <fileset dir="docs">
           <include name="**"/>
         </fileset>
  @@ -292,10 +279,8 @@
     </target>  
   
   
  -
  -
     <!-- Completely build all dists -->
  -  <target name="dist" description="Generates the distribution" if="hsql.present">
  +  <target name="dist" depends="sars" description="Generates the distribution">
   
       <property name="dist.name" value="${Name}-${version}"/>
   
  @@ -327,7 +312,17 @@
   
       <zip zipfile="${dist.base}/${dist.name}-src.zip"
            basedir="${dist.name}/.."
  -         includes="${dist.name}/**"/>
  +         includes="${dist.name}/**">
  +      <!-- TODO - trim the jars to those that are relevant -->
  +      <fileset dir="..">
  +        <include name="common/lib/avalon-*"/>
  +        <include name="common/lib/cornerstone.jar"/>
  +        <include name="common/lib/phoenix-*"/>
  +        <include name="common/lib/xdoclet*"/>
  +        <include name="common/lib/xjavadoc*"/>
  +        <include name="common/lib/log4j-core*"/>
  +      </fileset>
  +    </zip>
   
       <tar longfile="gnu" tarfile="${dist.base}/${dist.name}-src.tar" >
         <tarfileset dir="${dist.name}/.." mode="755" username="avalon" group="avalon">
  @@ -337,6 +332,15 @@
           <include name="${dist.name}/**"/>
           <exclude name="${dist.name}/build.sh"/>
         </tarfileset>
  +      <tarfileset dir=".." username="avalon" group="avalon">
  +        <include name="common/lib/avalon-*"/>
  +        <include name="common/lib/cornerstone.jar"/>
  +        <include name="common/lib/phoenix-*"/>
  +        <include name="common/lib/xdoclet*"/>
  +        <include name="common/lib/xjavadoc*"/>
  +        <include name="common/lib/log4j-core*"/>
  +      </tarfileset>
  +      
       </tar>
   
       <gzip zipfile="${dist.base}/${dist.name}-src.tar.gz"
  @@ -347,7 +351,7 @@
     </target>
   
     <!-- Creates all the .sar files -->  
  -  <target name="bin-dist" depends="all" if="hsql.present">
  +  <target name="bin-dist" depends="all">
   
       <!-- bin.dist.dir usually set before this target is called -->
       <property name="bin.dist.dir" value="dist"/>
  @@ -365,7 +369,7 @@
       <chmod dir="${bin.dist.dir}" perm="go-rwx" />
     </target>
   
  -  <target name="src-dist" depends="docs" if="hsql.present">
  +  <target name="src-dist" depends="docs">
       <!-- src.dist.dir has usually already been set -->
       <property name="src.dist.dir" value="dist-src"/>
       <property name="src.dist.src" value="${src.dist.dir}/src"/>
  @@ -380,12 +384,26 @@
       <copy todir="${src.dist.src}">
         <fileset dir="${src.dir}"/>
       </copy>
  +    
  +    <copy todir="${src.dist.dir}">
  +      <fileset dir=".">
  +        <include name="build.xml"/>
  +      </fileset>
  +    </copy>
  +    
  +    <mkdir dir="${src.dist.dir}/lib"/>
  +    <copy todir="${src.dist.dir}/lib">
  +      <fileset dir="lib">
  +        <include name="**"/>
  +      </fileset>
  +    </copy>
  +    
       <fixcrlf srcdir="${src.dist.src}/java" includes="**/*.java" eol="lf"/>
   
       <chmod dir="${src.dist.dir}" perm="go-rwx" />
     </target>
   
  -  <target name="install" depends="main" description="Installs into Phoenix" if="hsql.present">
  +  <target name="install" depends="main" description="Installs into Phoenix">
       <!-- <fail message="install.dir not specified." unless="install.dir"/> -->
       <echo message="Installing to ${install.dir}" />
       <delete dir="${install.dir}/avalon-hsql" />
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>