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

Last change on this file since 976 was 976, checked in by Nicklas Nordborg, 14 years ago

References #162: Upgrade to MeV 4.

This seems to work now. I'll keep this ticket open until release since the text on the wiki page also needs to be updated.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Id
File size: 5.0 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.1pre" />
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="ISO-8859-1" />
25  <property name="depend.jars" value="http://base2.thep.lu.se/base/jars/2.11.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    <jar 
72      jarfile="${jar.name}" 
73      >
74      <fileset dir="${build}" />
75      <fileset dir="." includes="META-INF/**" />
76      <fileset dir="." includes="resources/**" />
77    </jar>
78  </target>
79 
80  <target 
81    name="build"
82    depends="init,checkjar"
83    description="Compiles the plugin and put in jar"
84    >
85    <mkdir dir="${build}" />
86    <javac 
87      encoding="${javac.encoding}" 
88      srcdir="${src}" 
89      destdir="${build}" 
90      debug="true" 
91      classpathref="classpath"
92      source="${javac.source}"
93      target="${javac.target}"
94      >
95      <compilerarg value="${javac.arg}" />
96    </javac>
97  </target>
98 
99  <target 
100    name="checkjar"
101    description="Checks that the BASE2Core.jar, BASE2Webclient.jar, BASE2CorePlugins.jar and BASE2WSClient.jar exists."
102    >
103    <available classname="net.sf.basedb.core.Application" 
104      classpathref="classpath" property="base2core" />
105    <available classname="net.sf.basedb.plugins.BioAssaySetExporter" 
106      classpathref="classpath" property="base2plugins" />
107    <available classname="net.sf.basedb.clients.web.extensions.toolbar.FixedButtonFactory" 
108      classpathref="classpath" property="base2web" />
109    <available classname="net.sf.basedb.info.BioAssaySetInfo" 
110      classpathref="classpath" property="base2webservice" />
111    <fail unless="base2core" message="Can't find BASE2Core.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
112    <fail unless="base2plugins" message="Can't find BASE2CorePlugins.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
113    <fail unless="base2web" message="Can't find BASE2Webclient.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
114    <fail unless="base2webservice" message="Can't find BASE2WSClient.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />
115    <echo>Found BASE2Core.jar, BASE2CorePlugins.jar, BASE2Webclient.jar and BASE2WSClient.jar.</echo>
116  </target>
117 
118  <target name="signjars">
119    <signjar
120      alias="mev-base" 
121      keystore="./jarsign/mev-base.key"
122      storepass="mev-base"
123      lazy="true">
124      <fileset 
125        dir="./resources/jar"
126        includes="*.jar" 
127        excludes="goose.jar,mail.jar" 
128      />
129    </signjar>
130  </target>
131 
132  <target 
133    name="download-lib"
134    description="Download BASE2Core.jar, BASE2Webclient.jar, BASE2CorePlugins.jar and BASE2WSClient.jar"
135    >
136    <echo>
137-------------------------------------------------------   
138NOTE! You may specifiy a different download location by
139creating the file './build.properties' and
140setting 'depend.jars' to the URL to download from.
141-------------------------------------------------------
142    </echo>
143    <download-lib file="BASE2Core.jar" />
144    <download-lib file="BASE2CorePlugins.jar" />
145    <download-lib file="BASE2Webclient.jar" />
146    <download-lib file="BASE2WSClient.jar" />
147  </target>
148 
149  <macrodef name="download-lib" description="Download BASE core JAR files">
150    <attribute name="file" />
151    <sequential>
152      <get 
153        dest="lib/compile/@{file}" 
154        src="${depend.jars}/@{file}" 
155        usetimestamp="true" 
156        verbose="true"
157        ignoreerrors="true"
158      />
159    </sequential>
160  </macrodef>
161</project>
Note: See TracBrowser for help on using the repository browser.