File: build.xml

package info (click to toggle)
libpixie-java 1%3A0.8.4-1
  • links: PTS
  • area: contrib
  • in suites: etch, etch-m68k
  • size: 1,000 kB
  • ctags: 2,695
  • sloc: java: 11,136; xml: 114; makefile: 16
file content (211 lines) | stat: -rw-r--r-- 7,107 bytes parent folder | download
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
210
211
<!--
<!DOCTYPE project PUBLIC "-//ANT//DTD project//EN" "ant.dtd">
-->
<!-- An ANT build file for Pixie                                     -->
<!-- Based on a script written by David Gilbert                      -->
<!--                                                                 -->
<!-- To run this script, you need to make sure the libraries used by -->
<!-- Pixie are copied to the ../lib directory (or edit the           -->
<!-- init-general task to point to the appropriate jar files).       -->
<!--                                                                 -->
<!-- This script will create temporary directories ../build and      -->
<!-- ../distribution, as working areas.  A ../javadoc directory will -->
<!-- be created for the Javadoc HTML pages.                          -->
<!--                                                                 -->
<!-- If you have comments about this script, please post a message   -->
<!-- in the Pixie forum.                                             -->

<project name="pixie" default="all" basedir="..">

  <target name="init">

    <dirname property="antfile.dir" file="${ant.file}"/>
    <property file="${antfile.dir}/build.properties"/>

  </target>

  <target name="compile" depends="init">
    <echo>Building Pixie</echo>

    <!-- create a temp build directory -->
    <mkdir dir="build"/>

    <!-- compile the source -->
    <javac srcdir="source"
      destdir="build" target="${build.target}"
      deprecation="${build.deprecation}" debug="${build.debug}" optimize="${build.optimize}">
      <include name="org/jfree/pixie/**"/>
	  <exclude name="org/jfree/pixie/g2recorder/**"/>
      <classpath>
        <pathelement location="${libdir}/${jcommon-jar-file}"/>
      </classpath>
    </javac>

    <!-- include the resource files -->
    <copy todir="build">
      <fileset dir="source">
        <include name="**/*.xml"/>
        <include name="**/*.jpg"/>
        <include name="**/*.gif"/>
        <include name="**/*.png"/>
        <include name="**/*.properties"/>
      </fileset>
    </copy>

    <!-- make the jar -->
    <jar jarfile="${pixie-jar-file}"
      basedir="build">
      <manifest>
        <attribute name="Class-Path" value="${manifest-lib-prefix}/${jcommon-jar-file}"/>
      </manifest>
    </jar>

    <!-- delete the temp directory -->
    <delete dir="build"/>
  </target>

  <!-- Generate the Pixie JavaDoc HTML pages -->
  <!-- Dont expect too much yet, as most classes are still undocumented -->
  <target name="javadoc" depends="init">
    <delete dir="javadoc"/>
    <mkdir dir="javadoc"/>
    <javadoc destdir="javadoc"
      windowtitle="Pixie Library"
      overview="source/overview.html">
      <packageset dir="source" defaultexcludes="yes">
        <include name="org/jfree/pixie/**"/>
      </packageset>
      <classpath>
        <pathelement location="${libdir}/${jcommon-jar-file}"/>
      </classpath>
    </javadoc>
  </target>

  <!-- Make .zip distribution for Pixie -->
  <!-- as an separate download -->
  <target name="make-zip" depends="compile">

    <!-- make a temporary distribution directory -->
    <mkdir dir="distribution"/>

    <!-- copy across README -->
    <copy file="README" tofile="distribution/README"/>

    <!-- copy across Licences -->
    <copy file="licence-LGPL.txt" tofile="distribution/Licence"/>

    <!-- copy across ChangeLog -->
    <copy file="ChangeLog" tofile="distribution/ChangeLog"/>

    <!-- copy across runtime jar file -->
    <copy file="${pixie-jar-file}" tofile="distribution/${pixie-jar-file}"/>

    <!-- copy across source files -->
    <copy todir="distribution/source">
      <fileset dir="source"/>
    </copy>

    <!-- copy across lib files -->
    <copy todir="distribution/lib">
      <fileset dir="lib"/>
    </copy>

    <!-- copy across ant build file (this file) -->
    <copy todir="distribution/ant">
      <fileset dir="ant"/>
    </copy>

    <!-- convert end-of-line characters in text files -->
    <!-- end of file does not need to be marked, and causes trouble if it is -->
    <fixcrlf srcdir="distribution/source"
      eol="crlf" eof="remove"
      excludes="**/*.jpg **/*.gif **/*.png **/*.wmf"/>
    <fixcrlf srcdir="distribution/ant"
      eol="crlf" eof="remove"/>

    <!-- make the zip file -->
    <zip zipfile="${pixie.name}-${pixie.version}.zip">
      <zipfileset dir="distribution"
        prefix="${pixie.name}-${pixie.version}"/>
    </zip>

    <!-- delete the temporary distribution directory -->
    <delete dir="distribution"/>

  </target>

  <!-- Make .tar.gz distribution for Pixie -->
  <!-- the war file is not included, as it can be rebuild easily and is also available -->
  <!-- as an separate download -->
  <target name="make-targz" depends="compile">

    <!-- make a temporary distribution directory -->
    <mkdir dir="distribution"/>

    <!-- copy across README -->
    <copy file="README" tofile="distribution/README"/>

    <!-- copy across Licences -->
    <copy file="licence-LGPL.txt" tofile="distribution/Licence"/>

    <!-- copy across ChangeLog -->
    <copy file="ChangeLog" tofile="distribution/ChangeLog"/>

    <!-- copy across runtime jar file -->
    <copy file="${pixie-jar-file}" tofile="distribution/${pixie-jar-file}"/>

    <!-- copy across source files -->
    <copy todir="distribution/source">
      <fileset dir="source"/>
    </copy>

    <!-- copy across lib files -->
    <copy todir="distribution/lib">
      <fileset dir="lib"/>
    </copy>

    <!-- copy across ant build file (this file) -->
    <copy todir="distribution/ant">
      <fileset dir="ant"/>
    </copy>

    <!-- convert end-of-line characters in text files -->
    <fixcrlf srcdir="distribution/source"
      eol="lf" eof="remove"
      excludes="**/*.jpg **/*.gif **/*.png **/*.wmf"/>
    <fixcrlf srcdir="distribution/ant"
      eol="lf" eof="remove"/>

    <!-- make the tar.gz file -->
    <tar tarfile="${pixie.name}-${pixie.version}.tar">
      <tarfileset dir="distribution"
        prefix="${pixie.name}-${pixie.version}"/>
    </tar>
    <gzip zipfile="${pixie.name}-${pixie.version}.tar.gz"
      src="${pixie.name}-${pixie.version}.tar"/>
    <delete file="${pixie.name}-${pixie.version}.tar"/>

    <!-- delete the temporary distribution directory -->
    <delete dir="distribution"/>

  </target>

  <target name="maven-bundle" depends="compile" >
    <!-- make a temporary distribution directory -->
    <mkdir dir="distribution"/>
    <!-- copy across Licences -->
    <copy file="licence-LGPL.txt" tofile="distribution/LICENSE.txt"/>
    <copy file="maven-pixie-project.xml" tofile="distribution/project.xml"/>
    <copy file="maven-pixie-project.xml" tofile="distribution/project.xml"/>
    <copy file="${pixie-jar-file}" tofile="distribution/${pixie-jar-file}"/>

    <!-- make the jar -->
    <jar jarfile="${pixie-bundle-file}" basedir="distribution"/>

    <!-- delete the temporary distribution directory -->
    <delete dir="distribution"/>
  </target>

  <target name="all" depends="init, compile, javadoc, make-zip, make-targz, maven-bundle"/>
</project>