view mercurial.xml @ 23:3ddf410c2fd6

minor change
author Pavel.Sher
date Fri, 18 Jul 2008 13:17:29 +0400
parents 3539151629aa
children 7944e8985ebd
line wrap: on
line source
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="mercurial" default="all">
  
  
  <property file="mercurial.properties"/>
  <!-- Uncomment the following property if no tests compilation is needed -->
  <!-- 
  <property name="skip.tests" value="true"/>
   -->
  
  <!-- Compiler options -->
  
  <property name="compiler.debug" value="on"/>
  <property name="compiler.generate.no.warnings" value="off"/>
  <property name="compiler.args" value=""/>
  <property name="compiler.max.memory" value="128m"/>
  <patternset id="ignored.files">
    <exclude name="**/CVS/**"/>
    <exclude name="**/SCCS/**"/>
    <exclude name="**/RCS/**"/>
    <exclude name="**/rcs/**"/>
    <exclude name="**/.DS_Store/**"/>
    <exclude name="**/.svn/**"/>
    <exclude name="**/vssver.scc/**"/>
    <exclude name="**/vssver2.scc/**"/>
    <exclude name="**/.sbas/**"/>
    <exclude name="**/.IJI.*/**"/>
    <exclude name="**/.pyc/**"/>
    <exclude name="**/.pyo/**"/>
  </patternset>
  <patternset id="compiler.resources">
    <include name="**/?*.properties"/>
    <include name="**/?*.xml"/>
    <include name="**/?*.gif"/>
    <include name="**/?*.png"/>
    <include name="**/?*.jpeg"/>
    <include name="**/?*.jpg"/>
    <include name="**/?*.html"/>
    <include name="**/?*.dtd"/>
    <include name="**/?*.tld"/>
    <include name="**/?*.jsp"/>
    <include name="**/?*.tag"/>
  </patternset>
  
  
  <!-- Project Libraries -->
  
  <path id="library.teamcity-openapi.classpath">
    <pathelement location="${basedir}/mercurial/lib/server-api.jar"/>
    <pathelement location="${basedir}/mercurial/lib/common-api.jar"/>
  </path>
  
  <path id="library.idea-openapi.classpath">
    <pathelement location="${basedir}/mercurial/lib/annotations.jar"/>
    <pathelement location="${basedir}/mercurial/lib/openapi.jar"/>
    <pathelement location="${basedir}/mercurial/lib/util.jar"/>
    <pathelement location="${basedir}/mercurial/lib/resources_en.jar"/>
  </path>
  
  <path id="library.teamcity-testssupport.classpath">
    <pathelement location="${basedir}/mercurial-tests/lib/patches-tests.jar"/>
    <pathelement location="${basedir}/mercurial-tests/lib/test.jar"/>
  </path>
  
  <path id="library.junit.classpath">
    <pathelement location="${basedir}/mercurial-tests/lib/junit-3.8.1.jar"/>
  </path>
  
  <path id="library.testng.classpath">
    <pathelement location="${basedir}/mercurial-tests/lib/testng-5.7-jdk15.jar"/>
  </path>
  
  <path id="library.jmock.classpath">
    <pathelement location="${basedir}/mercurial-tests/lib/jmock-SNAPSHOT.jar"/>
  </path>
  
  <path id="library.teamcity-impl.classpath">
    <pathelement location="${basedir}/mercurial/lib/patches-impl.jar"/>
  </path>
  
  <path id="library.log4j.classpath">
    <pathelement location="${basedir}/mercurial/lib/log4j-1.2.12.jar"/>
  </path>
  
  <path id="library.gnu_trove.classpath">
    <pathelement location="${basedir}/mercurial/lib/trove4j.jar"/>
  </path>
  
  
  <!-- Application Server Libraries -->
  
  <!-- Modules -->
  
  
  <!-- Module main -->
  
  <dirname property="module.main.basedir" file="${ant.file}"/>
  
  
  
  <property name="compiler.args.main" value="${compiler.args}"/>
  
  <property name="main.output.dir" value="undefined"/>
  <property name="main.testoutput.dir" value="undefined"/>
  
  <path id="main.module.bootclasspath">
    <!-- Paths to be included in compilation bootclasspath -->
  </path>
  
  <path id="main.module.classpath"/>
  
  <path id="main.runtime.module.classpath"/>
  
  
  <patternset id="excluded.from.module.main">
    <patternset refid="ignored.files"/>
  </patternset>
  
  <patternset id="excluded.from.compilation.main">
    <patternset refid="excluded.from.module.main"/>
  </patternset>
  
  
  <target name="compile.module.main" depends="compile.module.main.production,compile.module.main.tests" description="Compile module main"/>
  
  <target name="compile.module.main.production" description="Compile module main; production classes"/>
  
  <target name="compile.module.main.tests" depends="compile.module.main.production" description="compile module main; test classes" unless="skip.tests"/>
  
  <target name="clean.module.main" description="cleanup module">
    <delete dir="${main.output.dir}"/>
    <delete dir="${main.testoutput.dir}"/>
  </target>
  
  
  <!-- Module mercurial -->
  
  <dirname property="module.mercurial.basedir" file="${ant.file}"/>
  
  
  
  <property name="compiler.args.mercurial" value="${compiler.args}"/>
  
  <property name="mercurial.output.dir" value="${module.mercurial.basedir}/mercurial/classes"/>
  <property name="mercurial.testoutput.dir" value="${module.mercurial.basedir}/mercurial/classes"/>
  
  <path id="mercurial.module.bootclasspath">
    <!-- Paths to be included in compilation bootclasspath -->
  </path>
  
  <path id="mercurial.module.classpath">
    <path refid="library.teamcity-openapi.classpath"/>
    <path refid="library.idea-openapi.classpath"/>
    <path refid="library.teamcity-impl.classpath"/>
    <path refid="library.log4j.classpath"/>
    <path refid="library.gnu_trove.classpath"/>
  </path>
  
  <path id="mercurial.runtime.module.classpath">
    <pathelement location="${mercurial.output.dir}"/>
    <path refid="library.teamcity-openapi.classpath"/>
    <path refid="library.idea-openapi.classpath"/>
    <path refid="library.teamcity-impl.classpath"/>
    <path refid="library.log4j.classpath"/>
    <path refid="library.gnu_trove.classpath"/>
  </path>
  
  
  <patternset id="excluded.from.module.mercurial">
    <patternset refid="ignored.files"/>
  </patternset>
  
  <patternset id="excluded.from.compilation.mercurial">
    <patternset refid="excluded.from.module.mercurial"/>
  </patternset>
  
  <path id="mercurial.module.sourcepath">
    <dirset dir="${module.mercurial.basedir}/mercurial">
      <include name="resources"/>
      <include name="src"/>
    </dirset>
  </path>
  
  
  <target name="compile.module.mercurial" depends="compile.module.mercurial.production,compile.module.mercurial.tests" description="Compile module mercurial"/>
  
  <target name="compile.module.mercurial.production" description="Compile module mercurial; production classes">
    <mkdir dir="${mercurial.output.dir}"/>
    <javac destdir="${mercurial.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true">
      <compilerarg line="${compiler.args.mercurial}"/>
      <bootclasspath refid="mercurial.module.bootclasspath"/>
      <classpath refid="mercurial.module.classpath"/>
      <src refid="mercurial.module.sourcepath"/>
      <patternset refid="excluded.from.compilation.mercurial"/>
    </javac>
    
    <copy todir="${mercurial.output.dir}">
      <fileset dir="${module.mercurial.basedir}/mercurial/resources">
        <patternset refid="compiler.resources"/>
        <type type="file"/>
      </fileset>
      <fileset dir="${module.mercurial.basedir}/mercurial/src">
        <patternset refid="compiler.resources"/>
        <type type="file"/>
      </fileset>
    </copy>
  </target>
  
  <target name="compile.module.mercurial.tests" depends="compile.module.mercurial.production" description="compile module mercurial; test classes" unless="skip.tests"/>
  
  <target name="clean.module.mercurial" description="cleanup module">
    <delete dir="${mercurial.output.dir}"/>
    <delete dir="${mercurial.testoutput.dir}"/>
  </target>
  
  
  <!-- Module mercurial-tests -->
  
  <dirname property="module.mercurial-tests.basedir" file="${ant.file}"/>
  
  
  
  <property name="compiler.args.mercurial-tests" value="${compiler.args}"/>
  
  <property name="mercurial-tests.output.dir" value="${module.mercurial-tests.basedir}/mercurial-tests/classes"/>
  <property name="mercurial-tests.testoutput.dir" value="${module.mercurial-tests.basedir}/mercurial-tests/classes"/>
  
  <path id="mercurial-tests.module.bootclasspath">
    <!-- Paths to be included in compilation bootclasspath -->
  </path>
  
  <path id="mercurial-tests.module.classpath">
    <pathelement location="${mercurial.output.dir}"/>
    <path refid="library.teamcity-openapi.classpath"/>
    <path refid="library.idea-openapi.classpath"/>
    <path refid="library.teamcity-impl.classpath"/>
    <path refid="library.log4j.classpath"/>
    <path refid="library.gnu_trove.classpath"/>
    <path refid="library.teamcity-testssupport.classpath"/>
    <path refid="library.junit.classpath"/>
    <path refid="library.testng.classpath"/>
    <path refid="library.jmock.classpath"/>
  </path>
  
  <path id="mercurial-tests.runtime.module.classpath">
    <pathelement location="${mercurial-tests.output.dir}"/>
    <pathelement location="${mercurial.output.dir}"/>
    <path refid="library.teamcity-openapi.classpath"/>
    <path refid="library.idea-openapi.classpath"/>
    <path refid="library.teamcity-impl.classpath"/>
    <path refid="library.log4j.classpath"/>
    <path refid="library.gnu_trove.classpath"/>
    <path refid="library.teamcity-testssupport.classpath"/>
    <path refid="library.junit.classpath"/>
    <path refid="library.testng.classpath"/>
    <path refid="library.jmock.classpath"/>
  </path>
  
  
  <patternset id="excluded.from.module.mercurial-tests">
    <patternset refid="ignored.files"/>
  </patternset>
  
  <patternset id="excluded.from.compilation.mercurial-tests">
    <patternset refid="excluded.from.module.mercurial-tests"/>
  </patternset>
  
  <path id="mercurial-tests.module.sourcepath">
    <dirset dir="${module.mercurial-tests.basedir}/mercurial-tests">
      <include name="src"/>
    </dirset>
  </path>
  
  
  <target name="compile.module.mercurial-tests" depends="compile.module.mercurial-tests.production,compile.module.mercurial-tests.tests" description="Compile module mercurial-tests"/>
  
  <target name="compile.module.mercurial-tests.production" depends="compile.module.mercurial" description="Compile module mercurial-tests; production classes">
    <mkdir dir="${mercurial-tests.output.dir}"/>
    <javac destdir="${mercurial-tests.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true">
      <compilerarg line="${compiler.args.mercurial-tests}"/>
      <bootclasspath refid="mercurial-tests.module.bootclasspath"/>
      <classpath refid="mercurial-tests.module.classpath"/>
      <src refid="mercurial-tests.module.sourcepath"/>
      <patternset refid="excluded.from.compilation.mercurial-tests"/>
    </javac>
    
    <copy todir="${mercurial-tests.output.dir}">
      <fileset dir="${module.mercurial-tests.basedir}/mercurial-tests/src">
        <patternset refid="compiler.resources"/>
        <type type="file"/>
      </fileset>
    </copy>
  </target>
  
  <target name="compile.module.mercurial-tests.tests" depends="compile.module.mercurial-tests.production" description="compile module mercurial-tests; test classes" unless="skip.tests"/>
  
  <target name="clean.module.mercurial-tests" description="cleanup module">
    <delete dir="${mercurial-tests.output.dir}"/>
    <delete dir="${mercurial-tests.testoutput.dir}"/>
  </target>
  
  <target name="init" description="Build initialization">
    <!-- Perform any build initialization in this target -->
  </target>
  
  <target name="clean" depends="clean.module.main, clean.module.mercurial, clean.module.mercurial-tests" description="cleanup all"/>
  
  <target name="all" depends="init, clean, compile.module.main, compile.module.mercurial, compile.module.mercurial-tests" description="build all"/>
</project>