Repository navigation
Expand file tree
/
Copy pathbuild.xml
More file actions
121 lines (91 loc) · 4.17 KB
/
Copy pathbuild.xml
File metadata and controls
121 lines (91 loc) · 4.17 KB
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
<!--
~ Copyright (c) 2007-2011 by The Broad Institute of MIT and Harvard. All Rights Reserved.
~
~ This software is licensed under the terms of the GNU Lesser General Public License (LGPL),
~ Version 2.1 which is available at http://www.opensource.org/licenses/lgpl-2.1.php.
~
~ THE SOFTWARE IS PROVIDED "AS IS." THE BROAD AND MIT MAKE NO REPRESENTATIONS OR
~ WARRANTES OF ANY KIND CONCERNING THE SOFTWARE, EXPRESS OR IMPLIED, INCLUDING,
~ WITHOUT LIMITATION, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
~ PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, WHETHER
~ OR NOT DISCOVERABLE. IN NO EVENT SHALL THE BROAD OR MIT, OR THEIR RESPECTIVE
~ TRUSTEES, DIRECTORS, OFFICERS, EMPLOYEES, AND AFFILIATES BE LIABLE FOR ANY DAMAGES
~ OF ANY KIND, INCLUDING, WITHOUT LIMITATION, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
~ ECONOMIC DAMAGES OR INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER
~ THE BROAD OR MIT SHALL BE ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT
~ SHALL KNOW OF THE POSSIBILITY OF THE FOREGOING.
-->
<project name="IGVLauncher" default="build" basedir=".">
<!-- Properties-->
<property name="jar.name" value="igvLauncher.jar"/>
<property name="main-class" value="org.broad.igv.Launcher"/>
<property name="alias" value="Broad-alias"/>
<property name="key-password" value="Broad-keypass"/>
<property name="store-password" value="Broad-storepass"/>
<!-- Source and lib directories -->
<property name="src.dir" value="${basedir}/src/"/>
<!-- Temp directory. Sources are compiled here prior to archiving -->
<property name="tmp.dir" value="${basedir}/tmp/"/>
<!-- Distribution directory. Binary distribution is placed here -->
<property name="dist.dir" value="${basedir}/dist/"/>
<property name="jar.path" value="${dist.dir}${jar.name}"/>
<!-- The deployment folder for the JWS distribution .It is expected that this property will be overridden -->
<property name="deploy.dir" value="${basedir}/deploy/"/>
<target name="init" depends="clean">
<delete dir="${tmp.dir}"/>
<delete dir="${dist.dir}"/>
<mkdir dir="${tmp.dir}"/>
<mkdir dir="${dist.dir}"/>
<!-- Copy resource files to the tmp directory -->
<copy todir="${tmp.dir}" overwrite="true">
<fileset dir="${src.dir}">
<exclude name="**/*.form"/>
<exclude name="**/*.java"/>
<exclude name="**/*.svn"/>
<exclude name="**/manifest.mf"/>
</fileset>
</copy>
</target>
<target name="compile" depends="init">
<javac srcdir="${src.dir}" debug="on" destdir="${tmp.dir}">
<classpath>
<pathelement path="${tmp.dir}"/>
</classpath>
</javac>
</target>
<!-- build the jar -->
<target name="build" depends="compile">
<jar destfile="${jar.path}" basedir="${tmp.dir}" compress="true" duplicate="preserve">
<classfileset dir="${tmp.dir}">
<root classname="${main-class}"/>
</classfileset>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
</target>
<!-- Sign all jars if a keystore is defined -->
<target name="sign-jars" >
<signjar jar="${jar.path}" alias="${alias}" keypass="${key-password}" storepass="${store-password}"
keystore="${keystore}"/>
</target>
<target name="build-jws" depends="build">
<antcall target="sign-jars"/>
</target>
<!-- Deploy the application -->
<target name="deploy">
<copy todir="${deploy.dir}" overwrite="true">
<fileset dir="${dist.dir}">
<include name="lib/**"/>
</fileset>
<fileset file="${dist.dir}${jar.name}"/>
</copy>
</target>
<!-- Clean all generated artifacts -->
<target name="clean">
<delete dir="${tmp.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="all" depends="clean, init, build-jws, deploy"/>
</project>