blob: 21d3452c3135f4d771249f8ef89f271e0e3ccb5c [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}">
53 <include name="org/apache/osgi/moduleloader/"/>
54 </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">
68 <jar manifest="${src.dir}/org/apache/osgi/framework/manifest.mf"
69 jarfile="${lib.dir}/felix.jar"
70 basedir="${output.dir}">
71 <include name="org/apache/osgi/framework/"/>
72 <exclude name="org/apache/osgi/framework/installer/"/>
73 </jar>
74 </target>
75
76 <!-- Create shell bundle JAR files. -->
77 <target name="bundle" depends="compile">
78
79 <!-- Shell -->
80 <jar manifest="${src.dir}/org/apache/osgi/bundle/shell/manifest.mf"
81 jarfile="${bundle.dir}/shell.jar"
82 basedir="${output.dir}">
83 <include name="org/apache/osgi/service/shell/**"/>
84 <include name="org/ungoverned/osgi/service/shell/**"/>
85 <include name="org/apache/osgi/bundle/shell/**"/>
86 </jar>
87
88 <!-- Shell TUI -->
89 <jar manifest="${src.dir}/org/apache/osgi/bundle/shelltui/manifest.mf"
90 jarfile="${bundle.dir}/shelltui.jar"
91 basedir="${output.dir}">
92 <include name="org/apache/osgi/bundle/shelltui/**"/>
93 </jar>
94
95 <!-- OBR -->
96 <copy file="${lib.dir}/kxml.jar"
97 todir="${output.dir}/org/apache/osgi/bundle/bundlerepository/"/>
98
99 <jar manifest="${src.dir}/org/apache/osgi/bundle/bundlerepository/manifest.mf"
100 jarfile="${bundle.dir}/bundlerepository.jar"
101 basedir="${output.dir}">
102 <include name="org/apache/osgi/bundle/bundlerepository/**"/>
103 <include name="org/apache/osgi/service/bundlerepository/**"/>
104 </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>