File: build.xml

package info (click to toggle)
statcvs 1%3A0.7.0.dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,708 kB
  • ctags: 1,988
  • sloc: java: 10,471; xml: 4,365; sh: 47; makefile: 19
file content (209 lines) | stat: -rw-r--r-- 9,041 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="statcvs" default="jar" basedir=".">
  <property file="project.properties" />
  <property name="project" value="statcvs" />
  <property name="project.path" value="net/sf/statcvs" />
  <property name="project.package" value="net.sf.statcvs" />
  <property name="project.jar" value="statcvs.jar" />
  <property name="src" value="src" />
  <property name="src.tests" value="tests-src" />
  <property name="src.filtered" value="src-temp" />
  <property name="build" value="build" />
  <property name="build.tests" value="build-tests" />
  <property name="jfreechart.jar" value="jfreechart-1.0.13.jar" />
  <property name="jcommon.jar" value="jcommon-1.0.16.jar" />
  <property name="dist" value="dist" />
  <property name="lib" value="lib" />
  <property name="doc" value="doc" />
  <property name="stats" value="stats" />
  <property name="cvs.log" value="cvs.log" />
  <property environment="env" />
  <path id="project.class.path">
    <pathelement path="${java.class.path}" />
    <fileset dir="${lib}">
      <include name="**/*.jar" />
    </fileset>
  </path>
  <target name="clean">
    <!-- Delete all directory trees created by the build file -->
    <delete dir="${src.filtered}" failonerror="false" />
    <delete dir="${build}" failonerror="false" />
    <delete dir="${build.tests}" failonerror="false" />
    <delete dir="${project}" failonerror="false" />
    <delete dir="${dist}" failonerror="false" />
    <delete dir="${doc}" failonerror="false" />
    <delete dir="${stats}" failonerror="false" />
    <delete file="${cvs.log}" failonerror="false" />
  </target>
  <target name="init">
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}" />
  </target>
  <target name="filter">
    <delete dir="${src.filtered}" failonerror="false" />
    <copy todir="${src.filtered}">
      <fileset dir="${src}" includes="**/*.jar" />
    </copy>
    <copy todir="${src.filtered}">
      <fileset dir="${src}" excludes="**/*.png, **/*.jar" />
      <filterset>
        <filter token="VERSION" value="${statcvs.version}" />
      </filterset>
    </copy>
    <copy todir="${src.filtered}">
      <fileset dir="${src}" includes="**/*.png" />
    </copy>
  </target>
  <target name="compile" depends="init,filter">
    <!-- Compile the java code from ${src} into ${build} -->
    <javac srcdir="${src.filtered}" destdir="${build}" debug="on"
    source="1.4" target="1.4">
      <classpath refid="project.class.path" />
    </javac>
  </target>
  <target name="copyfiles" depends="init">
    <!-- Copies non-class files from source directory to
                        build directory -->
    <copy todir="${build}/${project.path}/">
      <fileset dir="${src.filtered}/${project.path}/">
        <include name="**/*.properties" />
        <include name="**/web-files/*" />
      </fileset>
    </copy>
  </target>
  <target name="run" depends="compile,copyfiles">
    <!-- Runs StatCVS on itself -->
    <java classname="${project.package}.Main" fork="yes">
      <arg line="-verbose -title StatCVS -output-dir ${stats} -notes etc/report-notes.txt -config-file statcvs.properties -viewcvs http://statcvs.cvs.sourceforge.net/statcvs/statcvs -tags 'v.*' -no-developer uid91994 ${cvs.log} ." />
      <classpath>
        <path refid="project.class.path" />
        <pathelement path="${build}" />
      </classpath>
    </java>
  </target>
  <target name="run.dump" depends="compile,copyfiles">
    <!-- Runs StatCVS on itself -->
    <java classname="${project.package}.Main" fork="yes">
      <arg line="-verbose -title StatCVS -output-dir ${stats} -notes etc/report-notes.txt -config-file statcvs.properties -viewcvs http://statcvs.cvs.sourceforge.net/statcvs/statcvs -tags 'v.*' -no-developer uid91994 ${cvs.log} ." />
      <classpath>
        <path refid="project.class.path" />
        <pathelement path="${build}" />
      </classpath>
    </java>
  </target>
  <target name="run.ant" depends="jar">
    <!-- Runs StatCVS on itself, via the Ant task -->
    <taskdef name="statcvs"
    classname="net.sf.statcvs.ant.StatCvsTask"
    classpath="${dist}/${project.jar}" />
    <statcvs title="StatCVS" outputDir="${stats}"
    notes="etc/report-notes.txt"
    viewcvs="http://statcvs.cvs.sourceforge.net/statcvs/statcvs"
    tags="v.*" nodeveloper="uid91994" log="${cvs.log}" path="." />
  </target>
  <target name="run.xml" depends="jar">
    <!-- Runs StatCVS on itself -->
    <java classname="${project.package}.Main" fork="yes">
      <arg line="-verbose -title StatCVS -output-dir ${stats} -notes etc/report-notes.txt -config-file statcvs.properties -viewcvs http://statcvs.cvs.sourceforge.net/statcvs/statcvs -xml -tags 'v.*' -no-developer uid91994 ${cvs.log} ." />
      <classpath>
        <path refid="project.class.path" />
        <pathelement path="${build}" />
      </classpath>
    </java>
  </target>
  <target name="init.tests">
    <!-- Create the build directory structure used by compile.tests -->
    <mkdir dir="${build.tests}" />
  </target>
  <target name="compile.tests" depends="init.tests,compile">
    <!-- Compile the unit tests from ${src.tests} into ${build.tests} -->
    <javac srcdir="${src.tests}" destdir="${build.tests}"
    debug="on" source="1.4" target="1.4">
      <classpath>
        <path refid="project.class.path" />
        <pathelement path="${build}" />
      </classpath>
    </javac>
  </target>
  <target name="copyfiles.tests" depends="init">
    <!-- Copies non-class files from source directory to
                        build directory -->
    <copy todir="${build.tests}/${project.path}/">
      <fileset dir="${src.tests}/${project.path}/">
        <include name="**/*.log" />
        <include name="**/*.log2" />
      </fileset>
    </copy>
  </target>
  <target name="test"
  depends="compile.tests,copyfiles,copyfiles.tests">
    <!-- Runs JUnit tests using the text-only TestRunner -->
    <java classname="junit.textui.TestRunner" fork="yes"
    failonerror="true">
      <arg value="${project.package}.AllTests" />
      <classpath>
        <path refid="project.class.path" />
        <pathelement path="${build}" />
        <pathelement path="${build.tests}" />
      </classpath>
    </java>
  </target>
  <target name="release" depends="clean,jar,javadoc,zip,zip.source"/>
  <target name="jar" depends="compile,copyfiles">
    <!-- Creates an executable jar file for the project -->
<!--     <unjar src="${lib}/${jfreechart.jar}" dest="${build}" /> -->
<!--     <unjar src="${lib}/${jcommon.jar}" dest="${build}" /> -->
<!--     <unjar src="${lib}/jdom.jar" dest="${build}" /> -->
    <mkdir dir="${dist}" />
    <jar jarfile="${dist}/${project.jar}" basedir="${build}">
      <manifest>
        <attribute name="Main-Class"
        value="${project.package}.Main" />
      </manifest>
    </jar>
  </target>
  <target name="zip" depends="jar">
    <zip destfile="${dist}/${project}-${statcvs.version}.zip">
      <zipfileset file="${dist}/${project.jar}"
      fullpath="${project}-${statcvs.version}/${project.jar}" />
      <zipfileset file="etc/README"
      fullpath="${project}-${statcvs.version}/readme.txt" />
    </zip>
  </target>
  <target name="zip.source" depends="clean">
    <mkdir dir="${dist}" />
    <zip destfile="${dist}/${project}-${statcvs.version}-source.zip">
      <zipfileset dir="." excludes="${dist}/**,target/**, classes/**, *.bak, test-src/**,test-cvs/**,build/**,build-tests/**,*.log"
      prefix="${project}-${statcvs.version}" />
    </zip>
  </target>
  <target name="javadoc" depends="filter">
    <!-- Creates javadoc documentation for the source
                        (but not for the tests) -->
    <delete dir="${doc}" />
    <mkdir dir="${doc}" />
    <javadoc packagenames="net.*" sourcepath="${src.filtered}"
    destdir="${doc}" classpathref="project.class.path"
    author="true" version="true" private="false" use="true"
    splitindex="true" windowtitle="${project}"
    doctitle="${project}">
      <link href="http://www.jfree.org/jfreechart/api/javadoc/" />
      <link href="http://java.sun.com/j2se/1.4.2/docs/api/" />
    </javadoc>
  </target>
  <target name="cvs.update">
    <!-- Updates from repository. Only works in a checked-out
                        repository with a working local CVS client
                        installation -->
    <cvs command="update -d" />
    <!-- Don't specify -P because we want to retain empty dirs
                        for the log -->
  </target>
  <target name="cvs.log">
    <!-- Saves a cvs log to disk. Only works in a checked-out
                        repository with a working local CVS client
                        installation -->
    <cvs command="log" output="${cvs.log}" />
  </target>
  <target name="all" depends="zip,javadoc,run" />
</project>