File: build.xml

package info (click to toggle)
josql 2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,056 kB
  • sloc: java: 18,525; xml: 180; makefile: 22
file content (238 lines) | stat: -rw-r--r-- 8,195 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
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!--
  The josql build file.
-->

<project default="createJar" basedir=".">
  
  <property name="pathStart" value="e:" />
  <property name="projectName" value="JoSQL" />
  <property name="currVersion" value="2.2" />
  <property name="buildDir" value="./build" />
  <property name="srcDir" value="./src" />
  <property name="jarName" value="${projectName}-${currVersion}.jar" />
  <property name="docsDir" value="./docs" />
  <property name="jars" value="./3rd-party-jars/gentlyWEB-utils-1.1.jar" />
  <property name="binDistTarFileName" value="${projectName}-bin-stable-${currVersion}.tar" />
  <property name="docsDistTarFileName" value="${projectName}-docs-stable-${currVersion}.tar" />
  <property name="docsDistZipFileName" value="${docsDistTarFileName}.gz" />
  <property name="binDistZipFileName" value="${binDistTarFileName}.gz" />
  <property name="binSrcDistTarFileName" value="${projectName}-src-stable-${currVersion}.tar" />
  <property name="binSrcDistZipFileName" value="${binSrcDistTarFileName}.gz" />
  <property name="binGuiSrcDistTarFileName" value="${projectName}-gui-src-stable-${currVersion}.tar" />
  <property name="binGuiSrcDistZipFileName" value="${binGuiSrcDistTarFileName}.gz" />
  <property name="docsDistZipFileName" value="${docsDistTarFileName}.gz" />
  <property name="year" value="2010"/>
  <property name="packages" value="org.josql.*"/>
  <property name="contrib-jars" value="${pathStart}/java/jars/jasperreports-0.6.6.jar:${pathStart}/java/jars/jdom-1.0.jar:${pathStart}/java/jfreechart/jfreechart-1.0.0/lib/jfreechart-1.0.0.jar:${pathStart}/java/jars/ant-1.6.5.jar:${pathStart}/java/jars/jsp-api.jar:${pathStart}/java/jars/velocity-tools-1.4.jar" />

  <target name="init">

    <mkdir dir="${buildDir}" />
    <mkdir dir="${srcDir}" />
    <tstamp>
      <format property="TODAY" pattern="dd/MMM/yy" />
    </tstamp>

  </target>

  <target name="cleanDocs">
  </target>

  <target name="cleanBuild">
    <delete dir="${buildDir}" />
  </target>

  <target name="javacc" depends="init">
    <javacc target="data/josql.jj"
	    javacchome="/usr/share/java/"
            outputdirectory="src/org/josql/parser" />
  </target>

  <target name="createJar" depends="fullCompile">
    <property name="title" value="JoSQL - SQL for Java Objects" />
    <property name="package" value="org/josql" />

    <copy file="data/josql-taglib.tld"
          tofile="taglib.tld" />

    <jar destfile="${jarName}" 
         basedir="${buildDir}">
      <metainf file="taglib.tld" />
      <manifest>
        <attribute name="Built-By" value="${projectName}.sourceforge.net" />

        <section name="${package}">
          <attribute name="Implementation-Title" value="${title}" />
          <attribute name="Implementation-Vendor" value="${projectName}.sourceforge.net" />
          <attribute name="Implementation-Version" value="${currVersion} (${TODAY})" />
        </section>
      </manifest>
    </jar>

    <delete file="taglib.tld" />
  </target>
  
  <target name="fullCompile" depends="cleanBuild, init">
    <antcall target="compile" />
  </target>

  <target name="compile" depends="init">
    <javac srcdir="${srcDir}"
           destdir="${buildDir}"
           debug="on"
           deprecation="on"
           nowarn="on"
           excludes="**/cvs/**,**/gui/**,**/contrib/**">
      <classpath path="${jars}" />
    </javac>
           
  </target>

  <target name="compile-contrib" depends="init">
    <javac srcdir="${srcDir}"
           destdir="${buildDir}"
           debug="on"
           deprecation="on"
           nowarn="on"
           includes="**/contrib/**"
           excludes="**/cvs/**,**/gui/**">
      <classpath path="$(jarName};${jars};${contrib-jars}" />
    </javac>
           
  </target>

  <target name="fullCompileGUI" depends="cleanBuild, init">
    <antcall target="compileGUI" />
  </target>

  <target name="compileGUI" depends="init">
    <javac srcdir="${srcDir}"
           destdir="${buildDir}"
           debug="on"
           deprecation="on"
           excludes="**/cvs/**"
           includes="**/gui/**">
      <classpath path="${jars};${pathStart}/java/jars/gentlyWEB.jar;${pathStart}/java/jars/jdom-1.0.jar;${pathStart}/java/jars/looks-all.jar;${pathStart}/java/jars/looks-win.jar;${pathStart}/java/jars/forms-1.0.5.jar;${pathStart}/java/jars/plastic.jar" />
    </javac>
           
  </target>

  <!--
    A target for creating the javadocs for the code.
  -->
  <target name="javadoc" depends="init,fullCompile">

    <delete dir="${docsDir}" />
    <mkdir dir="${docsDir}" />

    <javadoc destdir="${docsDir}"
             sourcepath="${srcDir}"
             packagenames="${packages}"
             failonerror="true"
             windowtitle="${projectName} ${currVersion} - SQL for Java Objects"
             use="true"
             doctitle="${projectName} ${currVersion}"
             private="false"
             stylesheetfile="data/javadocsStyle.css"
             noindex="false"
             splitindex="true"
             bottom="&lt;center>&lt;dd>&lt;a href='http://sourceforge.net'>&lt;img border='0' height='31' width='88' title='SourceForge' src='http://sourceforge.net/sflogo.php?group_id=josql&amp;type=1' />&amp;#160;&amp;#160;&lt;/a>Copyright &amp;#169; ${year} Gary Bentley. All Rights Reserved.&lt;/dd>&lt;/center>"
             classpath="${jars}">

       <link href="/usr/share/doc/default-jdk-doc/api" />
    </javadoc>
  </target>

  <!--
    Create the "distribution" tar/gzip file.
  -->
  <target name="create-bin-dist" depends="createJar">

    <!--
      Remove any old dist file.
    -->
    <delete file="${binDistTarFileName}" />
    <delete file="${binDistZipFileName}" />

    <tar destfile="${binDistTarFileName}">
      <tarfileset dir="."
                  prefix="${projectName}-${currVersion}"
                  includes="3rd-party-jars/*.jar,JoSQL-${currVersion}.jar,LICENSE-2.0.txt,README,build.xml" />
    </tar>

    <gzip zipfile="${binDistZipFileName}"
          src="${binDistTarFileName}" />

    <delete file="${binDistTarFileName}" />

  </target> 

  <target name="create-src-dist" depends="createJar">

    <!--
      Remove any old dist file.
    -->
    <delete file="${binSrcDistTarFileName}" />
    <delete file="${binSrcDistZipFileName}" />

    <tar destfile="${binSrcDistTarFileName}">
      <tarfileset dir="."
                  prefix="${projectName}-${currVersion}"
                  includes="3rd-party-jars/*.jar,JoSQL-${currVersion}.jar,LICENSE-2.0.txt,README,build.xml,src/**/*.java,data/**" />
    </tar>

    <gzip zipfile="${binSrcDistZipFileName}"
          src="${binSrcDistTarFileName}" />

    <delete file="${binSrcDistTarFileName}" />

  </target> 

  <target name="create-docs-dist" depends="javadoc">

    <delete file="${docsDistTarFileName}" />
    <delete file="${docsDistZipFileName}" />

    <tar destfile="${docsDistTarFileName}">
      <tarfileset dir="docs"
                  prefix="${projectName}-${currVersion}/javadocs" />
      <tarfileset dir="../josql-site"
                  prefix="${projectName}-${currVersion}" />
    </tar>

    <gzip zipfile="${docsDistZipFileName}"
          src="${docsDistTarFileName}" />

    <delete file="${docsDistTarFileName}" />

  </target> 

  <target name="generalReplace">
    <replace dir="src"
             token="2004-2005"
             value="2004-2007"
             summary="yes" />
  </target>

  <target name="compileTest" depends="init">
    <javac srcdir="."
           destdir="."
           debug="on"
           deprecation="on"
           nowarn="on"
           includes="Test.java"
           excludes="**/cvs/**,**/gui/**">
      <classpath path="${jars}:${jarName}" />
    </javac>
           
  </target>

  <target name="execTest">
    <java classname="Test" 
          maxmemory="128m"
          fork="yes">
      <classpath path="${jarName}:./3rd-party-jars/gentlyWEB-utils-1.1.jar:." />
    </java>
  </target>

</project>