protege: protege4/protege-standalone/trunk/build.xml
<?xml version = "1.0" encoding = "UTF-8"?>
<project name = "protege" default = "run" basedir = ".">
<!--
** This property allows a user to override properties used in this build file.
** Most likely the user will be overriding the default locations of the plugin projects.
-->
<property file = "local.properties"/>
<!--
** This helps development with IDE's where the plugins may be located in a different place
** with respect to directory containing this build file.
-->
<property name = "plugin.dir" location = "./plugins"/>
<!-- location of common libraries and distribution directories -->
<property name = "build.dir" location="./build"/>
<property name = "dist.dir" location = "${build.dir}/dist"/>
<property name = "bundles.dir" location="${dist.dir}/bundles"/>
<property name = "osgi.framework" location="./osgi/equinox/org.eclipse.osgi.jar"/>
<property name = "osgi.common" location="./osgi/common"/>
<property name = "junit.lib" location="./lib/junit.jar"/>
<!-- compiler setting used across many plug-ins -->
<property name = "debug" value = "on"/>
<property name = "source" value = "1.5"/>
<property name = "includeAntRuntime" value = "no"/>
<!-- junit properties -->
<property name = "junit.haltonerror" value = "true"/>
<property name = "junit.haltonfailure" value = "true"/>
<property name = "junit.memory" value = "700M"/>
<!-- javadoc properties -->
<property name = "javadoc.dir" location="${dist.dir}/javadoc"/>
<path id = "osgi.libs">
<pathelement path = "${osgi.framework}"/>
<fileset dir = "${osgi.common}" includes = "*.jar"/>
</path>
<!-- =================================================================== -->
<!-- INIT - create the standard directory structure for OSGi bundles -->
<!-- =================================================================== -->
<target name = "init">
<!-- top-level distribution directory -->
<mkdir dir = "${dist.dir}"/>
<!-- bundles directory for all various bundles -->
<mkdir dir = "${bundles.dir}"/>
</target>
<!-- =================================================================== -->
<!-- COMMONLIBS - create distribution for the common bundle -->
<!-- =================================================================== -->
<!-- common name -->
<property name = "commonlibs.name" value = "org.protege.common"/>
<!-- common location -->
<property name = "commonlibs.dir" location = "${plugin.dir}/${commonlibs.name}"/>
<!-- common classes directory -->
<property name = "commonlibs.classes" value = "${build.dir}/classes/${commonlibs.name}"/>
<!-- common build file -->
<property name = "commonlibs.build.file" location = "${commonlibs.dir}/build.xml"/>
<path id = "commonlibs.classpath">
<fileset dir="${commonlibs.dir}/lib" includes="*.jar"/>
</path>
<property name = "commonlibs.jar" location="${bundles.dir}/${commonlibs.name}.jar"/>
<target name = "commonlibs" depends="init">
<ant antfile = "${commonlibs.build.file}" target = "${sub.target}" inheritRefs = "true"/>
</target>
<!-- =================================================================== -->
<!-- CORE - create distribution for the core application bundle -->
<!-- =================================================================== -->
<!-- core name -->
<property name = "core.name" value = "org.protege.editor.core.application"/>
<!-- core location -->
<property name = "core.dir" location = "${plugin.dir}/${core.name}"/>
<!-- core classes directory -->
<property name = "core.classes" value = "${build.dir}/classes/${core.name}"/>
<!-- core build file -->
<property name = "core.build.file" location = "${core.dir}/build.xml"/>
<property name = "core.jar" location="${bundles.dir}/${core.name}.jar"/>
<path id = "core.classpath">
<fileset dir="${core.dir}/lib" includes="*.jar"/>
</path>
<target name = "core" depends="commonlibs">
<ant antfile = "${core.build.file}" target = "${sub.target}" inheritRefs = "true"/>
</target>
<!-- =================================================================== -->
<!-- OWLAPI - create distribution for the owlapi bundle -->
<!-- =================================================================== -->
<property name = "owlapi.name" value = "org.semanticweb.owl.owlapi"/>
<!-- core location -->
<property name = "owlapi.dir" location = "${plugin.dir}/${owlapi.name}"/>
<!-- core classes directory -->
<property name = "owlapi.classes" value = "${build.dir}/classes/${owlapi.name}"/>
<!-- core build file -->
<property name = "owlapi.build.file" location = "${owlapi.dir}/build.xml"/>
<property name = "owlapi.jar" location="${bundles.dir}/${owlapi.name}.jar"/>
<path id = "owlapi.classpath">
<fileset dir="${owlapi.dir}/lib" includes="*.jar"/>
</path>
<target name = "owlapi" depends="commonlibs">
<ant antfile = "${owlapi.build.file}" target = "${sub.target}" inheritRefs = "true"/>
</target>
<!-- =================================================================== -->
<!-- OWL EDITOR - create distribution for the protege-owl editor bundle -->
<!-- =================================================================== -->
<property name = "owleditor.name" value = "org.protege.editor.owl"/>
<!-- owl editor location -->
<property name = "owleditor.dir" location = "${plugin.dir}/${owleditor.name}"/>
<!-- owl editor classes directory -->
<property name = "owleditor.classes" value = "${build.dir}/classes/${owleditor.name}"/>
<!-- owl editor build file -->
<property name = "owleditor.build.file" location = "${owleditor.dir}/build.xml"/>
<property name = "owleditor.jar" location="${bundles.dir}/${owleditor.name}.jar"/>
<target name = "owleditor" depends="commonlibs, owlapi, core">
<ant antfile = "${owleditor.build.file}" target = "${sub.target}" inheritRefs = "true"/>
</target>
<!-- =================================================================== -->
<!-- FACT++ - create distribution for the fact++ bundle -->
<!-- =================================================================== -->
<property name = "factpp.name" value = "uk.ac.manchester.cs.owl.factplusplus"/>
<!-- factplusplus location -->
<property name = "factpp.dir" location = "${plugin.dir}/${factpp.name}"/>
<!-- factplusplus classes directory -->
<property name = "factpp.classes" value = "${build.dir}/classes/${factpp.name}"/>
<!-- factplusplus build file -->
<property name = "factpp.build.file" location = "${factpp.dir}/build.xml"/>
<property name = "factpp.jar" location="${bundles.dir}/${factpp.name}.jar"/>
<path id = "factpp.classpath">
<fileset dir="${factpp.dir}/lib" includes="*.jar"/>
</path>
<target name = "factpp" depends="commonlibs, owlapi, core, owleditor" unless = "factpp.ignore">
<ant antfile = "${factpp.build.file}" target = "${sub.target}" inheritRefs = "true"/>
</target>
<!-- =================================================================== -->
<!-- DLQUERY - create distribution for the dlquery bundle -->
<!-- =================================================================== -->
<property name = "dlquery.name" value = "org.coode.dlquery"/>
<!-- dlquery location -->
<property name = "dlquery.dir" location = "${plugin.dir}/${dlquery.name}"/>
<!-- dlquery classes directory -->
<property name = "dlquery.classes" value = "${build.dir}/classes/${dlquery.name}"/>
<!-- dlquery build file -->
<property name = "dlquery.build.file" location = "${dlquery.dir}/build.xml"/>
<property name = "dlquery.jar" location="${bundles.dir}/${dlquery.name}.jar"/>
<target name = "dlquery" depends="commonlibs, owlapi, core, owleditor" unless = "dlquery.ignore">
<ant antfile = "${dlquery.build.file}" target = "${sub.target}" inheritRefs = "true"/>
</target>
<!-- =================================================================== -->
<!-- OWLVIZ - create distribution for the owlviz bundle -->
<!-- =================================================================== -->
<property name = "owlviz.name" value = "org.coode.owlviz"/>
<!-- owlviz location -->
<property name = "owlviz.dir" location = "${plugin.dir}/${owlviz.name}"/>
<!-- owlviz classes directory -->
<property name = "owlviz.classes" value = "${build.dir}/classes/${owlviz.name}"/>
<!-- owlviz build file -->
<property name = "owlviz.build.file" location = "${owlviz.dir}/build.xml"/>
<property name = "owlviz.jar" location="${bundles.dir}/${owlviz.name}.jar"/>
<target name = "owlviz" depends="commonlibs, owlapi, core, owleditor" unless = "owlviz.ignore">
<ant antfile = "${owlviz.build.file}" target = "${sub.target}" inheritRefs = "true"/>
</target>
<!-- =================================================================== -->
<!-- INNER TARGETS -->
<!-- =================================================================== -->
<target name = "inner.targets" depends = "commonlibs, core, owlapi, owleditor, dlquery, owlviz, factpp"/>
<target name = "bnd">
<antcall target="inner.targets">
<param name="sub.target" value="bnd"/>
</antcall>
<antcall target="extract.manifests">
<param name="bundle.name" value="${owlapi.name}"/>
</antcall>
<antcall target="extract.manifests">
<param name="bundle.name" value="${core.name}"/>
</antcall>
<antcall target="extract.manifests">
<param name="bundle.name" value="${owleditor.name}"/>
</antcall>
</target>
<target name = "extract.manifests">
<unjar src = "${bundles.dir}/${bundle.name}.jar"
dest = "${build.dir}">
<patternset>
<include name="META-INF/MANIFEST.MF"/>
</patternset>
</unjar>
<move file="${build.dir}/META-INF/MANIFEST.MF"
tofile="${plugin.dir}/${bundle.name}/META-INF/MANIFEST.MF"
overwrite="true"/>
<delete dir="${build.dir}/META-INF"/>
</target>
<target name = "bundles.with.src">
<antcall target="inner.targets">
<param name="sub.target" value="src.bundle"/>
</antcall>
</target>
<target name = "bundles">
<antcall target="inner.targets">
<param name="sub.target" value="bundle"/>
</antcall>
</target>
<target name = "compile.all">
<antcall target="inner.targets">
<param name="sub.target" value="compile"/>
</antcall>
</target>
<target name = "junit">
<antcall target="inner.targets">
<param name="sub.target" value="junit"/>
</antcall>
</target>
<!-- =================================================================== -->
<!-- Javadoc - Runs better as a single target -->
<!-- =================================================================== -->
<target name = "javadoc" depends = "bundles">
<mkdir dir = "${javadoc.dir}"/>
<javadoc destdir = "${javadoc.dir}"
doctitle = "Protege 4.0.1"
windowtitle = "Protege 4.0.1"
footer = "Protege 4.0.1"
header = "Protege 4.0.1"
author = "true"
defaultexcludes = "yes"
source = "1.5"
linksource = "no"
maxmemory = "500M">
<sourcepath>
<pathelement path = "${dlquery.dir}/src"/>
<pathelement path = "${owlviz.dir}/src"/>
<pathelement path = "${commonlibs.dir}/src"/>
<pathelement path = "${core.dir}/src"/>
<pathelement path = "${owleditor.dir}/src"/>
<pathelement path = "${owlapi.dir}/src"/>
<pathelement path = "${factpp.dir}/src"/>
</sourcepath>
<classpath>
<!-- osgi -->
<path refid = "osgi.libs"/>
<!-- dlquery -->
<pathelement path = "${dlquery.jar}"/>
<!-- owlviz -->
<pathelement path = "${owlviz.jar}"/>
<!-- commonlibs -->
<pathelement path = "${commonlibs.jar}"/>
<path refid = "commonlibs.classpath"/>
<!-- core -->
<pathelement location = "${core.jar}"/>
<path refid = "core.classpath"/>
<!-- owleditor -->
<pathelement path = "${owleditor.jar}"/>
<!-- owlapi -->
<pathelement path = "${owlapi.jar}"/>
<!-- owlapi -->
<path refid = "owlapi.classpath"/>
<!-- factplusplus -->
<pathelement location = "${factpp.jar}"/>
<path refid = "factpp.classpath"/>
</classpath>
<link href = "http://java.sun.com/j2se/1.5.0/docs/api/"/>
<bottom><![CDATA[<small><a href=mailto:p4-feedback@lists.stanford.edu>Submit a bug report or feature request</a></small>]]></bottom>
</javadoc>
</target>
<!-- =================================================================== -->
<!-- OSGI Implementations: Knopflerfish, Equinox, IDE -->
<!-- =================================================================== -->
<!-- =================================================================== -->
<!-- EQUINOX - create an equinox-based distribution -->
<!-- =================================================================== -->
<target name = "equinox" depends = "bundles">
<ant antfile = "osgi/build-equinox.xml" target = "equinox" inheritRefs = "true"/>
</target>
<target name = "run.equinox" depends = "equinox">
<ant antfile = "osgi/build-equinox.xml" target = "run.equinox" inheritRefs = "true"/>
</target>
<target name = "debug.equinox" depends = "equinox">
<ant antfile = "osgi/build-equinox.xml" target = "debug.equinox" inheritRefs = "true"/>
</target>
<!-- =================================================================== -->
<!-- FELIX - create a felix-based distribution -->
<!-- =================================================================== -->
<target name = "felix" depends = "bundles">
<ant antfile = "osgi/build-felix.xml" target = "felix" inheritRefs = "true"/>
</target>
<target name = "run.felix" depends = "felix">
<ant antfile = "osgi/build-felix.xml" target = "run.felix" inheritRefs = "true"/>
</target>
<target name = "debug.felix" depends = "felix">
<ant antfile = "osgi/build-felix.xml" target = "debug.felix" inheritRefs = "true"/>
</target>
<!-- =================================================================== -->
<!-- IDE - A non-standard OSGi setup to make life easier for developers using IDEs. -->
<!-- For debug purposes only. Not for distribution. -->
<!-- =================================================================== -->
<target name = "ide" depends = "bundles">
<ant antfile = "osgi/build-ide.xml" target = "ide" inheritRefs = "true"/>
</target>
<target name = "run.ide" depends = "ide">
<ant antfile = "osgi/build-ide.xml" target = "run.ide" inheritRefs = "true"/>
</target>
<target name = "debug.ide" depends = "ide">
<ant antfile = "osgi/build-ide.xml" target = "debug.ide" inheritRefs = "true"/>
</target>
<!-- =================================================================== -->
<!-- KNOPFLERFISH - create a knopflerfish-based distribution -->
<!-- =================================================================== -->
<target name = "knopflerfish" depends = "bundles">
<ant antfile = "osgi/build-knopflerfish.xml" target = "knopflerfish" inheritRefs = "true"/>
</target>
<target name = "run.knopflerfish" depends = "knopflerfish">
<ant antfile = "osgi/build-knopflerfish.xml" target = "run.knopflerfish" inheritRefs = "true"/>
</target>
<target name = "debug.knopflerfish" depends = "knopflerfish">
<ant antfile = "osgi/build-knopflerfish.xml" target = "debug.knopflerfish" inheritRefs = "true"/>
</target>
<!-- =================================================================== -->
<!-- OSX - create an os x application bundle based on felix -->
<!-- =================================================================== -->
<target name = "osx" depends = "bundles">
<ant antfile = "osgi/build-osx.xml" target = "osx" inheritRefs = "true"/>
</target>
<!-- =================================================================== -->
<!-- RUN - run the Protege application -->
<!-- =================================================================== -->
<target name="run" depends = "run.equinox"/>
<!-- =================================================================== -->
<!-- DEBUG - debug the Protege application -->
<!-- =================================================================== -->
<target name="debug" depends = "debug.equinox"/>
<!-- =================================================================== -->
<!-- CLEAN -->
<!-- =================================================================== -->
<target name = "clean">
<delete dir="${build.dir}"/>
</target>
<!-- =================================================================== -->
<!-- USAGE -->
<!-- =================================================================== -->
<target name="usage">
<echo message = "equinox - build an eclipse based distribution"/>
<echo message = "run - build the default distribution and run it"/>
<echo message = "clean - clean all built files except for the manifests"/>
<echo message = "debug - start up a remote debug (hard core people only)"/>
<echo message = "felix - build a felix based distribution"/>
<echo message = "knopflerfish - build a knopflerfish distribution"/>
<echo message = "osx - build a standalone os x application (based on felix)"/>
<echo message = "bnd - update the manifests"/>
<echo message = "bundles.with.src - build the bundles with sources included"/>
<echo message = "bundles - build the bundles that are used with general distribution"/>
<echo message = "javadoc - build the java doc"/>
</target>
</project>