cleaned up build.xml
This commit is contained in:
parent
50b6a75ccc
commit
4e3a68a38d
1 changed files with 23 additions and 81 deletions
104
build.xml
104
build.xml
|
@ -1,7 +1,7 @@
|
||||||
<?xml version = "1.0" encoding = "utf-8"?>
|
<?xml version = "1.0" encoding = "utf-8"?>
|
||||||
<project name = "sample plugin project" default = "install" basedir = ".">
|
<project name = "sample plugin project" default = "install" basedir = ".">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
To run this build file set the environment variable
|
To run this build file set the environment variable
|
||||||
PROTEGE_HOME to point to a protege distribution and type ant
|
PROTEGE_HOME to point to a protege distribution and type ant
|
||||||
install or jar.
|
install or jar.
|
||||||
|
@ -14,20 +14,9 @@
|
||||||
|
|
||||||
<property file="local.properties"/>
|
<property file="local.properties"/>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
**** CHANGE ME ****
|
|
||||||
|
|
||||||
This setting defines the name of the plugin.
|
|
||||||
This may be the only setting that the developer needs to
|
|
||||||
change.
|
|
||||||
-->
|
|
||||||
<property name = "plugin" value = "de.unibremen.informatik.hets"/>
|
<property name = "plugin" value = "de.unibremen.informatik.hets"/>
|
||||||
|
|
||||||
<!--
|
<property name = "src" location = "./src"/>
|
||||||
these properties probably don't need changing
|
|
||||||
-->
|
|
||||||
<property name = "src" location = "./src"/>
|
|
||||||
<property name = "build" location = "./build"/>
|
<property name = "build" location = "./build"/>
|
||||||
<property name = "bundle.dir" location = "${build}"/>
|
<property name = "bundle.dir" location = "${build}"/>
|
||||||
<property name = "classes" location = "${build}/classes"/>
|
<property name = "classes" location = "${build}/classes"/>
|
||||||
|
@ -45,9 +34,8 @@
|
||||||
</tstamp>
|
</tstamp>
|
||||||
<mkdir dir = "${build}"/>
|
<mkdir dir = "${build}"/>
|
||||||
<mkdir dir = "${classes}"/>
|
<mkdir dir = "${classes}"/>
|
||||||
<!-- <mkdir dir = "${classes}/lib"/> -->
|
|
||||||
<mkdir dir = "${genlib}"/>
|
<mkdir dir = "${genlib}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- ============================================================= -->
|
<!-- ============================================================= -->
|
||||||
<!-- Configuring the Compile Classpath -->
|
<!-- Configuring the Compile Classpath -->
|
||||||
|
@ -65,14 +53,6 @@
|
||||||
<fail message = "missing protege libraries"/>
|
<fail message = "missing protege libraries"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!--
|
|
||||||
**** CHANGE ME ****
|
|
||||||
|
|
||||||
The following target only needs to be modified if the user
|
|
||||||
needs to change the classpath. It is preconfigured to use
|
|
||||||
the common protege 4 jars, the lib directory and the
|
|
||||||
libraries that have been uncovered in buildlibs.
|
|
||||||
-->
|
|
||||||
<target name = "checkProtegeLibs" depends="init">
|
<target name = "checkProtegeLibs" depends="init">
|
||||||
<echo message="Using Protege Home = ${protege.home} to find protege jars"/>
|
<echo message="Using Protege Home = ${protege.home} to find protege jars"/>
|
||||||
<condition property="libs.found">
|
<condition property="libs.found">
|
||||||
|
@ -80,32 +60,21 @@
|
||||||
<available file="${protege.osgi}" type="file"/>
|
<available file="${protege.osgi}" type="file"/>
|
||||||
<available file="${equinox.common}" type = "file"/>
|
<available file="${equinox.common}" type = "file"/>
|
||||||
<available file="${equinox.registry}" type = "file"/>
|
<available file="${equinox.registry}" type = "file"/>
|
||||||
<!-- <available file="${owl.editor.jar}" type = "file"/> -->
|
<available file="${owl.editor.jar}" type = "file"/>
|
||||||
<available file="${owl.lib}" type="file"/>
|
<available file="${owl.lib}" type="file"/>
|
||||||
</and>
|
</and>
|
||||||
</condition>
|
</condition>
|
||||||
<path id = "project.classpath">
|
<path id = "project.classpath">
|
||||||
<pathelement location="${protege.osgi}"/>
|
<pathelement location="${protege.osgi}"/>
|
||||||
<pathelement location="${protege.lib}"/>
|
<pathelement location="${protege.lib}"/>
|
||||||
<pathelement location="${equinox.common}"/>
|
<pathelement location="${equinox.common}"/>
|
||||||
<pathelement location="${equinox.registry}"/>
|
<pathelement location="${equinox.registry}"/>
|
||||||
<pathelement location="${owl.editor.jar}"/>
|
<pathelement location="${owl.editor.jar}"/>
|
||||||
<pathelement location="${owl.lib}"/>
|
<pathelement location="${owl.lib}"/>
|
||||||
<!-- <fileset dir="${lib}"/> -->
|
|
||||||
<fileset dir="${genlib}"/>
|
<fileset dir="${genlib}"/>
|
||||||
</path>
|
</path>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
**** CHANGE ME ****
|
|
||||||
|
|
||||||
The following target only needs to be modified if the
|
|
||||||
developer needs to obtain some jar files that are contained in
|
|
||||||
the Protege bundles. The contents of these jar files are
|
|
||||||
found when Protege 4 runs but may be needed in order to
|
|
||||||
compile the plugin.
|
|
||||||
-->
|
|
||||||
<target name = "buildlibs" depends="checkProtegeLibsAndReport">
|
<target name = "buildlibs" depends="checkProtegeLibsAndReport">
|
||||||
<unjar dest="${build}"
|
<unjar dest="${build}"
|
||||||
src="${common.lib}">
|
src="${common.lib}">
|
||||||
|
@ -116,18 +85,6 @@
|
||||||
</unjar>
|
</unjar>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
**** CHANGE ME ****
|
|
||||||
|
|
||||||
Here is the copy.resources target. It may need modification
|
|
||||||
to copy the right resources into the classes directory. By
|
|
||||||
default it already copies non-java files found in the source
|
|
||||||
directory, the libraries needed by the project and the
|
|
||||||
viewconfig and the plugin.xml. This will be sufficient in
|
|
||||||
many cases.
|
|
||||||
-->
|
|
||||||
<target name="copy.resources" depends="build.manifest">
|
<target name="copy.resources" depends="build.manifest">
|
||||||
<copy todir="${classes}">
|
<copy todir="${classes}">
|
||||||
<fileset dir="${src}">
|
<fileset dir="${src}">
|
||||||
|
@ -137,27 +94,18 @@
|
||||||
<exclude name="**/manifest.mf"/>
|
<exclude name="**/manifest.mf"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<!-- <copy todir="${classes}/lib">
|
|
||||||
<fileset dir="${lib}" excludes="junit*.jar"/>
|
|
||||||
</copy> -->
|
|
||||||
<copy todir="${classes}">
|
<copy todir="${classes}">
|
||||||
<fileset dir="." includes="*.xml">
|
<fileset dir="." includes="*.xml">
|
||||||
<exclude name="build.xml"/>
|
<exclude name="build.xml"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<!-- the manifest doesn't belong here but this is good for IDE's -->
|
<!-- the manifest doesn't belong here but this is good for IDE's -->
|
||||||
<mkdir dir="${classes}/META-INF"/>
|
<mkdir dir="${classes}/META-INF"/>
|
||||||
<copy todir="${classes}/META-INF"
|
<copy todir="${classes}/META-INF"
|
||||||
file = "${manifest}"/>
|
file = "${manifest}"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
||||||
<!--
|
|
||||||
It is less likely that the developer will want to make changes
|
|
||||||
below this line
|
|
||||||
-->
|
|
||||||
<!-- ============================================================= -->
|
|
||||||
|
|
||||||
<target name = "jjtree">
|
<target name = "jjtree">
|
||||||
<jjtree target="./src/de/unibremen/informatik/hets/grammar/HetCASLGrammar.jjt"
|
<jjtree target="./src/de/unibremen/informatik/hets/grammar/HetCASLGrammar.jjt"
|
||||||
outputdirectory="./src/de/unibremen/informatik/hets/grammar/"
|
outputdirectory="./src/de/unibremen/informatik/hets/grammar/"
|
||||||
|
@ -174,17 +122,17 @@
|
||||||
|
|
||||||
<target name = "compile" depends = "buildlibs, checkProtegeLibsAndReport, javacc">
|
<target name = "compile" depends = "buildlibs, checkProtegeLibsAndReport, javacc">
|
||||||
<javac srcdir = "${src}"
|
<javac srcdir = "${src}"
|
||||||
destdir = "${classes}"
|
destdir = "${classes}"
|
||||||
debug="on"
|
debug="on"
|
||||||
includeAntRuntime="false">
|
includeAntRuntime="false">
|
||||||
<classpath refid = "project.classpath"/>
|
<classpath refid = "project.classpath"/>
|
||||||
</javac>
|
</javac>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="build.manifest">
|
<target name="build.manifest">
|
||||||
<copy tofile="${manifest}"
|
<copy tofile="${manifest}"
|
||||||
file="META-INF/MANIFEST.MF" overwrite="true"/>
|
file="META-INF/MANIFEST.MF" overwrite="true"/>
|
||||||
<manifest file="${manifest}"
|
<manifest file="${manifest}"
|
||||||
mode = "update">
|
mode = "update">
|
||||||
<attribute name="Built-By" value = "${user.name}"/>
|
<attribute name="Built-By" value = "${user.name}"/>
|
||||||
<attribute name="Build-Date" value = "${build.time}"/>
|
<attribute name="Build-Date" value = "${build.time}"/>
|
||||||
|
@ -193,7 +141,7 @@
|
||||||
|
|
||||||
<target name = "jar" depends = "compile, copy.resources">
|
<target name = "jar" depends = "compile, copy.resources">
|
||||||
<jar jarfile = "${build}/${plugin}.jar"
|
<jar jarfile = "${build}/${plugin}.jar"
|
||||||
basedir = "${classes}"
|
basedir = "${classes}"
|
||||||
manifest = "${build}/manifest.mf"/>
|
manifest = "${build}/manifest.mf"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -201,15 +149,16 @@
|
||||||
<!-- flush cache -->
|
<!-- flush cache -->
|
||||||
<delete dir = "${protege.home}/configuration/org.eclipse.core.runtime"/>
|
<delete dir = "${protege.home}/configuration/org.eclipse.core.runtime"/>
|
||||||
<delete dir = "${protege.home}/configuration/org.eclipse.osgi"/>
|
<delete dir = "${protege.home}/configuration/org.eclipse.osgi"/>
|
||||||
<copy file="${build}/${plugin}.jar"
|
<copy file="${build}/${plugin}.jar"
|
||||||
todir = "${protege.plugins}"
|
todir = "${protege.plugins}"
|
||||||
overwrite = "true"/>
|
overwrite = "true"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name = "run" depends="install">
|
<target name = "run" depends="install">
|
||||||
<java fork = "true"
|
<java dir = "${protege.home}"
|
||||||
dir = "${protege.home}"
|
classname = "org.protege.osgi.framework.Launcher"
|
||||||
jar = "${protege.osgi}">
|
classpath = "${protege.osgi}:${protege.launcher}"
|
||||||
|
fork="true">
|
||||||
<jvmarg value = "-Dfile.encoding=UTF-8"/>
|
<jvmarg value = "-Dfile.encoding=UTF-8"/>
|
||||||
<jvmarg value = "-Xmx500M"/>
|
<jvmarg value = "-Xmx500M"/>
|
||||||
<jvmarg value = "-Dlog4j.configuration=file:log4j.xml"/>
|
<jvmarg value = "-Dlog4j.configuration=file:log4j.xml"/>
|
||||||
|
@ -217,13 +166,13 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name = "debug" depends="install">
|
<target name = "debug" depends="install">
|
||||||
<java fork = "true"
|
<java fork = "true"
|
||||||
dir = "${protege.home}"
|
dir = "${protege.home}"
|
||||||
jar = "${protege.osgi}">
|
jar = "${protege.osgi}">
|
||||||
<jvmarg value = "-Xmx500M"/>
|
<jvmarg value = "-Xmx500M"/>
|
||||||
<jvmarg value = "-Dlog4j.configuration=file:log4j.xml"/>
|
<jvmarg value = "-Dlog4j.configuration=file:log4j.xml"/>
|
||||||
<jvmarg value = "-Dfile.encoding=UTF-8"/>
|
<jvmarg value = "-Dfile.encoding=UTF-8"/>
|
||||||
<jvmarg value = "-Xrunjdwp:transport=dt_socket,address=8500,server=y,suspend=y"/>
|
<jvmarg value = "-Xrunjdwp:transport=dt_socket,address=8500,server=y,suspend=y"/>
|
||||||
</java>
|
</java>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
@ -243,15 +192,11 @@
|
||||||
<echo message = "debug - install the plugin and start protege for debug"/>
|
<echo message = "debug - install the plugin and start protege for debug"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<property name="equinox.common"
|
||||||
<!--
|
|
||||||
Standard properties that should not require changing
|
|
||||||
-->
|
|
||||||
<property name="equinox.common"
|
|
||||||
location="${protege.common}/org.eclipse.equinox.common.jar"/>
|
location="${protege.common}/org.eclipse.equinox.common.jar"/>
|
||||||
<property name="equinox.registry"
|
<property name="equinox.registry"
|
||||||
location="${protege.common}/org.eclipse.equinox.registry.jar"/>
|
location="${protege.common}/org.eclipse.equinox.registry.jar"/>
|
||||||
<property name="protege.lib"
|
<property name="protege.lib"
|
||||||
location="${protege.common}/org.protege.editor.core.application.jar"/>
|
location="${protege.common}/org.protege.editor.core.application.jar"/>
|
||||||
<property name="common.lib"
|
<property name="common.lib"
|
||||||
location="${protege.common}/org.protege.common.jar"/>
|
location="${protege.common}/org.protege.common.jar"/>
|
||||||
|
@ -261,7 +206,4 @@
|
||||||
|
|
||||||
<property name="owl.editor.jar"
|
<property name="owl.editor.jar"
|
||||||
location="${protege.plugins}/org.protege.editor.owl.jar"/>
|
location="${protege.plugins}/org.protege.editor.owl.jar"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Reference in a new issue