blob: 463fad6a23942cd0b31da82d5047ce6d8a73eb2e [file] [log] [blame]
Richard S. Hall930fecc2005-08-16 18:33:34 +00001<project name="felix" default="all" basedir=".">
2
3 <!-- Set our global properties -->
Richard S. Hall9ab15c32006-01-04 14:30:06 +00004 <property name="src.dir" value="src/main/java"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +00005 <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/**"/>
Richard S. Hallf1a466e2005-11-08 08:50:27 +000063 <include name="org/osgi/service/url/**"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +000064 </jar>
65 </target>
66
67 <!-- Create Felix JAR file. -->
68 <target name="felix" depends="compile">
Richard S. Hall5a031592005-08-19 19:53:58 +000069 <jar manifest="${src.dir}/org/apache/felix/framework/manifest.mf"
Richard S. Hall930fecc2005-08-16 18:33:34 +000070 jarfile="${lib.dir}/felix.jar"
71 basedir="${output.dir}">
Richard S. Hall5a031592005-08-19 19:53:58 +000072 <include name="org/apache/felix/framework/"/>
73 <exclude name="org/apache/felix/framework/installer/"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +000074 </jar>
75 </target>
76
Richard S. Hall5a031592005-08-19 19:53:58 +000077 <!-- Create impl bundle JAR files. -->
Richard S. Hall930fecc2005-08-16 18:33:34 +000078 <target name="bundle" depends="compile">
79
80 <!-- Shell -->
Richard S. Hall5a031592005-08-19 19:53:58 +000081 <jar manifest="${src.dir}/org/apache/felix/shell/impl/manifest.mf"
Richard S. Hall71644942006-02-08 14:29:10 +000082 jarfile="${bundle.dir}/org.apache.felix.shell.jar"
Richard S. Hall930fecc2005-08-16 18:33:34 +000083 basedir="${output.dir}">
Richard S. Hall5a031592005-08-19 19:53:58 +000084 <include name="org/apache/felix/shell/**"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +000085 <include name="org/ungoverned/osgi/service/shell/**"/>
Richard S. Hall71644942006-02-08 14:29:10 +000086 <exclude name="org/apache/felix/shell/tui/**"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +000087 </jar>
88
89 <!-- Shell TUI -->
Richard S. Hall71644942006-02-08 14:29:10 +000090 <jar manifest="${src.dir}/org/apache/felix/shell/tui/manifest.mf"
91 jarfile="${bundle.dir}/org.apache.felix.shell.tui.jar"
Richard S. Hall930fecc2005-08-16 18:33:34 +000092 basedir="${output.dir}">
Richard S. Hall71644942006-02-08 14:29:10 +000093 <include name="org/apache/felix/shell/tui/**"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +000094 </jar>
95
96 <!-- OBR -->
97 <copy file="${lib.dir}/kxml.jar"
Richard S. Hall5a031592005-08-19 19:53:58 +000098 todir="${output.dir}/org/apache/felix/bundlerepository/impl/"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +000099
Richard S. Hall5a031592005-08-19 19:53:58 +0000100 <jar manifest="${src.dir}/org/apache/felix/bundlerepository/impl/manifest.mf"
Richard S. Hall71644942006-02-08 14:29:10 +0000101 jarfile="${bundle.dir}/org.apache.felix.bundlerepository.jar"
Richard S. Hall930fecc2005-08-16 18:33:34 +0000102 basedir="${output.dir}">
Richard S. Hall5a031592005-08-19 19:53:58 +0000103 <include name="org/apache/felix/bundlerepository/**"/>
Richard S. Hall930fecc2005-08-16 18:33:34 +0000104 </jar>
105
106 </target>
107
108
109 <!-- Clean up everything. -->
110 <target name="clean">
111 <delete dir="${output.dir}"/>
112 <delete dir="${bundle.dir}"/>
113 <delete file="${lib.dir}/osgi.jar"/>
114 <delete file="${lib.dir}/moduleloader.jar"/>
115 <delete file="${lib.dir}/felix.jar"/>
116 </target>
117
118</project>