[go: up one dir, main page]

Menu

[r4]: / trunk / build.xml  Maximize  Restore  History

Download this file

164 lines (138 with data), 5.0 kB

  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
<?xml version="1.0"?>
<!-- $Date$ $Rev$ $URL$ -->
<!--
Treecster - an enterprise configuration framework, see http://treecster.sourceforge.net
Copyright (C) 2011 APP Design, Inc.
This program 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.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project name="treecster" default="dist" basedir=".">
<property file="build.properties"/>
<property environment="env."/>
<tstamp>
<format property="time.long" pattern="MM/dd/yyyy HH:mm:ss"/>
</tstamp>
<tstamp>
<format property="time.short" pattern="yyyy-MM-dd-HH-mm-ss"/>
</tstamp>
<target name="clean" description="Remove all the temp stuff">
<!-- Remove transients -->
<delete dir="${build}" quiet="true"/>
<delete quiet="true" includeemptydirs="true">
<fileset file="${treecster.lib}"/>
<fileset file="${treecster.src}"/>
<fileset dir="${basedir}">
<!-- Our log files -->
<include name="**/*.log"/>
<!-- JUnit's log files -->
<include name="**/TEST-*.txt"/>
</fileset>
</delete>
</target>
<target name="compile" description="Compile the sources">
<mkdir dir="${build}"/>
<path id="tools.classpath">
<pathelement location="${junit.lib}"/>
<pathelement location="${configuration.lib}"/>
<pathelement location="${log4j.lib}"/>
<pathelement location="${lang.lib}"/>
</path>
<javac
destdir ="${build}"
includeAntRuntime ="no"
debug ="${debug}"
optimize ="${optimize}"
>
<classpath>
<path refid="tools.classpath" />
</classpath>
<src path="${src}"/>
</javac>
<!-- Main jar file -->
<jar jarfile="${treecster.lib}" index="on">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<section name="common">
<attribute name="Implementation-Title" value="${app.name}"/>
<attribute name="Implementation-Version" value="${app.version}"/>
<attribute name="Implementation-Vendor" value="${app.vendor}"/>
<attribute name="Built-On" value="${time.long}"/>
</section>
</manifest>
<fileset dir="${build}" casesensitive="true">
<include name="com/**"/>
</fileset>
</jar>
</target>
<target name="dist" description="Produce distributables" depends="clean">
<antcall target="compile">
<param name="optimize" value="true"/>
<param name="debug" value="no"/>
</antcall>
<antcall target="javadoc"/>
<!-- Source distribution jar file -->
<jar jarfile="${treecster.src}" index="off">
<fileset dir="${basedir}" casesensitive="true">
<include name="${src}/**"/>
<include name="${lib}/**"/>
<include name="${doc}/**"/>
<include name="${examples}/**"/>
<include name="build.*"/>
<include name="COPYING"/>
</fileset>
</jar>
</target>
<target name="javadoc" depends="compile">
<delete dir="${doc}" quiet="true"/>
<mkdir dir="${doc}"/>
<javadoc
destdir="${doc}"
author="true"
version="true"
use="true"
maxmemory="256M"
private="on"
source="1.6"
breakiterator="true"
useexternalfile="true"
linksource="true"
packagenames="*"
>
<classpath>
<path refid="tools.classpath" />
<pathelement location="${treecster.lib}"/>
</classpath>
<packageset dir="${src}">
<include name="**"/>
</packageset>
<doctitle><![CDATA[<h1>Treecster API</h1>]]></doctitle>
<bottom><![CDATA[<i>Ver. ${app.version}. Built on ${time.long}. Copyright &#169; APP Design, Inc. All Rights Reserved.</i>]]></bottom>
</javadoc>
</target>
<target name="test" depends="compile" description="Run tests">
<junit
printsummary = "withOutAndErr"
haltonfailure = "yes"
fork = "yes"
dir = "${basedir}"
filtertrace = "yes"
newenvironment = "yes"
>
<classpath>
<path refid="tools.classpath" />
<pathelement location="${treecster.lib}"/>
</classpath>
<jvmarg value="-Dlog4j.configuration=file:${basedir}/log4j.properties"/>
<formatter type="plain"/>
<test name="com.treecster.junit.Test" todir="${basedir}"/>
</junit>
</target>
</project>