-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
117 lines (100 loc) · 3.59 KB
/
build.xml
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
<?xml version="1.0"?>
<!--
Copyright 2011 Paul Walker <[email protected]>
This file is part of JCaseChanger.
JCaseChanger is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
JCaseChanger is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with JCaseChanger. If not, see <http://www.gnu.org/licenses/>.
-->
<!--
Author: Paul Walker
Version: $Revision$
-->
<project default="dist" name="JCaseChanger">
<description>"Change Text Case"</description>
<target name="init">
<!-- Use this file if you want to overwrite any of the default properties locally-->
<property file="build.properties"/>
<property name="srcDir" location="src\main" />
<property name="srcTst" location="src\test" />
<property name="buildDir" location="bin" />
<property name="distDir" location="dist" />
<property name="docDir" location="doc" />
<property name="apiDir" location="doc\api" />
<property name="encoding" value="UTF8" />
<property name="compilerargs" value="-Xlint" />
<property name="mainClass" value="net.sourceforge.jcasechanger.JCaseChanger" />
<path id="classpath.test">
<pathelement location="${buildDir}" />
</path>
</target>
<target name="clean" depends="init">
<delete dir="${buildDir}" />
<delete dir="${distDir}" />
<delete dir="${apiDir}" />
<mkdir dir="${buildDir}" />
<mkdir dir="${distDir}" />
<mkdir dir="${apiDir}" />
</target>
<target name="compile" depends="clean">
<javac srcdir="${srcDir}:${srcTst}"
destdir="${buildDir}"
encoding="${encoding}"
debug="true" debuglevel="lines, vars, and source">
<compilerarg value="${compilerargs}" />
</javac>
</target>
<target name="javadoc" depends="compile">
<javadoc access="package"
author="true"
classpath="."
destdir="${apiDir}"
doctitle="JCaseChanger"
nodeprecated="false"
nodeprecatedlist="false"
noindex="false"
nonavbar="false"
notree="false"
overview="${srcDir}\overview.html"
source="1.6"
sourcepath="${srcDir}"
splitindex="true"
use="true"
version="true"
Windowtitle="JCaseChanger API" />
</target>
<target name="dist" depends="compile,junit,javadoc">
<jar destfile="${distDir}/JCaseChanger.jar" basedir="${buildDir}">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="${mainClass}" />
</manifest>
</jar>
<copy file="${docDir}/Readme (Release).txt" tofile="${distDir}/Readme.txt" />
</target>
<target name="junit" depends="compile">
<mkdir dir="tmp/rawtestoutput"/>
<junit printsummary="true" failureproperty="junit.failure">
<formatter type="xml"/>
<classpath refid="classpath.test"/>
<batchtest fork="no" todir="tmp/rawtestoutput">
<fileset dir="${srcTst}">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
<junitreport todir="tmp">
<fileset dir="tmp/rawtestoutput"/>
<report todir="test-reports"/>
</junitreport>
<!--<delete dir="tmp" />-->
<fail if="junit.failure" message="Unit test(s) failed. See reports!"/>
</target>
</project>