blob: 21d3452c3135f4d771249f8ef89f271e0e3ccb5c [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/osgi/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/osgi/framework/manifest.mf"
jarfile="${lib.dir}/felix.jar"
basedir="${output.dir}">
<include name="org/apache/osgi/framework/"/>
<exclude name="org/apache/osgi/framework/installer/"/>
</jar>
</target>
<!-- Create shell bundle JAR files. -->
<target name="bundle" depends="compile">
<!-- Shell -->
<jar manifest="${src.dir}/org/apache/osgi/bundle/shell/manifest.mf"
jarfile="${bundle.dir}/shell.jar"
basedir="${output.dir}">
<include name="org/apache/osgi/service/shell/**"/>
<include name="org/ungoverned/osgi/service/shell/**"/>
<include name="org/apache/osgi/bundle/shell/**"/>
</jar>
<!-- Shell TUI -->
<jar manifest="${src.dir}/org/apache/osgi/bundle/shelltui/manifest.mf"
jarfile="${bundle.dir}/shelltui.jar"
basedir="${output.dir}">
<include name="org/apache/osgi/bundle/shelltui/**"/>
</jar>
<!-- OBR -->
<copy file="${lib.dir}/kxml.jar"
todir="${output.dir}/org/apache/osgi/bundle/bundlerepository/"/>
<jar manifest="${src.dir}/org/apache/osgi/bundle/bundlerepository/manifest.mf"
jarfile="${bundle.dir}/bundlerepository.jar"
basedir="${output.dir}">
<include name="org/apache/osgi/bundle/bundlerepository/**"/>
<include name="org/apache/osgi/service/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>