/[pdpsoft]/branches/nl.nikhef.jgridstart-flyingsaucer/nl.nikhef.jgridstart/build.xml
ViewVC logotype

Annotation of /branches/nl.nikhef.jgridstart-flyingsaucer/nl.nikhef.jgridstart/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 599 - (hide annotations) (download)
Tue Jul 28 16:39:18 2009 UTC (12 years, 5 months ago) by wvengen
File MIME type: text/plain
File size: 13171 byte(s)
sigh, forgot another buildfile rename :/
1 wvengen 178 <?xml version="1.0" encoding="utf-8"?>
2     <project name="jgridstart" default="compile">
3     <description>jGridStart build file</description>
4    
5     <!--
6     - Property definitions
7     -->
8 wvengen 183 <!-- display name -->
9 wvengen 178 <property name="target.title" value="jGridStart"/>
10 wvengen 183 <!-- internal name -->
11 wvengen 178 <property name="target.name" value="${ant.project.name}"/>
12 wvengen 183 <!-- the program's version -->
13 wvengen 178 <property name="target.version" value="0.0.3"/>
14 wvengen 183 <!-- main class to execute -->
15 wvengen 178 <property name="target.main" value="nl.nikhef.jgridstart.gui.Main"/>
16 wvengen 183 <!-- java virtual machine version to compile for -->
17 wvengen 178 <property name="target.jvmversion" value="1.5"/>
18    
19 wvengen 183 <!-- Java Web Start base url (for use in JNLP files) -->
20 wvengen 561 <property name="wwwbase" value="http://www.nikhef.nl/~wvengen/jgridstart-devel/"/>
21 wvengen 178
22 wvengen 183 <!-- location of source files -->
23     <property name="dir.src" location="src"/>
24     <!-- location of compiled classes -->
25     <property name="dir.build" location="bin"/>
26     <!-- location of output files for deployment -->
27     <property name="dir.dist" location="deployment"/>
28     <!-- location of thirdparty libraries -->
29     <property name="dir.thirdparty" location="thirdparty"/>
30 wvengen 487 <!-- location of javadoc output -->
31     <property name="dir.javadoc" location="doc"/>
32 wvengen 514 <!-- location of junit test output -->
33     <property name="dir.testreports" location="testreports"/>
34 wvengen 183
35 wvengen 464 <!-- extra tool definitions -->
36     <property name="browsertool.target.name" value="browsertool"/>
37     <property name="browsertool.target.main" value="nl.nikhef.jgridstart.install.BrowserTool"/>
38    
39 wvengen 183 <!-- reference to property file defining the properties
40     - keystore.file java keystore file
41     - keystore.passwd password for accessing the java keystore
42     - keystore.alias alias pointing to certificate to sign with
43     - if the property file cannot be found or does not define a keystore.file
44     - that points to a file, a self-signed certificate is generated so you can
45     - get started easily. For production, of course, you'll need your own
46     - secure certificate that users can trust.
47     - An example keystore.properties could be as follows:
48     - keystore.file = ${dir.keystore}/keystore.ks
49     - keystore.alias = default
50     - keystore.passwd = mysecret
51     -->
52 wvengen 178 <property name="dir.keystore" location=".."/>
53     <property file="${dir.keystore}/keystore.properties"/>
54 wvengen 183
55 wvengen 250 <!--
56     - dependencies
57     -->
58    
59 wvengen 400 <property name="dep.bouncycastle" location="${dir.thirdparty}/bouncycastle/bcprov-jdk14-143.jar"/>
60     <property name="dep.bouncycastle.smime" location="${dir.thirdparty}/bouncycastle/bcmail-jdk14-143.jar"/>
61 wvengen 553 <property name="dep.javamail" location="${dir.thirdparty}/bouncycastle/mail-1.4.1.jar"/>
62 wvengen 595 <property name="dep.commons-cli" location="${dir.thirdparty}/commons/commons-cli-1.2.jar"/>
63     <property name="dep.commons-lang" location="${dir.thirdparty}/commons/commons-lang-2.4.jar"/>
64 wvengen 180 <property name="dep.junit" location="${dir.thirdparty}/junit/junit-4.5.jar"/>
65 wvengen 364 <property name="dep.abbot" location="${dir.thirdparty}/junit/abbot.jar"/>
66 wvengen 250 <property name="dep.swingworker" location="${dir.thirdparty}/swingworker/swing-worker-1.2.jar"/>
67 wvengen 196 <property name="dep.xhtmlrenderer" location="${dir.thirdparty}/flyingsaucer/core-renderer-minimal.jar"/>
68 wvengen 253 <property name="dep.itext" location="${dir.thirdparty}/flyingsaucer/iText-2.0.8.jar"/>
69 wvengen 444 <property name="dep.winregistry" location="${dir.thirdparty}/winregistry/WinRegistry-3.4.jar"/>
70 wvengen 487 <property name="dep.apiviz" location="${dir.thirdparty}/javadoc/apiviz-1.3.0.GA.jar"/>
71 wvengen 555 <!-- activation framework is present in Java 1.6 and we don't use
72     it apart for resolving; so we can omit it when compiling there
73 wvengen 557 to avoid ProGuard Warnings (which are fatal); so we need it for
74     lower versions. This is a little trick with ProGuard's jarfilter -->
75     <property name="dep.activation" location="${dir.thirdparty}/bouncycastle/activation.jar"/>
76     <condition property="dep.activation.proguardfilter" value="(!**)">
77 wvengen 562 <available classname="javax.activation.DataHandler"/>
78 wvengen 555 </condition>
79 wvengen 178 <path id="path.dependencies">
80     <!-- TODO use jdk13 library versions and test -->
81     <pathelement location="${dep.bouncycastle}"/>
82 wvengen 553 <pathelement location="${dep.bouncycastle.smime}"/>
83     <pathelement location="${dep.javamail}"/>
84 wvengen 595 <pathelement location="${dep.commons-lang}"/>
85     <pathelement location="${dep.commons-cli}"/>
86 wvengen 180 <pathelement location="${dep.junit}"/>
87 wvengen 364 <pathelement location="${dep.abbot}"/>
88 wvengen 250 <pathelement location="${dep.swingworker}"/> <!-- for java1.5 and below -->
89 wvengen 196 <pathelement location="${dep.xhtmlrenderer}"/>
90 wvengen 553 <pathelement location="${dep.itext}"/>
91 wvengen 444 <pathelement location="${dep.winregistry}"/>
92 wvengen 178 </path>
93 wvengen 595
94 wvengen 597 <patternset id="distfiles">
95 wvengen 595 <!-- exclude non-production files -->
96     <exclude name="**/test*"/>
97     <exclude name="**/*test/**"/>
98     <exclude name="**/*tests/**"/>
99     <exclude name="**/package.html"/>
100     <exclude name="**/*Test.class"/>
101     <exclude name="**/*Test$*.class"/>
102     <exclude name="**/AllTests.class"/>
103     <exclude name="**/AllTests$*.class"/>
104     <exclude name="**/CVS"/>
105     <exclude name="**/.svn"/>
106 wvengen 597 </patternset>
107 wvengen 178
108     <!--
109     - Initialisation and other setup
110     -->
111 wvengen 183
112     <!-- keystore; create one if not supplied -->
113     <available file="${keystore.file}" type="file" property="keystore.available"/>
114     <target name="keystore" unless="keystore.available">
115     <tempfile property="keystore.file" prefix="keystore" suffix=".ks"/>
116     <property name="keystore.tempfile" value="${keystore.file}"/>
117     <property name="keystore.alias" value="default"/>
118     <property name="keystore.passwd" value="xyz12345"/>
119     <genkey alias="${keystore.alias}" storepass="${keystore.passwd}" keystore="${keystore.file}"
120     validity="1" dname="CN=Test, OU=Test, O=Test, C=Test"/>
121     </target>
122    
123     <!-- proguard -->
124 wvengen 178 <taskdef resource="proguard/ant/task.properties"
125     classpath="${dir.thirdparty}/proguard/proguard.jar"/>
126    
127 wvengen 183 <!-- timestamp -->
128 wvengen 178 <target name="init">
129     <tstamp/>
130     </target>
131    
132     <!--
133     - Compilation target
134     -->
135     <target name="compile" depends="init">
136     <mkdir dir="${dir.build}"/>
137     <!-- compile java sources -->
138     <javac srcdir="${dir.src}" destdir="${dir.build}" target="${target.jvmversion}">
139     <classpath refid="path.dependencies" />
140     </javac>
141     <!-- and copy resources; skip VCS dirs (and other hidden .*) -->
142     <copy todir="${dir.build}">
143     <fileset dir="${dir.src}">
144     <exclude name="**/*.java"/>
145     <exclude name="**/CVS"/>
146     <exclude name="**/.*"/>
147     </fileset>
148     </copy>
149     </target>
150 wvengen 557
151 wvengen 178 <!--
152 wvengen 557 - Full JAR creation target
153 wvengen 178 -->
154 wvengen 557 <target name="jar.large" depends="compile">
155 wvengen 390 <basename property="dep.bouncycastle.basename" file="${dep.bouncycastle}"/>
156 wvengen 178 <jar jarfile="${dir.dist}/${target.name}.large.jar">
157     <manifest>
158     <attribute name="Built-By" value="${user.name}"/>
159     <attribute name="Main-Class" value="${target.main}"/>
160 wvengen 390 <attribute name="Class-Path" value="${dep.bouncycastle.basename}"/>
161 wvengen 178 </manifest>
162 wvengen 597 <fileset dir="${dir.build}">
163     <patternset refid="distfiles"/>
164     </fileset>
165 wvengen 595 <zipfileset src="${dep.commons-lang}" includes="**/*.class"/>
166     <zipfileset src="${dep.commons-cli}" includes="**/*.class"/>
167 wvengen 250 <zipfileset src="${dep.swingworker}" includes="**/*.class"/>
168 wvengen 253 <zipfileset src="${dep.xhtmlrenderer}" includes="**/*.class" excludes="**/tool/**"/>
169 wvengen 401 <zipfileset src="${dep.itext}" includes="**/*.class,**/fonts/*" excludes="**/tools/**"/>
170 wvengen 444 <zipfileset src="${dep.winregistry}" includes="**/*.class"/>
171 wvengen 400 <!-- iText needs some org.bouncycastle.cms classes but some other classes in this
172     package reference javax.mail which we don't want to include as well (so that
173 wvengen 553 ProGuard can resolve them). Solution: only include part of the smime package.
174     In addition to this, certificate renewal also requires S/MIME mail stuff.
175 wvengen 555 The activation framework doesn't appear to be needed during run -->
176 wvengen 553 <zipfileset src="${dep.bouncycastle.smime}">
177     <include name="org/bouncycastle/cms/**"/>
178     <include name="org/bouncycastle/mail/smime/*.class/"/>
179     <include name="org/bouncycastle/mail/smime/util/*.class/"/>
180     </zipfileset>
181     <zipfileset src="${dep.javamail}" includes="**/*.class"/>
182 wvengen 178 </jar>
183 wvengen 557 </target>
184 wvengen 562
185 wvengen 557 <!--
186 wvengen 562 - ProGuard-minimised JAR creation
187 wvengen 557 -->
188 wvengen 562 <target name="jar.small" depends="jar.large">
189 wvengen 178 <!-- minimize jar file; skipnonpubliclibraryclasses needed for java1.6 -->
190     <proguard obfuscate="false" skipnonpubliclibraryclasses="false">
191     <injar file="${dir.dist}/${target.name}.large.jar"/>
192     <outjar file="${dir.dist}/${target.name}.jar"/>
193     <libraryjar file="${java.home}/lib/rt.jar"/>
194 wvengen 399 <libraryjar file="${java.home}/lib/jce.jar"/>
195 wvengen 196 <libraryjar file="${java.home}/lib/jsse.jar"/>
196 wvengen 178 <libraryjar file="${dep.bouncycastle}"/>
197 wvengen 250 <libraryjar file="${dep.junit}"/>
198 wvengen 364 <libraryjar file="${dep.abbot}"/>
199 wvengen 557 <libraryjar file="${dep.activation}" jarfilter="${dep.activation.proguardfilter}" />
200 wvengen 250 <keepclasseswithmembers access="public">
201 wvengen 178 <method access="public static" type="void"
202     name="main" parameters="java.lang.String[]"/>
203     </keepclasseswithmembers>
204 wvengen 298 <!-- logging is dynamically configured -->
205     <keepclasseswithmembers access="public" name="org.xhtmlrenderer.util.XRSimpleLogFormatter">
206     <method name="*"/>
207     </keepclasseswithmembers>
208     <keepclasseswithmembers access="public" name="org.xhtmlrenderer.util.Configuration">
209     <method name="*"/>
210     </keepclasseswithmembers>
211 wvengen 562 </proguard>
212     </target>
213    
214     <!--
215     - Distribution creation target
216     -->
217     <target name="dist" depends="keystore,jar.large">
218     <!-- copy large/small jar to distribution -->
219     <copy file="${dir.dist}/${target.name}.large.jar" tofile="${dir.dist}/${target.name}.jar"/>
220 wvengen 178 <!-- sign it, required for java web start -->
221     <signjar keystore="${keystore.file}" jar="${dir.dist}/${target.name}.jar"
222 wvengen 183 alias="${keystore.alias}" storepass="${keystore.passwd}"/>
223     <delete file="${keystore.tempfile}" quiet="true"/>
224 wvengen 178 <!-- substitute variables in java web start files -->
225     <copy file="${dir.dist}/${target.name}.jnlp.in" tofile="${dir.dist}/${target.name}.jnlp" />
226     <copy file="${dir.dist}/bcprov.jnlp.in" tofile="${dir.dist}/bcprov.jnlp" />
227     <replace dir="${dir.dist}">
228     <include name="${target.name}.jnlp"/>
229     <include name="bcprov.jnlp"/>
230     <replacefilter token="@wwwbase@" value="${wwwbase}"/>
231     <replacefilter token="@main@" value="${target.main}"/>
232     </replace>
233 wvengen 182 <!-- copy bouncycastle jar to deployment area -->
234     <copy file="${dep.bouncycastle}" todir="${dir.dist}"/>
235 wvengen 178 </target>
236    
237     <!--
238     - Cleaning target
239     -->
240     <target name="clean">
241     <delete dir="${dir.build}"/>
242     <delete file="${dir.dist}/${target.name}.jar"/>
243     <delete file="${dir.dist}/${target.name}.jnlp"/>
244     <delete file="${dir.dist}/bcprov.jnlp"/>
245 wvengen 182 <basename property="dep.bouncycastle.basename" file="${dep.bouncycastle}"/>
246     <delete file="${dir.dist}/${dep.bouncycastle.basename}"/>
247 wvengen 178 </target>
248    
249 wvengen 464 <!--
250     - extra targets
251     -->
252     <target name="browsertool" depends="compile">
253     <jar jarfile="${dir.dist}/${browsertool.target.name}.jar">
254     <manifest>
255     <attribute name="Built-By" value="${user.name}"/>
256     <attribute name="Main-Class" value="${browsertool.target.main}"/>
257     </manifest>
258 wvengen 597 <fileset dir="${dir.build}">
259     <patternset refid="distfiles"/>
260 wvengen 464 <include name="nl/nikhef/jgridstart/install/**"/>
261     <include name="nl/nikhef/jgridstart/util/**"/>
262     </fileset>
263 wvengen 599 <zipfileset src="${dep.commons-cli}" includes="**/*.class"/>
264 wvengen 464 <zipfileset src="${dep.winregistry}" includes="**/*.class"/>
265     </jar>
266     <!-- sign it, required for java web start -->
267     <signjar keystore="${keystore.file}" jar="${dir.dist}/${browsertool.name}.jar"
268     alias="${keystore.alias}" storepass="${keystore.passwd}"/>
269     </target>
270    
271 wvengen 487 <!-- javadoc with APIviz, needs graphviz >= 2.20 -->
272     <target name="javadoc" depends="compile">
273     <javadoc
274     destdir="${dir.javadoc}"
275     classpathref="path.dependencies"
276     access="protected" source="${target.jvmversion}"
277     doclet="org.jboss.apiviz.APIviz" docletpath="${dep.apiviz}" additionalparam="-sourceclasspath ${dir.build}">
278     <sourcefiles>
279     <fileset dir="${dir.src}">
280     <include name="**/*.java"/>
281 wvengen 492 <exclude name="**/*Test.*"/>
282     <exclude name="**/AllTests.*"/>
283 wvengen 487 </fileset>
284     </sourcefiles>
285     <link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
286     <link href="http://bouncycastle.org/docs/docs1.4/"/>
287     <link href="http://bouncycastle.org/docs/mdocs1.4/"/>
288 wvengen 595 <link href="http://commons.apache.org/lang/api-release/"/>
289 wvengen 487 <link href="http://commons.apache.org/cli/api-1.2/"/>
290     <link href="http://junit.org/junit/javadoc/4.5/"/>
291     <link href="http://abbot.sourceforge.net/doc/api/"/>
292     <link href="https://swingworker.dev.java.net/nonav/javadoc/"/>
293     <link href="http://pigeonholdings.com/projects/flyingsaucer/R8/javadoc/user/"/>
294     <link href="http://www.1t3xt.info/api/"/>
295 wvengen 553 <link href="http://java.sun.com/products/javamail/javadocs/"/>
296 wvengen 514 <!-- no online javadoc found for WinRegistry -->
297 wvengen 487 </javadoc>
298     </target>
299 wvengen 514
300     <!-- test report -->
301     <target name="testreport" depends="compile">
302     <junit fork="yes" haltonfailure="no">
303     <test fork="yes" todir="${dir.testreports}" name="nl.nikhef.jgridstart.AllTests"/>
304     <formatter type="xml"/>
305     <classpath refid="path.dependencies"/>
306     <classpath path="${dir.build}"/>
307     </junit>
308     </target>
309 wvengen 253 </project>

Properties

Name Value
svn:mime-type text/plain

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28