Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: release406_pre2
Fetching contributors…

Cannot retrieve contributors at this time

214 lines (192 sloc) 9.609 kb
<project name="agraph-java-client" default="clean-build">
<property environment="env"/>
<!-- if these AGRAPH env vars are blank, the java test code will look elsewhere -->
<property name="env.AGRAPH_HOST" value=""/>
<property name="env.AGRAPH_PORT" value=""/>
<property name="env.root" value=""/>
<property name="env.version" value=""/>
<!-- Library. -->
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="build" location="classes"/>
<property name="jarfile" location="agraph.jar"/>
<path id="classpath">
<path location="${lib}/json.jar"/>
<path location="${lib}/junit-4.8.1.jar"/>
<path location="${lib}/sesame-2.3.1/commons-codec-1.3.jar"/>
<path location="${lib}/sesame-2.3.1/commons-httpclient-3.1.jar"/>
<path location="${lib}/sesame-2.3.1/commons-logging-1.1.1.jar"/>
<path location="${lib}/sesame-2.3.1/openrdf-sesame-2.3.1-onejar.jar"/>
<path location="${lib}/sesame-2.3.1/slf4j-api-1.5.8.jar"/>
<path location="${lib}/sesame-2.3.1/slf4j-nop-1.5.8.jar"/>
<path location="${lib}/jena-2.6.2/arq-2.8.1.jar"/>
<path location="${lib}/jena-2.6.2/icu4j-3.4.4.jar"/>
<path location="${lib}/jena-2.6.2/iri-0.7.jar"/>
<path location="${lib}/jena-2.6.2/jena-2.6.2-tests.jar"/>
<path location="${lib}/jena-2.6.2/jena-2.6.2.jar"/>
<path location="${lib}/jena-2.6.2/lucene-core-2.3.1.jar"/>
<path location="${lib}/jena-2.6.2/stax-api-1.0.1.jar"/>
<path location="${lib}/jena-2.6.2/wstx-asl-3.2.9.jar"/>
<path location="${lib}/jena-2.6.2/xercesImpl-2.7.1.jar"/>
</path>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="clean"
description="Remove generated files and directories.">
<delete dir="${build}"/>
<delete file="${jarfile}"/>
<ant dir="clojure" target="clean" inheritall="false"/>
</target>
<target name="compile" depends="init"
description="Compile Java sources.">
<javac srcdir="${src}" destdir="${build}" encoding="utf8"
debug="true"
includes="**/*.java"
classpathref="classpath"/>
</target>
<manifestclasspath property="mf.path" jarfile="${jarfile}">
<classpath refid="classpath"/>
</manifestclasspath>
<target name="build"
description="Create jar file."
depends="clean, compile">
<tstamp prefix="jar">
<format property="datestamp" pattern="yyyy-MM-dd H:mm"/>
</tstamp>
<jar jarfile="${jarfile}">
<fileset dir="${build}" includes="**/*.class">
<exclude name="tutorial/**"/>
<exclude name="test/**"/>
<exclude name="*.class"/>
</fileset>
<manifest>
<attribute name="Implementation-Title" value="AllegroGraph Java Client"/>
<attribute name="Implementation-Version" value="${env.version}"/>
<attribute name="Implementation-Vendor" value="Franz, Inc."/>
<attribute name="Implementation-URL" value="http://www.franz.com/agraph/"/>
<attribute name="Built-At" value="${jar.datestamp}"/>
<attribute name="Class-Path" value="${mf.path}"/>
</manifest>
</jar>
</target>
<target name="clean-build" depends="clean, build"
description="clean, and build jar">
</target>
<target name="prepush"
description="Tests required before git push: clean, build, and run Java and Clojure client tests"
depends="clean-build, test-prepush">
<ant dir="clojure" target="prepush" inheritall="false"/>
</target>
<macrodef name="run-java"
description="Run java class">
<attribute name="tasknamex" default="java"/>
<attribute name="classname"/>
<attribute name="arg"/>
<attribute name="maxmemory" default="128m"/>
<sequential>
<property name="log" value="info"/>
<java classname="@{classname}" failonerror="true" taskname="@{tasknamex}"
fork="true" maxmemory="@{maxmemory}">
<sysproperty key="org.apache.commons.logging.Log"
value="org.apache.commons.logging.impl.SimpleLog"/>
<sysproperty key="org.apache.commons.logging.simplelog.defaultlog"
value="${log}"/>
<sysproperty key="org.apache.commons.logging.simplelog.log.org"
value="info"/>
<sysproperty key="org.apache.commons.logging.simplelog.log.httpclient"
value="info"/>
<sysproperty key="org.apache.commons.logging.simplelog.showlogname"
value="true"/>
<sysproperty key="AGRAPH_HOST" value="${env.AGRAPH_HOST}"/>
<sysproperty key="AGRAPH_PORT" value="${env.AGRAPH_PORT}"/>
<sysproperty key="AGRAPH_ROOT" value="${env.root}"/>
<classpath>
<path refid="classpath"/>
<path location="classes"/>
</classpath>
<arg value="@{arg}"/>
</java>
</sequential>
</macrodef>
<target name="test-junit"
depends="compile"
description="Run unit tests (use -Dcat=Prepush, Broken, or Stress)
(or use -Dtest=test.stress.TransactionStressTest)">
<property name="cat" value="Prepush"/>
<property name="prefix" value="test.TestSuites$"/>
<property name="test" value="${prefix}${cat}"/>
<property name="log" value="warn"/>
<junit printsummary="no" haltonfailure="yes">
<sysproperty key="org.apache.commons.logging.Log"
value="org.apache.commons.logging.impl.SimpleLog"/>
<sysproperty key="org.apache.commons.logging.simplelog.defaultlog"
value="${log}"/>
<sysproperty key="org.apache.commons.logging.simplelog.log.org"
value="warn"/>
<sysproperty key="org.apache.commons.logging.simplelog.log.httpclient"
value="warn"/>
<sysproperty key="org.apache.commons.logging.simplelog.showlogname"
value="true"/>
<sysproperty key="AGRAPH_HOST" value="${env.AGRAPH_HOST}"/>
<sysproperty key="AGRAPH_PORT" value="${env.AGRAPH_PORT}"/>
<sysproperty key="AGRAPH_ROOT" value="${env.root}"/>
<classpath>
<path refid="classpath"/>
<path location="classes"/>
</classpath>
<formatter type="plain" usefile="no"/>
<test name="${test}"/>
</junit>
</target>
<target name="test-prepush"
depends="compile"
description="run prepush tests">
<run-java tasknamex="test" classname="test.TestRunner" arg="test.TestSuites$Prepush"/>
</target>
<target name="test-broken"
depends="compile"
description="run tests known to be broken">
<run-java tasknamex="test" classname="org.junit.runner.JUnitCore" arg="test.TestSuites$Broken"/>
</target>
<target name="test-stress"
depends="compile"
description="long-running stress tests">
<run-java tasknamex="test" classname="org.junit.runner.JUnitCore" arg="test.TestSuites$Stress"/>
</target>
<target name="test-temp"
depends="compile"
description="">
<property name="cat" value="Temp"/>
<property name="prefix" value="test.TestSuites$"/>
<property name="test" value="${prefix}${cat}"/>
<run-java tasknamex="test" classname="test.TestRunner" arg="${test}"/>
</target>
<target name="test-stress-events"
depends="compile"
description="Run test.stress.Events">
<run-java tasknamex="ev" classname="test.stress.Events" arg="" maxmemory="512m"/>
</target>
<target name="tutorial"
depends="compile"
description="Run tutorial example. Use -Dexample=5 for a specific example, default is all">
<property name="example" value="all"/>
<run-java tasknamex="tutorial" classname="tutorial.TutorialExamples" arg="${example}"/>
</target>
<target name="jena-tutorial"
depends="compile"
description="Run jena examples. Use -Dexample=5 for a specific example, default is all">
<property name="example" value="all"/>
<run-java tasknamex="jena-tutorial" classname="tutorial.JenaTutorialExamples" arg="${example}"/>
</target>
<target name="jena-compliance-tests"
depends="compile"
description="Run jena compliance tests.">
<run-java tasknamex="AGGraphMakerTest " classname="org.junit.runner.JUnitCore" arg="test.AGGraphMakerTest"/>
<run-java tasknamex="AGGraphTest " classname="org.junit.runner.JUnitCore" arg="test.AGGraphTest"/>
<run-java tasknamex="AGModelTest " classname="org.junit.runner.JUnitCore" arg="test.AGModelTest"/>
<run-java tasknamex="AGPrefixMappingTest" classname="org.junit.runner.JUnitCore" arg="test.AGPrefixMappingTest"/>
<run-java tasknamex="AGResultSetTest " classname="org.junit.runner.JUnitCore" arg="test.AGResultSetTest"/>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.