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 --> |
Richard S. Hall | 9ab15c3 | 2006-01-04 14:30:06 +0000 | [diff] [blame] | 4 | <property name="src.dir" value="src/main/java"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 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/**"/> |
Richard S. Hall | f1a466e | 2005-11-08 08:50:27 +0000 | [diff] [blame] | 63 | <include name="org/osgi/service/url/**"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 64 | </jar> |
| 65 | </target> |
| 66 | |
| 67 | <!-- Create Felix JAR file. --> |
| 68 | <target name="felix" depends="compile"> |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 69 | <jar manifest="${src.dir}/org/apache/felix/framework/manifest.mf" |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 70 | jarfile="${lib.dir}/felix.jar" |
| 71 | basedir="${output.dir}"> |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 72 | <include name="org/apache/felix/framework/"/> |
| 73 | <exclude name="org/apache/felix/framework/installer/"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 74 | </jar> |
| 75 | </target> |
| 76 | |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 77 | <!-- Create impl bundle JAR files. --> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 78 | <target name="bundle" depends="compile"> |
| 79 | |
| 80 | <!-- Shell --> |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 81 | <jar manifest="${src.dir}/org/apache/felix/shell/impl/manifest.mf" |
Richard S. Hall | 7164494 | 2006-02-08 14:29:10 +0000 | [diff] [blame] | 82 | jarfile="${bundle.dir}/org.apache.felix.shell.jar" |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 83 | basedir="${output.dir}"> |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 84 | <include name="org/apache/felix/shell/**"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 85 | <include name="org/ungoverned/osgi/service/shell/**"/> |
Richard S. Hall | 7164494 | 2006-02-08 14:29:10 +0000 | [diff] [blame] | 86 | <exclude name="org/apache/felix/shell/tui/**"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 87 | </jar> |
| 88 | |
| 89 | <!-- Shell TUI --> |
Richard S. Hall | 7164494 | 2006-02-08 14:29:10 +0000 | [diff] [blame] | 90 | <jar manifest="${src.dir}/org/apache/felix/shell/tui/manifest.mf" |
| 91 | jarfile="${bundle.dir}/org.apache.felix.shell.tui.jar" |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 92 | basedir="${output.dir}"> |
Richard S. Hall | 7164494 | 2006-02-08 14:29:10 +0000 | [diff] [blame] | 93 | <include name="org/apache/felix/shell/tui/**"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 94 | </jar> |
| 95 | |
| 96 | <!-- OBR --> |
| 97 | <copy file="${lib.dir}/kxml.jar" |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 98 | todir="${output.dir}/org/apache/felix/bundlerepository/impl/"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 99 | |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 100 | <jar manifest="${src.dir}/org/apache/felix/bundlerepository/impl/manifest.mf" |
Richard S. Hall | 7164494 | 2006-02-08 14:29:10 +0000 | [diff] [blame] | 101 | jarfile="${bundle.dir}/org.apache.felix.bundlerepository.jar" |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 102 | basedir="${output.dir}"> |
Richard S. Hall | 5a03159 | 2005-08-19 19:53:58 +0000 | [diff] [blame] | 103 | <include name="org/apache/felix/bundlerepository/**"/> |
Richard S. Hall | 930fecc | 2005-08-16 18:33:34 +0000 | [diff] [blame] | 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> |