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

Properties

Name Value
svn:mime-type text/plain

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