File: build.xml

package info (click to toggle)
jheatchart 0.6-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 316 kB
  • sloc: java: 641; xml: 55; makefile: 3
file content (93 lines) | stat: -rw-r--r-- 3,525 bytes parent folder | download | duplicates (2)
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
<project name="JHeatChart" default="dist" basedir=".">
    <description>
    	JHeatChart is a Java library for generating heat map charts.
    </description>
  
	<!-- set global properties for this build -->
	<property name="version" value="0.6"/>

	<property name="src" location="src"/>
	<property name="dists" location="dist"/>
    <property name="dist" location="${dists}/jheatchart-${version}"/>
	<property name="distsrc" location="${dist}/src"/>
	<property name="bin" location="${dist}/bin"/>
	<property name="javadoc" location="${dist}/javadoc"/>
	
<!-- Initialise -->
    <target name="init">
        <!-- Create the time stamp -->
        <tstamp/>
    	
        <!-- Create the distribution directory -->
        <mkdir dir="${dist}"/>
    </target>

<!-- Compile source into bin. -->
    <target name="compile" depends="init" description="compile the source">
        <!-- Create the build directory structure used by compile -->
        <mkdir dir="${bin}"/>
    	
        <!-- Compile the java code from ${src} into ${bin} -->
        <javac srcdir="${src}" destdir="${bin}"/>
    </target>

<!-- Run JUnit tests. -->
    <target name="unittest" depends="compile" description="run the unit tests">
    	   
    </target>
	
<!-- Package class files into Jar -->
	<target name="package" depends="compile" description="package class files into a Jar">
        <!-- Put everything in ${bin} into the jheatchart-${version}.jar file -->
        <jar jarfile="${dist}/jheatchart-${version}.jar" basedir="${bin}"/>
	</target>

<!-- Generate JavaDoc. -->
    <target name="javadoc" description="generate javadoc documentation">
    	<mkdir dir="${javadoc}"/>
    	
    	<javadoc packagenames="org.tc33.jheatchart.*"
    	           sourcepath="${src}"
    	           defaultexcludes="yes"
    	           destdir="${javadoc}"
    	           author="true"
    	           version="true"
    	           use="true"
    	           windowtitle="JHeatChart ${version}">
    	    <bottom><![CDATA[<i>Copyright &#169; 2009 Tom Castle. All Rights Reserved.</i>]]></bottom>
    	  </javadoc>
    </target>
	
<!-- Generate distribution -->
    <target name="dist" depends="package,javadoc" description="generate the distribution">    	
    	<!-- Put a copy of the LICENSE and README in the dist directory. -->
    	<copy file="LICENSE" tofile="${dist}/LICENSE"/>
    	<copy file="README" tofile="${dist}/README"/>
    	
    	<!-- Update README template to correct version number. -->
    	<replace file="${dist}/README" token="$${version}" value="${version}" />
    	
    	<!-- Copy the src into the dist directory. -->
    	<mkdir dir="${distsrc}"/>
    	<copy todir="${distsrc}">
    	    <fileset dir="${src}"/>
    	</copy>
    	
    	<!-- Generate the zip distributable. -->
    	<zip basedir="${dist}" destfile="${dists}/jheatchart-${version}.zip"/>
    	
    	<!-- Generate the tar.gz distributable. -->
    	<tar basedir="${dist}" destfile="${dist}/jheatchart-${version}.tar"/>
    	<gzip src="${dist}/jheatchart-${version}.tar" destfile="${dists}/jheatchart-${version}.tar.gz"/>
    	<delete file="${dist}/jheatchart-${version}.tar"/>
    	
    	<!-- Delete the bin directory -->
    	<delete dir="${bin}"/>
    </target>

<!-- Clean up after the build -->
    <target name="clean" description="clean up" >
        <!-- Delete the ${bin} and ${dist} directory trees -->
        <delete dir="${dist}"/>
    </target>
</project>