comparison build.xml @ 144:44185c4a850c

Samples updated
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 18 Feb 2011 01:10:08 +0100
parents 0617dd31477f
children a05145db4d0c
comparison
equal deleted inserted replaced
143:b9700740553a 144:44185c4a850c
14 For information on how to redistribute this software under 14 For information on how to redistribute this software under
15 the terms of a license other than GNU General Public License 15 the terms of a license other than GNU General Public License
16 contact TMate Software at support@hg4j.com 16 contact TMate Software at support@hg4j.com
17 --> 17 -->
18 <project name="hg4j" default="samples"> 18 <project name="hg4j" default="samples">
19 <description> 19 <description>
20 Build, test and showcase hg4j 20 Build, test and showcase hg4j
21 </description> 21 </description>
22
23 <property name="junit.jar" value="lib/junit-4.8.2.jar"/>
24 <property name="ver.qualifier" value=".rc1"/>
25 <property name="version.lib" value="0.0.9"/>
26 <property name="version.jar" value="${version.lib}${ver.qualifier}"/>
27
28 <property name="hg4j.jar" value="hg4j_${version.jar}.jar"/>
29 <property name="hg4j-tests.jar" value="hg4j-tests_${version.jar}.jar"/>
30 <property name="hg4j-console.jar" value="hg4j-console_${version.jar}.jar"/>
31 22
32 <target name="samples" depends="build-cmdline"> 23 <property name="junit.jar" value="lib/junit-4.8.2.jar" />
33 <path id="path.cmdline" path="${hg4j.jar};${hg4j-console.jar}"/> 24 <property name="ver.qualifier" value=".rc1" />
34 25 <property name="version.lib" value="0.0.9" />
35 <echo message="History of a specific file(s)"/> 26 <property name="version.jar" value="${version.lib}${ver.qualifier}" />
36 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Log">
37 <arg line="design.txt .classpath src/com/tmate/hgkit/ll/LocalHgRepo.java"/>
38 </java>
39
40 <echo message="Whole repo log"/>
41 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Log"/>
42
43 <echo message="Content of a file"/>
44 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Cat">
45 <arg line="src/com/tmate/hgkit/ll/Revlog.java"/>
46 </java>
47 27
48 </target> 28 <property name="hg4j.jar" value="hg4j_${version.jar}.jar" />
49 29 <property name="hg4j-tests.jar" value="hg4j-tests_${version.jar}.jar" />
30 <property name="hg4j-console.jar" value="hg4j-console_${version.jar}.jar" />
31
32 <target name="samples" depends="build-cmdline">
33 <path id="path.cmdline" path="${hg4j.jar};${hg4j-console.jar}" />
34
35 <echo message="History of a specific file(s)" />
36 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Log">
37 <arg line="design.txt .classpath src/org/tmatesoft/hg/core/HgRepoFacade.java" />
38 </java>
39
40 <echo message="${line.separator}>>>Latest commit" />
41 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Log">
42 <arg line="--debug --limit 1" />
43 </java>
44
45 <echo message="${line.separator}>>>Content of a file" />
46 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Cat">
47 <arg line="src/org/tmatesoft/hg/core/HgRepoFacade.java --rev 1" />
48 </java>
49
50 <echo message="${line.separator}>>>Status between two revisions" />
51 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Status">
52 <arg line="--rev 140 --rev 142" />
53 </java>
54
55 <echo message="${line.separator}>>>Status, working copy, all" />
56 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Status">
57 <arg line="-A" />
58 </java>
59
60 <echo message="${line.separator}>>>Manifest" />
61 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Manifest">
62 <arg line="--debug" />
63 </java>
64 </target>
65
50 <target name="tests" depends="build-tests"> 66 <target name="tests" depends="build-tests">
51 <junit> 67 <junit>
52 <classpath path="${hg4j.jar};${hg4j-tests.jar};${junit.jar}"/> 68 <classpath path="${hg4j.jar};${hg4j-tests.jar};${junit.jar}" />
53 <formatter type="xml"/> 69 <formatter type="xml" />
54 <formatter type="plain" usefile="no"/> 70 <formatter type="plain" usefile="no" />
55 <test name="org.tmatesoft.hg.test.TestHistory"/> 71 <test name="org.tmatesoft.hg.test.TestHistory" />
56 <test name="org.tmatesoft.hg.test.TestManifest"/> 72 <test name="org.tmatesoft.hg.test.TestManifest" />
57 <test name="org.tmatesoft.hg.test.TestStatus"/> 73 <test name="org.tmatesoft.hg.test.TestStatus" />
58 <test name="org.tmatesoft.hg.test.TestStorePath"/> 74 <test name="org.tmatesoft.hg.test.TestStorePath" />
59 </junit> 75 </junit>
60 <!-- 76 <!--
61 <java classpath="hg4j.jar;hg4j-tests.jar" classname="org.tmatesoft.hg.test.TestHistory"/> 77 <java classpath="hg4j.jar;hg4j-tests.jar" classname="org.tmatesoft.hg.test.TestHistory"/>
62 <java classpath="hg4j.jar;hg4j-tests.jar" classname="org.tmatesoft.hg.test.TestManifest"/> 78 <java classpath="hg4j.jar;hg4j-tests.jar" classname="org.tmatesoft.hg.test.TestManifest"/>
63 <java classpath="hg4j.jar;hg4j-tests.jar" classname="org.tmatesoft.hg.test.TestStatus"/> 79 <java classpath="hg4j.jar;hg4j-tests.jar" classname="org.tmatesoft.hg.test.TestStatus"/>
64 --> 80 -->
65 </target> 81 </target>
66 82
67 <target name="build"> 83 <target name="build">
68 <mkdir dir="bin"/> 84 <mkdir dir="bin" />
69 <javac srcdir="src" destdir="bin"/> 85 <javac srcdir="src" destdir="bin" />
70 <jar destfile="${hg4j.jar}"> 86 <jar destfile="${hg4j.jar}">
71 <fileset dir="bin/"> 87 <fileset dir="bin/">
72 <include name="org/tmatesoft/hg/core/**" /> 88 <include name="org/tmatesoft/hg/core/**" />
73 <include name="org/tmatesoft/hg/util/**" /> 89 <include name="org/tmatesoft/hg/util/**" />
74 <include name="org/tmatesoft/hg/repo/**" /> 90 <include name="org/tmatesoft/hg/repo/**" />
75 <include name="org/tmatesoft/hg/internal/**" /> 91 <include name="org/tmatesoft/hg/internal/**" />
76 </fileset> 92 </fileset>
77 </jar> 93 </jar>
78 </target> 94 </target>
79 95
80 <target name="build-tests" depends="build"> 96 <target name="build-tests" depends="build">
81 <mkdir dir="bin"/> 97 <mkdir dir="bin" />
82 <javac srcdir="test" destdir="bin"/> 98 <javac srcdir="test" destdir="bin" />
83 <jar destfile="${hg4j-tests.jar}" basedir="bin" includes="org/tmatesoft/hg/test/**"/> 99 <jar destfile="${hg4j-tests.jar}" basedir="bin" includes="org/tmatesoft/hg/test/**" />
84 </target> 100 </target>
85 101
86 <target name="build-cmdline" depends="build"> 102 <target name="build-cmdline" depends="build">
87 <mkdir dir="bin"/> 103 <mkdir dir="bin" />
88 <javac srcdir="cmdline" destdir="bin"/> 104 <javac srcdir="cmdline" destdir="bin" />
89 <jar destfile="${hg4j-console.jar}" basedir="bin" includes="org/tmatesoft/hg/console/**"/> 105 <jar destfile="${hg4j-console.jar}" basedir="bin" includes="org/tmatesoft/hg/console/**" />
90 </target> 106 </target>
91 107
92 </project> 108 </project>