Mercurial > hg > mercurial
diff mercurial.xml @ 5:8e6ade135483
first version of build.xml
author | Pavel.Sher |
---|---|
date | Mon, 14 Jul 2008 20:09:42 +0400 |
parents | |
children | c05869fe20af |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial.xml Mon Jul 14 20:09:42 2008 +0400 @@ -0,0 +1,313 @@ +<?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"/> + </patternset> + + + <!-- Project Libraries --> + + <path id="library.teamcity-openapi.classpath"> + <pathelement location="${basedir}/mercurial/lib/server-openapi.jar"/> + <pathelement location="${basedir}/mercurial/lib/web-openapi.jar"/> + <pathelement location="${basedir}/mercurial/lib/server-model.jar"/> + <pathelement location="${basedir}/mercurial/lib/common.jar"/> + <pathelement location="${basedir}/mercurial/lib/utils.jar"/> + <pathelement location="${basedir}/mercurial/lib/patches.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"/> + </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="${module.main.basedir}/out/production/main"/> + <property name="main.testoutput.dir" value="${module.main.basedir}/out/test/main"/> + + <path id="main.module.bootclasspath"> + <!-- Paths to be included in compilation bootclasspath --> + </path> + + <path id="main.module.classpath"/> + + <path id="main.runtime.module.classpath"> + <pathelement location="${main.output.dir}"/> + <pathelement location="${main.testoutput.dir}"/> + </path> + + + <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/buildServerResources"/> + <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/buildServerResources"> + <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> \ No newline at end of file