1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <!-- |
---|
3 | $Id: build.xml 801 2008-10-01 14:25:44Z jari $ |
---|
4 | |
---|
5 | Copyright (C) 2005, 2006 Johan Enell |
---|
6 | Copyright (C) 2008 Jari Hakkinen |
---|
7 | |
---|
8 | This file is part of the se.lu.onk.ReplicateError plug-in for |
---|
9 | BASE. Available at http://baseplugins.thep.lu.se/ and BASE web |
---|
10 | site is http://base.thep.lu.se |
---|
11 | |
---|
12 | This is free software; you can redistribute it and/or modify it |
---|
13 | under the terms of the GNU General Public License as published by |
---|
14 | the Free Software Foundation; either version 3 of the License, or |
---|
15 | (at your option) any later version. |
---|
16 | |
---|
17 | The software is distributed in the hope that it will be useful, |
---|
18 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
20 | General Public License for more details. |
---|
21 | |
---|
22 | You should have received a copy of the GNU General Public License |
---|
23 | along with BASE. If not, see <http://www.gnu.org/licenses/>. |
---|
24 | --> |
---|
25 | <project name="se.lu.onk.ReplicateError plug-in for BASE" |
---|
26 | default="dist" basedir="."> |
---|
27 | <description> |
---|
28 | This build file is used for se.lu.onk.ReplicateError plug-in for |
---|
29 | BASE created at the Department of Oncology, Lund University, |
---|
30 | Sweden. |
---|
31 | </description> |
---|
32 | |
---|
33 | <!-- properties --> |
---|
34 | |
---|
35 | <!-- set version |
---|
36 | Two numbers are used. 1.0 is the first release, the second |
---|
37 | number is increased for each new release that does not changed |
---|
38 | the API. The first number is changed for API changing |
---|
39 | releases. Add "pre" to unreleased versions. Examples: |
---|
40 | 1.0, 1.1, 1.2pre |
---|
41 | --> |
---|
42 | <property name="version" value="1.3" /> |
---|
43 | |
---|
44 | <property name="basefilejar" value="BaseFile" /> |
---|
45 | <property name="build" location="build" /> |
---|
46 | <property name="dist" location="dist" /> |
---|
47 | <property name="lib" location="lib" /> |
---|
48 | <property name="package" value="replicateerror"/> |
---|
49 | <property name="packagestring" value="ReplicateError-${version}" /> |
---|
50 | <property name="src" location="src" /> |
---|
51 | |
---|
52 | <path id="classpath"> |
---|
53 | <fileset dir="${basefilejar}"> |
---|
54 | <include name="**/*.jar"/> |
---|
55 | </fileset> |
---|
56 | </path> |
---|
57 | |
---|
58 | <!-- ================================= |
---|
59 | target: compile |
---|
60 | ================================== --> |
---|
61 | <target name="compile" description="--> Compile the package"> |
---|
62 | <mkdir dir="${build}"/> |
---|
63 | <javac |
---|
64 | srcdir="${src}" |
---|
65 | destdir="${build}" |
---|
66 | classpathref="classpath" |
---|
67 | debug="true" |
---|
68 | deprecation="true" |
---|
69 | encoding="ISO-8859-1" |
---|
70 | /> |
---|
71 | </target> |
---|
72 | |
---|
73 | <!-- ================================= |
---|
74 | target: clean |
---|
75 | ================================= --> |
---|
76 | <target name="clean" description="--> Remove all generated files"> |
---|
77 | <delete dir="${build}" /> |
---|
78 | <delete dir="${dist}" /> |
---|
79 | <delete dir="${package}" /> |
---|
80 | <delete file="${packagestring}.tgz" /> |
---|
81 | <delete file="${packagestring}.tgz.MD5" /> |
---|
82 | </target> |
---|
83 | |
---|
84 | <!-- ================================= |
---|
85 | target: dist |
---|
86 | ================================== --> |
---|
87 | <target name="dist" depends="compile"> |
---|
88 | <mkdir dir="${dist}" /> |
---|
89 | <jar destfile="${dist}/ReplicateError.jar"> |
---|
90 | <fileset dir="${build}" /> |
---|
91 | <manifest> |
---|
92 | <attribute name="Built-By" value="${user.name}"/> |
---|
93 | <attribute name="Main-Class" value="replicateerror.ReplicateError"/> |
---|
94 | </manifest> |
---|
95 | </jar> |
---|
96 | </target> |
---|
97 | |
---|
98 | <!-- ================================= |
---|
99 | target: package |
---|
100 | ================================= --> |
---|
101 | <target name="package" depends="dist" |
---|
102 | description="--> Create a tgz file for distribution."> |
---|
103 | <mkdir dir="${package}"/> |
---|
104 | <mkdir dir="${package}/${basefilejar}"/> |
---|
105 | <copy todir="${package}"> |
---|
106 | <fileset file="${dist}/ReplicateError.jar" /> |
---|
107 | <fileset dir="${lib}" /> |
---|
108 | <fileset file="license.txt" /> |
---|
109 | <fileset file="README" /> |
---|
110 | </copy> |
---|
111 | <copy todir="${package}/${basefilejar}"> |
---|
112 | <fileset dir="${basefilejar}" /> |
---|
113 | </copy> |
---|
114 | <replace dir="${package}"> |
---|
115 | <include name="*.base" /> |
---|
116 | <replacefilter |
---|
117 | token="@VERSION@" |
---|
118 | value="${version}" |
---|
119 | /> |
---|
120 | </replace> |
---|
121 | <tar |
---|
122 | destfile="${packagestring}.tgz" |
---|
123 | longfile="gnu" |
---|
124 | compression="gzip" |
---|
125 | > |
---|
126 | <tarfileset |
---|
127 | dir="${package}" |
---|
128 | mode="755" |
---|
129 | prefix="${packagestring}" |
---|
130 | preserveLeadingSlashes="true" |
---|
131 | > |
---|
132 | <include name="runAA" /> |
---|
133 | <include name="runWA" /> |
---|
134 | </tarfileset> |
---|
135 | <tarfileset |
---|
136 | dir="${package}" |
---|
137 | prefix="${packagestring}" |
---|
138 | preserveLeadingSlashes="true" |
---|
139 | > |
---|
140 | <exclude name="runAA" /> |
---|
141 | <exclude name="runWA" /> |
---|
142 | </tarfileset> |
---|
143 | </tar> |
---|
144 | <checksum file="${packagestring}.tgz" /> |
---|
145 | </target> |
---|
146 | |
---|
147 | </project> |
---|