ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roger Le <...@alibaba-inc.com>
Subject Re: I can't use ant to build peers
Date Wed, 24 Jul 2002 07:29:01 GMT
<?xml version="1.0" encoding="ISO-8859-1"?>

<project name="site" default="init" basedir=".">
<!--Allow the user override the variable-->

<property file="build.properties"/>

<!--Basic classpath set-->

<path id="base.classpath">
   <fileset dir="../lib/share">
      <include name="**/*.jar"/>
   </fileset>
   <pathelement location="../classes"/>
</path>

<!--===============================================-->
<!--         Project Initialize                    -->
<!--===============================================-->

<target name="init" depends="sysEnviroment" description="==>System Compiler Enviroment
Check">
    <echo>
    The System OS is ${sys.platform}
    file seperator tag is ${sys.separator}
    path seperator tag is ${sys.pathseparator}
    </echo>
    <available file="${build.dest}" type="dir" property="build.path"/>
    <antcall target="databaseInit"/>
    <antcall target="compiler"/>
</target>

<!--===============================================-->
<!--         Check necessary dirctory and lib jar  -->
<!--===============================================-->
<target name="chkBuildDir" unless="build.path">
     <echo message="There is no build directory."/>
     <antcall target="prepare"/>
</target>

<target name="buildDirOK" if="build.path">
     <echo message="Build directory ok."/>
</target>
<!--===============================================-->
<!--            Enviroment prepare                 -->
<!--===============================================-->
<target name="prepare" description="==>Setup the Enviroment">
    <echo message="making directory..."/>
    <mkdir dir="${build.dest}"/>
</target>



<!--===============================================-->
<!--            Database initialization            -->
<!--===============================================-->

<target name="database">
     <echo message="constructing"/>
</target>



<!--===============================================-->
<!--            Compiler All the source code       -->
<!--===============================================-->

<target name="compiler" depends="chkBuildDir,buildDirOK" description="==>compiler the
source code">
    <javac srcdir="${src.dir}"
      destdir="${build.dest}"
      debug="${debug}"
      deprecation="${deprecation}"
      optimize="${optimize}">
      <classpath refid="base.classpath"/>
    </javac>
</target>

<!--===============================================-->
<!--            Make Jar file                      -->
<!--===============================================-->

<target name="jar" depends="compiler">
     <mkdir dir="../lib/prj"/>
     <jar destfile="../lib/prj/${final.name}.jar" basedir="${build.dest}"/>
</target>


<!--===============================================-->
<!--            Make javadoc                       -->
<!--===============================================-->
  <target
    name="javadocs"
    depends="prepare"
    description="==> generates the API documentation">

    <mkdir dir="${docs.dest}"/>

    <javadoc
      sourcepath="${src.dir}"
      packagenames="${package}.*"
      destdir="${docs.dest}"
      author="true"
      private="true"
      version="true"
      use="true"
      windowtitle="${name} ${version} API"
      doctitle="${name} ${version} API"
      bottom="Copyright &amp;copy; ${year} Deculion Orgnization Founded. All Rights Reserved.">
      <classpath refid="base.classpath"/>
      <classpath path="${ant.home}/lib/ant.jar"/>
    </javadoc>
  </target>



<!--===============================================-->
<!--            clear the classes                  -->
<!--===============================================-->

<target name="clear">
    <delete dir="${build.dest}"/>
    <delete dir="${docs.dest}"/>
    <delete dir="${src.dir}/sql"/>
    <delete dir="${src.dir}/doc"/>
</target>


<!--===============================================-->
<!--            Enviroment Properties Set          -->
<!--===============================================-->
<target name="sysEnviroment">
     <property name="sys.platform" value="${os.name}"/>
     <property name="sys.separator" value="${file.separator}"/>
     <property name="sys.pathseparator" value="${path.separator}"/>
</target>

<!--==============================================-->
<!--          Create Peers                        -->
<!-- These target should be used to build the     -->
<!-- site's peers                                 -->
<!--==============================================-->
<target name="databaseInit">
    <antcall target="site-pre-runtime"/>
</target>

<!-- ============================================================== -->
<!-- P R E   R U N T I M E   T E S T S                              -->
<!-- ============================================================== -->
<!-- These are the tests for the torque tests which are             -->
<!-- primarily generative in nature.                                -->
<!--                                                                -->
<!-- The tests will be run from the distribution that is            -->
<!-- produced by the build process. This is a test of Torque's      -->
<!-- generative abilities.                                          -->
<!--                                                                -->
<!-- These are the tasks that we will be testing:                   -->
<!--                                                                -->
<!-- project-sql                                                    -->
<!-- project-om                                                     -->
<!--                                                                -->
<!-- The project-sql is also another complete set of tests:         -->
<!-- we need to run the task for each of the supported databases    -->
<!-- to make sure that generated SQL remains coherent across        -->
<!-- changes to the templates.                                      -->
<!-- ============================================================== -->

<target
  name="site-pre-runtime">
  <antcall target="site-project-doc"/>
  <antcall target="site-create-db"/>
  <antcall target="site-project-sql"/>
  <antcall target="site-id-table-init-sql"/>
  <antcall target="site-project-insert-sql"/>
  <antcall target="site-project-om"/>
</target>

<!--===============================================================-->
<!--      These targets are prepare for the pre runtime,include    -->
<!--      create database sql,and create the om                    -->
<!--===============================================================-->
  <target
    name="site-project-doc">
    <ant
      dir="${site.torque.buildFileDir}"
      antfile="${site.torque.buildFile}"
      target="project-doc"
      inheritrefs="true">
    </ant>
  </target>

  <target
    name="site-create-db">
    <ant
      dir="${site.torque.buildFileDir}"
      antfile="${site.torque.buildFile}"
      target="project-create-db">
    </ant>
  </target>

  <target
    name="site-project-sql">
    <ant
      dir="${site.torque.buildFileDir}"
      antfile="${site.torque.buildFile}"
      target="project-sql">
    </ant>
  </target>

  <target
    name="site-id-table-init-sql">
    <ant
      dir="${site.torque.buildFileDir}"
      antfile="${site.torque.buildFile}"
      target="id-table-init-sql">
    </ant>
  </target>

  <target
    name="site-project-insert-sql">
    <ant
      dir="${site.torque.buildFileDir}"
      antfile="${site.torque.buildFile}"
      target="project-insert-sql">
    </ant>
  </target>

  <target
    name="site-project-om">
    <ant
      dir="${site.torque.buildFileDir}"
      antfile="${site.torque.buildFile}"
      target="project-om">
    </ant>
  </target>
</project>



Mime
View raw message