Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 1 | <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. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 53 | <include name="org/apache/felix/moduleloader/"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 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"> |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 68 | <jar manifest="${src.dir}/org/apache/felix/framework/manifest.mf" |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 69 | jarfile="${lib.dir}/felix.jar" |
| 70 | basedir="${output.dir}"> |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 71 | <include name="org/apache/felix/framework/"/> |
| 72 | <exclude name="org/apache/felix/framework/installer/"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 73 | </jar> |
| 74 | </target> |
| 75 | |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 76 | <!-- Create impl bundle JAR files. --> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 77 | <target name="bundle" depends="compile"> |
| 78 | |
| 79 | <!-- Shell --> |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 80 | <jar manifest="${src.dir}/org/apache/felix/shell/impl/manifest.mf" |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 81 | jarfile="${bundle.dir}/shell.jar" |
| 82 | basedir="${output.dir}"> |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 83 | <include name="org/apache/felix/shell/**"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 84 | <include name="org/ungoverned/osgi/service/shell/**"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 85 | </jar> |
| 86 | |
| 87 | <!-- Shell TUI --> |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 88 | <jar manifest="${src.dir}/org/apache/felix/shelltui/manifest.mf" |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 89 | jarfile="${bundle.dir}/shelltui.jar" |
| 90 | basedir="${output.dir}"> |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 91 | <include name="org/apache/felix/shelltui/**"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 92 | </jar> |
| 93 | |
| 94 | <!-- OBR --> |
| 95 | <copy file="${lib.dir}/kxml.jar" |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 96 | todir="${output.dir}/org/apache/felix/bundlerepository/impl/"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 97 | |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 98 | <jar manifest="${src.dir}/org/apache/felix/bundlerepository/impl/manifest.mf" |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 99 | jarfile="${bundle.dir}/bundlerepository.jar" |
| 100 | basedir="${output.dir}"> |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 101 | <include name="org/apache/felix/bundlerepository/**"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 102 | </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> |