annotate build.xml @ 154:ba2bf656f00f

Changeset => RawChangeset
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 24 Feb 2011 22:16:19 +0100
parents a05145db4d0c
children a4ec5e087017
rev   line source
6
5abe5af181bd Ant script to build commands and run sample
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
70
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
2 <!--
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
3 Copyright (c) 2010-2011 TMate Software Ltd
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
4
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
5 This program is free software; you can redistribute it and/or modify
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
6 it under the terms of the GNU General Public License as published by
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
7 the Free Software Foundation; version 2 of the License.
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
8
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
9 This program is distributed in the hope that it will be useful,
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
12 GNU General Public License for more details.
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
13
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
14 For information on how to redistribute this software under
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
15 the terms of a license other than GNU General Public License
102
a3a2e5deb320 Updated contact address to support@hg4j.com
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 101
diff changeset
16 contact TMate Software at support@hg4j.com
70
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
17 -->
101
777ab7034c1b Switch to JUnit for tests
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 86
diff changeset
18 <project name="hg4j" default="samples">
144
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
19 <description>
101
777ab7034c1b Switch to JUnit for tests
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 86
diff changeset
20 Build, test and showcase hg4j
6
5abe5af181bd Ant script to build commands and run sample
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
21 </description>
5abe5af181bd Ant script to build commands and run sample
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
22
144
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
23 <property name="junit.jar" value="lib/junit-4.8.2.jar" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
24 <property name="ver.qualifier" value=".rc1" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
25 <property name="version.lib" value="0.0.9" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
26 <property name="version.jar" value="${version.lib}${ver.qualifier}" />
6
5abe5af181bd Ant script to build commands and run sample
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
27
144
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
28 <property name="hg4j.jar" value="hg4j_${version.jar}.jar" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
29 <property name="hg4j-tests.jar" value="hg4j-tests_${version.jar}.jar" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
30 <property name="hg4j-console.jar" value="hg4j-console_${version.jar}.jar" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
31
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
32 <target name="samples" depends="build-cmdline">
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
33 <path id="path.cmdline" path="${hg4j.jar};${hg4j-console.jar}" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
34
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
35 <echo message="History of a specific file(s)" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
36 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Log">
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
37 <arg line="design.txt .classpath src/org/tmatesoft/hg/core/HgRepoFacade.java" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
38 </java>
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
39
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
40 <echo message="${line.separator}>>>Latest commit" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
41 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Log">
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
42 <arg line="--debug --limit 1" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
43 </java>
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
44
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
45 <echo message="${line.separator}>>>Content of a file" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
46 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Cat">
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
47 <arg line="src/org/tmatesoft/hg/core/HgRepoFacade.java --rev 1" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
48 </java>
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
49
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
50 <echo message="${line.separator}>>>Status between two revisions" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
51 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Status">
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
52 <arg line="--rev 140 --rev 142" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
53 </java>
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
54
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
55 <echo message="${line.separator}>>>Status, working copy, all" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
56 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Status">
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
57 <arg line="-A" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
58 </java>
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
59
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
60 <echo message="${line.separator}>>>Manifest" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
61 <java classpathref="path.cmdline" classname="org.tmatesoft.hg.console.Manifest">
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
62 <arg line="--debug" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
63 </java>
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
64 </target>
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
65
86
ee4458416579 Build command line tools into separate jar
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 81
diff changeset
66 <target name="tests" depends="build-tests">
147
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
67 <property name="test-repos-root" value="${java.io.tmpdir}/hg4j-tests/"/>
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
68 <delete dir="${test-repos-root}" quiet="yes"/>
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
69 <unjar src="test-repos.jar" dest="${test-repos-root}"/>
103
0b2dcca7de9f ErrorCollector in tests to grab multiple errors
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 102
diff changeset
70 <junit>
144
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
71 <classpath path="${hg4j.jar};${hg4j-tests.jar};${junit.jar}" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
72 <formatter type="xml" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
73 <formatter type="plain" usefile="no" />
147
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
74 <sysproperty key="hg4j.tests.repos" value="${test-repos-root}"/>
144
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
75 <test name="org.tmatesoft.hg.test.TestHistory" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
76 <test name="org.tmatesoft.hg.test.TestManifest" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
77 <test name="org.tmatesoft.hg.test.TestStatus" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
78 <test name="org.tmatesoft.hg.test.TestStorePath" />
101
777ab7034c1b Switch to JUnit for tests
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 86
diff changeset
79 </junit>
70
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
80 </target>
6
5abe5af181bd Ant script to build commands and run sample
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
81
144
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
82 <target name="build">
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
83 <mkdir dir="bin" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
84 <javac srcdir="src" destdir="bin" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
85 <jar destfile="${hg4j.jar}">
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
86 <fileset dir="bin/">
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
87 <include name="org/tmatesoft/hg/core/**" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
88 <include name="org/tmatesoft/hg/util/**" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
89 <include name="org/tmatesoft/hg/repo/**" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
90 <include name="org/tmatesoft/hg/internal/**" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
91 </fileset>
147
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
92 <fileset file="COPYING"/>
144
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
93 </jar>
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
94 </target>
70
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
95
144
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
96 <target name="build-tests" depends="build">
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
97 <mkdir dir="bin" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
98 <javac srcdir="test" destdir="bin" />
147
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
99 <jar destfile="${hg4j-tests.jar}">
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
100 <fileset dir="bin" includes="org/tmatesoft/hg/test/**"/>
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
101 <fileset file="COPYING"/>
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
102 </jar>
144
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
103 </target>
70
993f6f8e1314 Test for log command
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 9
diff changeset
104
144
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
105 <target name="build-cmdline" depends="build">
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
106 <mkdir dir="bin" />
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
107 <javac srcdir="cmdline" destdir="bin" />
147
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
108 <jar destfile="${hg4j-console.jar}">
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
109 <fileset dir="bin/" includes="org/tmatesoft/hg/console/**"/>
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
110 <fileset file="COPYING"/>
a05145db4d0c Bring test repos along with us to recreate testbench
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 144
diff changeset
111 </jar>
144
44185c4a850c Samples updated
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents: 105
diff changeset
112 </target>
6
5abe5af181bd Ant script to build commands and run sample
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
113
5abe5af181bd Ant script to build commands and run sample
Artem Tikhomirov <tikhomirov.artem@gmail.com>
parents:
diff changeset
114 </project>