1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
| <?xml version="1.0" encoding="utf-8"?>
<project name="D2RQ" default="all" basedir=".">
<property name="name" value="d2rq"/>
<property name="version" value="0.7.1-dev"/>
<property name="project.package" value="de.fuberlin.wiwiss.d2rq"/>
<property name="project.path" value="de/fuberlin/wiwiss/d2rq"/>
<property name="src" value="src"/>
<property name="src.tests" value="test"/>
<property name="build" value="bldsrc"/>
<property name="build.tests" value="bldtests"/>
<property name="lib" value="lib"/>
<property name="doc" value="doc"/>
<property name="javadoc" value="${doc}/javadoc"/>
<property name="distname" value="${name}-${version}"/>
<property name="jar" value="${lib}/${distname}.jar"/>
<property name="zip" value="${distname}.zip"/>
<property name="tar" value="${distname}.tar.gz"/>
<property name="war" value="${name}.war" />
<property name="vocab.language.dir" value="doc/specification"/>
<property name="vocab.language.n3" value="${vocab.language.dir}/d2rq-rdfs.n3"/>
<property name="vocab.language.rdf" value="${vocab.language.dir}/d2rq-rdfs.rdf"/>
<property name="vocab.language.java" value="${src}/${project.path}/vocab/D2RQ.java"/>
<property name="vocab.language.namespace" value="http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#"/>
<property name="vocab.config.n3" value="${doc}/config.n3"/>
<property name="vocab.config.rdf" value="${doc}/config.rdf"/>
<property name="vocab.config.namespace" value="http://sites.wiwiss.fu-berlin.de/suhl/bizer/d2r-server/config.rdf#"/>
<property name="vocab.config.name" value="D2RConfig"/>
<property name="vocab.config.package" value="${project.package}.vocab"/>
<property name="vocab.config.java" value="${src}/${project.path}/vocab/${vocab.config.name}.java"/>
<path id="project.class.path">
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${java.class.path}"/>
</path>
<patternset id="distfiles">
<include name="**/*"/>
<exclude name=".git/**"/>
<exclude name="${build}/**"/>
<exclude name="${build.tests}/**"/>
<exclude name="build/**"/>
<exclude name="${zip}"/>
<exclude name="${tar}"/>
<exclude name="${war}"/>
<exclude name=".project"/>
<exclude name=".classpath"/>
<exclude name=".settings"/>
<exclude name=".gitignore"/>
<exclude name="velocity.log"/>
</patternset>
<property name="execfiles" value="dump-rdf generate-mapping d2r-server"/>
<target name="clean">
<delete dir="${build}" failonerror="false"/>
<delete dir="${build.tests}" failonerror="false"/>
<delete dir="${javadoc}" failonerror="false"/>
<delete file="${war}" failonerror="false"/>
<delete failonerror="false">
<fileset dir="." includes="${lib}/${name}-*.jar,${name}-*.zip,${name}-*.tar.gz"/>
</delete>
</target>
<target name="init">
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${src}"
destdir="${build}"
debug="on"
source="1.4"
target="1.4"
includeAntRuntime="false">
<classpath refid="project.class.path"/>
</javac>
</target>
<target name="init.tests">
<mkdir dir="${build.tests}"/>
</target>
<target name="compile.tests" depends="init.tests,compile">
<javac srcdir="${src.tests}" destdir="${build.tests}" debug="on" source="1.4" target="1.4">
<classpath>
<path refid="project.class.path"/>
<pathelement path="${build}"/>
<pathelement path="${junit.jar}"/>
</classpath>
</javac>
</target>
<target name="copyfiles.tests" depends="init">
<copy todir="${build.tests}/">
<fileset dir="${src.tests}/">
<include name="${project.path}/**/*.n3"/>
</fileset>
</copy>
</target>
<target name="test" depends="compile.tests,copyfiles.tests">
<java classname="${project.package}.D2RQTestSuite" fork="yes" failonerror="true">
<classpath>
<path refid="project.class.path"/>
<pathelement path="${build}"/>
<pathelement path="${build.tests}"/>
<pathelement path="${junit.jar}"/>
</classpath>
</java>
</target>
<target name="javadoc">
<!-- Creates javadoc documentation for the source
(but not for the tests) -->
<delete dir="${javadoc}"/>
<mkdir dir="${javadoc}"/>
<javadoc packagenames="*"
sourcepath="${src}"
classpathref="project.class.path"
destdir="${javadoc}"
author="true"
version="true"
private="false"
use="true"
splitindex="true"
breakiterator="yes"
windowtitle="D2RQ"
doctitle="D2RQ">
<link href="http://jena.sourceforge.net/javadoc/"/>
<link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
<link href="http://jena.sourceforge.net/ARQ/javadoc/"/>
</javadoc>
</target>
<!--
<target name="jar" depends="compile,test">
-->
<target name="jar" depends="compile">
<jar jarfile="${jar}" basedir="${build}"/>
</target>
<target name="zip" depends="jar,javadoc">
<zip destfile="${zip}">
<zipfileset prefix="${distname}" dir=".">
<patternset refid="distfiles"/>
</zipfileset>
</zip>
</target>
<target name="tar" depends="jar,javadoc">
<tar destfile="${tar}" compression="gzip">
<tarfileset prefix="${distname}" dir="." includes="${execfiles}" mode="755"/>
<tarfileset prefix="${distname}" dir="." excludes="${execfiles}">
<patternset refid="distfiles"/>
</tarfileset>
</tar>
</target>
<target name="all" depends="zip,tar"/>
<target name="vocab.language.schemagen">
<java classname="jena.schemagen" classpathref="project.class.path" fork="yes"
failonerror="true">
<arg value="-i" />
<arg value="file:${vocab.language.n3}" />
<arg value="-o" />
<arg value="${vocab.language.java}" />
<arg value="-a" />
<arg value="${vocab.language.namespace}" />
<arg value="-n" />
<arg value="D2RQ" />
<arg value="--package" />
<arg value="${project.package}.vocab" />
<arg value="--rdfs" />
</java>
<!-- schemagen generates broken Java code for the "class" property,
we fix it by search&replace -->
<replace file="${vocab.language.java}" token="Property class" value="Property class_"/>
<!-- schemagen generates a field "class_Map" for d2rq:classMap for some reason,
we fix it by search&replace -->
<replace file="${vocab.language.java}" token="class_Map" value="classMap"/>
</target>
<target name="vocab.config.schemagen">
<java classname="jena.schemagen" classpathref="project.class.path" fork="yes"
failonerror="true">
<arg value="-i"/>
<arg value="file:${vocab.config.n3}"/>
<arg value="-o"/>
<arg value="${vocab.config.java}"/>
<arg value="-a"/>
<arg value="${vocab.config.namespace}"/>
<arg value="-n"/>
<arg value="${vocab.config.name}"/>
<arg value="--package"/>
<arg value="${vocab.config.package}"/>
<arg value="--rdfs"/>
</java>
</target>
<target name="vocab.language.toXML">
<java classname="jena.rdfcopy" classpathref="project.class.path" fork="yes"
output="${vocab.language.rdf}" logError="yes" failonerror="true">
<arg value="${vocab.language.n3}"/>
<arg value="N3"/>
<arg value="RDF/XML-ABBREV"/>
</java>
</target>
<target name="vocab.config.toXML">
<java classname="jena.rdfcopy" classpathref="project.class.path" fork="yes"
output="${vocab.config.rdf}" logError="yes" failonerror="true">
<arg value="${vocab.config.n3}"/>
<arg value="N3"/>
<arg value="RDF/XML-ABBREV"/>
</java>
</target>
<target name="vocab" depends="vocab.language.toXML,vocab.language.schemagen,vocab.config.toXML,vocab.config.schemagen"/>
<target name="war" depends="jar">
<war destfile="${war}" needxmlfile="false">
<fileset dir="webapp/">
<include name="**"/>
<exclude name="WEB-INF"/>
</fileset>
<lib dir="${lib}">
<exclude name="servlet-api-*.jar"/>
<exclude name="*/*"/><!-- Do not recurse into subdirectories -->
</lib>
<!-- Include subdirectories directly, so that the files are all
in the main lib directory. Otherwise, Tomcat won't pick up the jars -->
<lib dir="${lib}/arq"/>
<lib dir="${lib}/logging">
<exclude name="logging/commons-logging-*.jar"/>
</lib>
<lib dir="${lib}/db-drivers"/>
<webinf dir="webapp/WEB-INF">
<include name="*"/>
<exclude name="templates"/>
</webinf>
<classes dir="etc"/>
<classes dir="webapp/WEB-INF/templates"/>
</war>
</target>
</project> |
Partager