Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: agraph32
Fetching contributors…

Cannot retrieve contributors at this time

123 lines (109 sloc) 4.717 kB
<project name="agraph-java-client" default="clean-build"
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<!-- Library. -->
<property name="version" value="3.2"/>
<property name="jarfile" location="${ant.project.name}-${version}.jar"/>
<property name="zipfile" location="${ant.project.name}-${version}.zip"/>
<path id="classpath">
<path location="lib/log4j-1.2.12.jar"/>
<path location="lib/openrdf-sesame-2.2-onejar.jar"/>
<path location="lib/slf4j-api-1.4.3.jar"/>
<path location="lib/slf4j-log4j12-1.4.3.jar"/>
<path location="lib/junit-4.7.jar"/>
</path>
<target name="init">
<tstamp/>
<mkdir dir="classes"/>
</target>
<target name="clean"
description="Remove generated files and directories.">
<delete dir="classes" failonerror="no"/>
<delete file="${jarfile}" failonerror="no"/>
<ant dir="clojure" target="clean" inheritall="false"/>
</target>
<target name="compile" depends="init"
description="Compile Java sources.">
<javac srcdir="src" destdir="classes"
debug="true"
includes="com/franz/agsail/*.java
com/franz/agbase/*.java
com/knowledgereefsystems/agsail/AllegroSail.java"
classpathref="classpath"/>
</target>
<target name="build"
description="Create jar file."
depends="clean, compile">
<manifestclasspath property="mf.path" jarfile="${jarfile}">
<classpath refid="classpath"/>
</manifestclasspath>
<jar jarfile="${jarfile}">
<fileset dir="classes" includes="**/*.class"/>
<manifest>
<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">
<ant dir="clojure" target="prepush" inheritall="false"/>
</target>
<macrodef name="run-java"
description="Run java class">
<attribute name="tasknamex" default="java"/>
<attribute name="classname"/>
<element name="args" implicit="true" optional="true"/>
<sequential>
<java classname="@{classname}" failonerror="true" taskname="@{tasknamex}"
fork="true">
<sysproperty key="org.apache.commons.logging.Log"
value="org.apache.commons.logging.impl.NoOpLog"/>
<classpath>
<path refid="classpath"/>
<path location="classes"/>
</classpath>
<args/>
</java>
</sequential>
</macrodef>
<target name="tutorial"
depends="compile"
description="Run tutorial example.">
<javac srcdir="tutorial" destdir="classes"
debug="true"
includes="*.java"
classpathref="classpath"/>
<run-java tasknamex="tutorial" classname="AGExample">
<arg value="-p"/><arg value="4567"/>
<arg value="-d"/><arg value="/tmp/ag32jee/scratch/"/>
<arg value="-n"/><arg value="tutorial"/>
</run-java>
</target>
<target name="dist"
depends="clean"
description="Zips source and jar">
<zip destfile="${zipfile}"
basedir="."
includes="*.*, src/**, test/**, tutorial/**, clojure/**, lib/**"
excludes=".git, *.zip, agraph-3.2.jar, clojure/classes"/>
</target>
<target name="mvn-install"
depends="build"
description="install jars into local maven repo">
<path id="maven-ant-tasks.classpath" path="${user.home}/.m2/repository/org/apache/maven/maven-ant-tasks/2.0.10/maven-ant-tasks-2.0.10.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath" />
<artifact:pom id="agraph" file="pom.xml" />
<artifact:install file="${jarfile}">
<pom refid="agraph"/>
</artifact:install>
<artifact:pom id="sesame" file="pom-sesame.xml" />
<artifact:install file="lib/openrdf-sesame-2.2-onejar.jar">
<pom refid="sesame"/>
</artifact:install>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.