blob: 9d4c43ccbc1e4088abeedd8f92e149df969cf3ee [file] [log] [blame]
<project name="felix" default="all" basedir=".">
<!-- Set our global properties -->
<property name="src.dir" value="src"/>
<property name="lib.dir" value="lib"/>
<property name="output.dir" value="classes"/>
<property name="bundle.dir" value="bundle"/>
<property name="etc.dir" value="etc"/>
<property name="doc.dir" value="doc"/>
<property name="apidoc.dir" value="${doc.dir}/api"/>
<property name="dist.dir" value="dist"/>
<property name="debug.value" value="on"/>
<!-- Create class path from lib and output directories. -->
<path id="classpath">
<pathelement location="${output.dir}"/>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="init">
<!-- Create lib directory. -->
<mkdir dir="${lib.dir}"/>
<!-- Create output directory. -->
<mkdir dir="${output.dir}"/>
<!-- Create bundle directory. -->
<mkdir dir="${bundle.dir}"/>
</target>
<!-- Compile and JAR everything -->
<target name="all" depends="init">
<antcall target="compile"/>
<antcall target="moduleloader"/>
<antcall target="osgi"/>
<antcall target="felix"/>
<antcall target="bundle"/>
</target>
<!-- Compile everything. -->
<target name="compile" depends="init">
<javac srcdir="${src.dir}" destdir="${output.dir}"
debug="${debug.value}" verbose="no" deprecation="no">
<classpath refid="classpath"/>
<include name="**/*.java"/>
</javac>
</target>
<!-- Create module loader JAR file. -->
<target name="moduleloader" depends="compile">
<jar jarfile="${lib.dir}/moduleloader.jar"
basedir="${output.dir}">
<include name="org/apache/felix/moduleloader/"/>
</jar>
</target>
<!-- Create OSGi JAR file. -->
<target name="osgi" depends="compile">
<jar jarfile="${lib.dir}/osgi.jar" basedir="${output.dir}">
<include name="org/osgi/framework/**"/>
<include name="org/osgi/service/packageadmin/**"/>
<include name="org/osgi/service/startlevel/**"/>
</jar>
</target>
<!-- Create Felix JAR file. -->
<target name="felix" depends="compile">
<jar manifest="${src.dir}/org/apache/felix/framework/manifest.mf"
jarfile="${lib.dir}/felix.jar"
basedir="${output.dir}">
<include name="org/apache/felix/framework/"/>
<exclude name="org/apache/felix/framework/installer/"/>
</jar>
</target>
<!-- Create impl bundle JAR files. -->
<target name="bundle" depends="compile">
<!-- Shell -->
<jar manifest="${src.dir}/org/apache/felix/shell/impl/manifest.mf"
jarfile="${bundle.dir}/shell.jar"
basedir="${output.dir}">
<include name="org/apache/felix/shell/**"/>
<include name="org/ungoverned/osgi/service/shell/**"/>
</jar>
<!-- Shell TUI -->
<jar manifest="${src.dir}/org/apache/felix/shelltui/manifest.mf"
jarfile="${bundle.dir}/shelltui.jar"
basedir="${output.dir}">
<include name="org/apache/felix/shelltui/**"/>
</jar>
<!-- OBR -->
<copy file="${lib.dir}/kxml.jar"
todir="${output.dir}/org/apache/felix/bundlerepository/impl/"/>
<jar manifest="${src.dir}/org/apache/felix/bundlerepository/impl/manifest.mf"
jarfile="${bundle.dir}/bundlerepository.jar"
basedir="${output.dir}">
<include name="org/apache/felix/bundlerepository/**"/>
</jar>
</target>
<!-- Clean up everything. -->
<target name="clean">
<delete dir="${output.dir}"/>
<delete dir="${bundle.dir}"/>
<delete file="${lib.dir}/osgi.jar"/>
<delete file="${lib.dir}/moduleloader.jar"/>
<delete file="${lib.dir}/felix.jar"/>
</target>
</project>