source: extensions/net.sf.basedb.mev/trunk/build.xml @ 1071

Last change on this file since 1071 was 1071, checked in by Nicklas Nordborg, 13 years ago

References #214: Move TDMS export to this extension

Removed references to BioAssaySetExporter?.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 5.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project 
3  name="MevLauncher" 
4  default="jar" 
5  basedir=".">
6
7  <!--create this file if you need to override values from properties below -->
8  <property file="build.properties" />
9 
10  <!-- variables used -->
11  <property name="name" value="mev-launcher" />
12  <property name="version" value="1.3pre" />
13  <property name="src" location="src" description="Location of source files" />
14  <property name="build" location="build" description="Location of compiled files" />
15  <property name="jar.name" value="${name}.jar" 
16    description="Name of JAR file with the extensions." />
17  <property name="tar.prefix" value="${name}-${version}" 
18    description="Prefix of .tar.gz file for download." />
19  <property name="tar.name" value="${tar.prefix}.tar.gz" 
20    description="Full name of .tar.gz file for download." />
21  <property name="javac.arg" value="-Xlint:unchecked" />
22  <property name="javac.source" value="1.5" />
23  <property name="javac.target" value="1.5" />
24  <property name="javac.encoding" value="UTF-8" />
25  <property name="depend.jars" value="http://base2.thep.lu.se/base/jars/2.12.0" />
26
27  <!-- set up classpath for compiling -->
28  <path id="classpath">
29    <fileset dir="lib">
30      <include name="**/*.jar" />
31    </fileset>
32  </path>
33
34  <target name="init">
35    <mkdir dir="${build}" />
36  </target>
37   
38  <target name="clean">
39    <delete failonerror="false" includeemptydirs="true">
40      <fileset dir="${build}" defaultexcludes="no" />
41      <fileset file="${jar.name}" />
42      <fileset file="${tar.name}" />
43    </delete>
44  </target>
45 
46  <target
47    name="package"
48    depends="clean,jar"
49    description="Clean and create binary distribution package"
50    >
51    <tar
52      destfile="${tar.name}"
53      longfile="gnu"
54      compression="gzip"
55      >
56      <tarfileset
57        dir="."
58        prefix="${tar.prefix}"
59        preserveLeadingSlashes="true"
60        includes="${jar.name},README,LICENSE*"
61        >
62      </tarfileset>
63    </tar>
64  </target> 
65 
66  <target 
67    name="jar"
68    depends="build"
69    description="Creates the extension JAR file"
70    >
71    <copy todir="${build}">
72      <fileset dir="." includes="META-INF/*" />
73    </copy>
74    <replace token="%%plugins.jar%%" value="${jar.name}" file="${build}/META-INF/base-plugins.xml" />
75    <jar 
76      jarfile="${jar.name}" 
77      >
78      <fileset dir="${build}" />
79      <fileset dir="." includes="resources/**" />
80    </jar>
81  </target>
82 
83  <target 
84    name="build"
85    depends="init,checkjar"
86    description="Compiles the plugin and put in jar"
87    >
88    <mkdir dir="${build}" />
89    <javac 
90      encoding="${javac.encoding}" 
91      srcdir="${src}" 
92      destdir="${build}" 
93      debug="true" 
94      classpathref="classpath"
95      source="${javac.source}"
96      target="${javac.target}"
97      >
98      <compilerarg value="${javac.arg}" />
99    </javac>
100  </target>
101 
102  <target 
103    name="checkjar"
104    description="Checks that the BASE2Core.jar, BASE2Webclient.jar, BASE2CorePlugins.jar and BASE2WSClient.jar exists."
105    >
106    <available classname="net.sf.basedb.util.export.spotdata.AbstractBioAssaySetExporter" 
107      classpathref="classpath" property="base2core" />
108    <available classname="net.sf.basedb.plugins.util.Parameters" 
109      classpathref="classpath" property="base2plugins" />
110    <available classname="net.sf.basedb.clients.web.extensions.toolbar.FixedButtonFactory" 
111      classpathref="classpath" property="base2web" />
112    <available classname="net.sf.basedb.info.BioAssaySetInfo" 
113      classpathref="classpath" property="base2webservice" />
114    <fail unless="base2core" message="Can't find BASE2Core.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
115    <fail unless="base2plugins" message="Can't find BASE2CorePlugins.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
116    <fail unless="base2web" message="Can't find BASE2Webclient.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
117    <fail unless="base2webservice" message="Can't find BASE2WSClient.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
118    <echo>Found BASE2Core.jar, BASE2CorePlugins.jar, BASE2Webclient.jar and BASE2WSClient.jar.</echo>
119  </target>
120 
121  <target name="signjars">
122    <signjar
123      alias="mev-base" 
124      keystore="./jarsign/mev-base.key"
125      storepass="mev-base"
126      lazy="true">
127      <fileset 
128        dir="./resources/jar"
129        includes="*.jar" 
130        excludes="goose.jar,mail.jar" 
131      />
132    </signjar>
133  </target>
134 
135  <target 
136    name="download-lib"
137    description="Download BASE2Core.jar, BASE2Webclient.jar, BASE2CorePlugins.jar and BASE2WSClient.jar"
138    >
139    <echo>
140-------------------------------------------------------   
141NOTE! You may specifiy a different download location by
142creating the file './build.properties' and
143setting 'depend.jars' to the URL to download from.
144-------------------------------------------------------
145    </echo>
146    <download-lib file="BASE2Core.jar" />
147    <download-lib file="BASE2CorePlugins.jar" />
148    <download-lib file="BASE2Webclient.jar" />
149    <download-lib file="BASE2WSClient.jar" />
150  </target>
151 
152  <macrodef name="download-lib" description="Download BASE core JAR files">
153    <attribute name="file" />
154    <sequential>
155      <get 
156        dest="lib/compile/@{file}" 
157        src="${depend.jars}/@{file}" 
158        usetimestamp="true" 
159        verbose="true"
160        ignoreerrors="true"
161      />
162    </sequential>
163  </macrodef>
164</project>
Note: See TracBrowser for help on using the repository browser.