blob: 9d4c43ccbc1e4088abeedd8f92e149df969cf3ee [file] [log] [blame]
Richard S. Hall930fecc2005-08-16 18:33:34 +00001<project name="felix" default="all" basedir=".">
2
3 <!-- Set our global properties -->
4 <property name="src.dir" value="src"/>
5 <property name="lib.dir" value="lib"/>
6 <property name="output.dir" value="classes"/>
7 <property name="bundle.dir" value="bundle"/>
8 <property name="etc.dir" value="etc"/>
9 <property name="doc.dir" value="doc"/>
10 <property name="apidoc.dir" value="${doc.dir}/api"/>
11 <property name="dist.dir" value="dist"/>
12 <property name="debug.value" value="on"/>
13
14 <!-- Create class path from lib and output directories. -->
15 <path id="classpath">
16 <pathelement location="${output.dir}"/>
17 <fileset dir="${lib.dir}">
18 <include name="*.jar"/>
19 </fileset>
20 </path>
21
22 <target name="init">
23 <!-- Create lib directory. -->
24 <mkdir dir="${lib.dir}"/>
25 <!-- Create output directory. -->
26 <mkdir dir="${output.dir}"/>
27 <!-- Create bundle directory. -->
28 <mkdir dir="${bundle.dir}"/>
29 </target>
30
31 <!-- Compile and JAR everything -->
32 <target name="all" depends="init">
33 <antcall target="compile"/>
34 <antcall target="moduleloader"/>
35 <antcall target="osgi"/>
36 <antcall target="felix"/>
37 <antcall target="bundle"/>
38 </target>
39
40 <!-- Compile everything. -->
41 <target name="compile" depends="init">
42 <javac srcdir="${src.dir}" destdir="${output.dir}"
43 debug="${debug.value}" verbose="no" deprecation="no">
44 <classpath refid="classpath"/>
45 <include name="**/*.java"/>
46 </javac>
47 </target>
48
49 <!-- Create module loader JAR file. -->
50 <target name="moduleloader" depends="compile">
51 <jar jarfile="${lib.dir}/moduleloader.jar"
52 basedir="${output.dir}">
Richard S. Hall5a031592005-08-19 19:53:58 +000053 <include name="org/apache/felix/moduleloader/"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +000054 </jar>
55 </target>
56
57 <!-- Create OSGi JAR file. -->
58 <target name="osgi" depends="compile">
59 <jar jarfile="${lib.dir}/osgi.jar" basedir="${output.dir}">
60 <include name="org/osgi/framework/**"/>
61 <include name="org/osgi/service/packageadmin/**"/>
62 <include name="org/osgi/service/startlevel/**"/>
63 </jar>
64 </target>
65
66 <!-- Create Felix JAR file. -->
67 <target name="felix" depends="compile">
Richard S. Hall5a031592005-08-19 19:53:58 +000068 <jar manifest="${src.dir}/org/apache/felix/framework/manifest.mf"
Richard S. Hall930fecc2005-08-16 18:33:34 +000069 jarfile="${lib.dir}/felix.jar"
70 basedir="${output.dir}">
Richard S. Hall5a031592005-08-19 19:53:58 +000071 <include name="org/apache/felix/framework/"/>
72 <exclude name="org/apache/felix/framework/installer/"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +000073 </jar>
74 </target>
75
Richard S. Hall5a031592005-08-19 19:53:58 +000076 <!-- Create impl bundle JAR files. -->
Richard S. Hall930fecc2005-08-16 18:33:34 +000077 <target name="bundle" depends="compile">
78
79 <!-- Shell -->
Richard S. Hall5a031592005-08-19 19:53:58 +000080 <jar manifest="${src.dir}/org/apache/felix/shell/impl/manifest.mf"
Richard S. Hall930fecc2005-08-16 18:33:34 +000081 jarfile="${bundle.dir}/shell.jar"
82 basedir="${output.dir}">
Richard S. Hall5a031592005-08-19 19:53:58 +000083 <include name="org/apache/felix/shell/**"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +000084 <include name="org/ungoverned/osgi/service/shell/**"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +000085 </jar>
86
87 <!-- Shell TUI -->
Richard S. Hall5a031592005-08-19 19:53:58 +000088 <jar manifest="${src.dir}/org/apache/felix/shelltui/manifest.mf"
Richard S. Hall930fecc2005-08-16 18:33:34 +000089 jarfile="${bundle.dir}/shelltui.jar"
90 basedir="${output.dir}">
Richard S. Hall5a031592005-08-19 19:53:58 +000091 <include name="org/apache/felix/shelltui/**"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +000092 </jar>
93
94 <!-- OBR -->
95 <copy file="${lib.dir}/kxml.jar"
Richard S. Hall5a031592005-08-19 19:53:58 +000096 todir="${output.dir}/org/apache/felix/bundlerepository/impl/"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +000097
Richard S. Hall5a031592005-08-19 19:53:58 +000098 <jar manifest="${src.dir}/org/apache/felix/bundlerepository/impl/manifest.mf"
Richard S. Hall930fecc2005-08-16 18:33:34 +000099 jarfile="${bundle.dir}/bundlerepository.jar"
100 basedir="${output.dir}">
Richard S. Hall5a031592005-08-19 19:53:58 +0000101 <include name="org/apache/felix/bundlerepository/**"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +0000102 </jar>
103
104 </target>
105
106
107 <!-- Clean up everything. -->
108 <target name="clean">
109 <delete dir="${output.dir}"/>
110 <delete dir="${bundle.dir}"/>
111 <delete file="${lib.dir}/osgi.jar"/>
112 <delete file="${lib.dir}/moduleloader.jar"/>
113 <delete file="${lib.dir}/felix.jar"/>
114 </target>
115
116</project>