/[pdpsoft]/trunk/nl.nikhef.jgridstart/build.xml
ViewVC logotype

Annotation of /trunk/nl.nikhef.jgridstart/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 182 - (hide annotations) (download)
Tue Apr 7 12:27:04 2009 UTC (13 years, 5 months ago) by wvengen
File MIME type: text/plain
File size: 4441 byte(s)
copy bouncycastle jar to deployment area on build and remove on clean
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     <property name="dir.src" location="src"/>
9     <property name="dir.build" location="bin"/>
10     <property name="dir.dist" location="deployment"/>
11     <property name="dir.thirdparty" location="thirdparty"/>
12    
13     <property name="target.title" value="jGridStart"/>
14     <property name="target.name" value="${ant.project.name}"/>
15     <property name="target.version" value="0.0.3"/>
16     <property name="target.main" value="nl.nikhef.jgridstart.gui.Main"/>
17     <property name="target.jvmversion" value="1.5"/>
18    
19     <property name="wwwbase" value="http://www.nikhef.nl/~wvengen/jgridstart03/"/>
20    
21     <!-- property file defining 'keystore.file' and 'keystore.passwd' for signing -->
22     <property name="dir.keystore" location=".."/>
23     <property file="${dir.keystore}/keystore.properties"/>
24    
25     <!-- dependencies -->
26     <property name="dep.bouncycastle" location="${dir.thirdparty}/bouncycastle/bcprov-jdk14-142.jar"/>
27     <property name="dep.cli" location="${dir.thirdparty}/commons-cli/commons-cli-1.2.jar"/>
28 wvengen 180 <property name="dep.junit" location="${dir.thirdparty}/junit/junit-4.5.jar"/>
29 wvengen 178 <path id="path.dependencies">
30     <!-- TODO use jdk13 library versions and test -->
31     <pathelement location="${dep.bouncycastle}"/>
32     <pathelement location="${dep.cli}"/>
33 wvengen 180 <pathelement location="${dep.junit}"/>
34 wvengen 178 </path>
35    
36     <!--
37     - Initialisation and other setup
38     -->
39     <taskdef resource="proguard/ant/task.properties"
40     classpath="${dir.thirdparty}/proguard/proguard.jar"/>
41    
42     <target name="init">
43     <tstamp/>
44     </target>
45    
46     <!--
47     - Compilation target
48     -->
49     <target name="compile" depends="init">
50     <mkdir dir="${dir.build}"/>
51     <!-- compile java sources -->
52     <javac srcdir="${dir.src}" destdir="${dir.build}" target="${target.jvmversion}">
53     <classpath refid="path.dependencies" />
54     </javac>
55     <!-- and copy resources; skip VCS dirs (and other hidden .*) -->
56     <copy todir="${dir.build}">
57     <fileset dir="${dir.src}">
58     <exclude name="**/*.java"/>
59     <exclude name="**/CVS"/>
60     <exclude name="**/.*"/>
61     </fileset>
62     </copy>
63     </target>
64    
65     <!--
66     - Distribution creation target
67     -->
68     <target name="dist" depends="compile">
69     <!-- pack into jar -->
70     <jar jarfile="${dir.dist}/${target.name}.large.jar">
71     <manifest>
72     <attribute name="Built-By" value="${user.name}"/>
73     <attribute name="Main-Class" value="${target.main}"/>
74     </manifest>
75 wvengen 180 <fileset dir="${dir.build}">
76     <exclude name="**/*Test.*"/>
77     <exclude name="**/AllTests.*"/>
78     </fileset>
79 wvengen 178 <zipfileset src="${dep.cli}" excludes="META-INF/**"/>
80     </jar>
81     <!-- minimize jar file; skipnonpubliclibraryclasses needed for java1.6 -->
82     <proguard obfuscate="false" skipnonpubliclibraryclasses="false">
83     <injar file="${dir.dist}/${target.name}.large.jar"/>
84     <outjar file="${dir.dist}/${target.name}.jar"/>
85     <libraryjar file="${java.home}/lib/rt.jar"/>
86     <libraryjar file="${dep.bouncycastle}"/>
87     <keepclasseswithmembers access="public">
88     <method access="public static" type="void"
89     name="main" parameters="java.lang.String[]"/>
90     </keepclasseswithmembers>
91     </proguard>
92     <delete file="${dir.dist}/${target.name}.large.jar"/>
93     <!-- sign it, required for java web start -->
94     <signjar keystore="${keystore.file}" jar="${dir.dist}/${target.name}.jar"
95     alias="${target.name}" storepass="${keystore.passwd}"/>
96     <!-- substitute variables in java web start files -->
97     <copy file="${dir.dist}/${target.name}.jnlp.in" tofile="${dir.dist}/${target.name}.jnlp" />
98     <copy file="${dir.dist}/bcprov.jnlp.in" tofile="${dir.dist}/bcprov.jnlp" />
99     <replace dir="${dir.dist}">
100     <include name="${target.name}.jnlp"/>
101     <include name="bcprov.jnlp"/>
102     <replacefilter token="@wwwbase@" value="${wwwbase}"/>
103     <replacefilter token="@main@" value="${target.main}"/>
104     </replace>
105 wvengen 182 <!-- copy bouncycastle jar to deployment area -->
106     <copy file="${dep.bouncycastle}" todir="${dir.dist}"/>
107 wvengen 178 </target>
108     <target name="jar" depends="dist"/>
109    
110     <!--
111     - Cleaning target
112     -->
113     <target name="clean">
114     <delete dir="${dir.build}"/>
115     <delete file="${dir.dist}/${target.name}.jar"/>
116     <delete file="${dir.dist}/${target.name}.jnlp"/>
117     <delete file="${dir.dist}/bcprov.jnlp"/>
118 wvengen 182 <basename property="dep.bouncycastle.basename" file="${dep.bouncycastle}"/>
119     <delete file="${dir.dist}/${dep.bouncycastle.basename}"/>
120 wvengen 178 </target>
121    
122     </project>

Properties

Name Value
svn:mime-type text/plain

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