root/trunk/org.bridgedb.server/build.xml

Revision 521, 2.1 KB (checked in by martijn, 11 months ago)

Use bnd to generate OSGi headers. Merge common build file bits in build-common.xml

  • Property svn:eol-style set to native
Line 
1<?xml version="1.0"?>
2<project name="org.bridgedb.server" default="dist" basedir=".">
3       
4        <property name="dist.dir" value="../dist"/>
5        <property name="jar.name" value="${dist.dir}/org.bridgedb.server.jar"/>
6
7        <!-- absolute deps are used for building, testing and in the manifest classpath -->
8        <path id="absolute.deps">
9                <pathelement location="../dist/org.bridgedb.jar"/>
10                <pathelement location="../dist/org.bridgedb.bio.jar"/>
11                <pathelement location="../dist/org.bridgedb.rdb.jar"/>
12        </path>
13
14        <!-- transient deps are optional, they are used only in the manifest classpath -->
15        <path id="transient.deps">
16                <!-- None -->
17        </path>
18
19        <!-- test deps are only used for testing -->
20        <path id="test.deps">
21                <pathelement location="../org.bridgedb.rdb/lib/derby.jar"/>
22                <pathelement location="../org.bridgedb/build-lib/junit.jar"/>
23        </path>
24
25 
26        <target name="jar" depends="build">
27                <mkdir dir="${dist.dir}"/>
28                <jar jarfile="${jar.name}">
29                  <manifest>
30                        <attribute name="Main-Class" value="org.bridgedb.server.Server"/>
31                        <attribute name="Class-Path" value="derby.jar org.bridgedb.jar org.bridgedb.bio.jar org.bridgedb.rdb.jar org.restlet.jar commons-cli-1.2.jar"/>
32                  </manifest>
33                  <fileset dir="build"/>
34                </jar>
35        </target>
36
37        <target name="war" depends="jar">
38                <fail message="You must specify the bridgedb config file that specifies the database locations for the web application. Example: ant war -Dbridge.config=/home/thomas/data/bridgedb/bridge.config.">
39                        <condition>
40                                <not>
41                                        <isset property="bridge.config" />
42                                </not>
43                        </condition>
44                </fail>
45                <copy toDir="tmp" file="${bridge.config}"/>
46                <war destfile="${dist.dir}/bridgedb-webservice.war" webxml="web.xml">
47                        <fileset dir="tmp"/>
48                        <lib dir="lib/restlet-2.0m6/">
49                                <include name="**/*.jar"/>
50                        </lib>
51                        <lib dir="${dist.dir}">
52                                <include name="bridgedb.jar"/>
53                                <include name="bridgedb-bio.jar"/>
54                        </lib>
55                        <classes dir="build" />
56                </war>
57                <delete dir="tmp"/>
58        </target>
59       
60        <target name="test" depends="build">
61                <!-- Disabled for now... -->
62        </target>
63
64        <import file="../build-common.xml" />
65
66</project>
Note: See TracBrowser for help on using the browser.