source: plugins/base1/se.lu.onk.Center/trunk/build.xml @ 881

Last change on this file since 881 was 881, checked in by Jari Häkkinen, 13 years ago

Addresses #157. Preparing release 2.1 of Center.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3    $Id: build.xml 881 2008-12-05 11:39:27Z jari $
4
5    Copyright (C) 2005, 2006 Johan Enell
6    Copyright (C) 2008 Jari Häkkinen
7
8    This file is part of the se.lu.onk.Center 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 this software. If not, see <http://www.gnu.org/licenses/>.
24-->
25<project name="se.lu.onk.Center plug-in for BASE"
26         default="dist" basedir=".">
27  <description>
28    This build file is used for se.lu.onk.Center 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="2.1" />
43
44  <property name="basefilejar" value="BaseFile" />
45  <property name="build" location="build" />
46  <property name="dist" location="dist" />
47  <property name="misc" location="misc" />
48  <property name="package" value="mergebioassay"/>
49  <property name="packagestring" value="Center-${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}/Center.jar">
90      <fileset dir="${build}" />
91      <manifest>
92        <attribute name="Built-By" value="${user.name}"/>
93        <attribute name="Main-Class" value="Main"/>
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}/Center.jar" />
107      <fileset dir="${misc}" />
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="run" />
133      </tarfileset>
134      <tarfileset
135        dir="${package}"
136        prefix="${packagestring}"
137        preserveLeadingSlashes="true"
138        >
139        <exclude name="run" />
140      </tarfileset>
141    </tar>
142    <checksum file="${packagestring}.tgz" />
143  </target> 
144 
145</project>
Note: See TracBrowser for help on using the repository browser.