Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 109 lines (85 sloc) 2.751 kb
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
<?xml version='1.0'?>
<project name="MongoDB Java Driver" default="compile" basedir=".">

  <property name="version" value="0.2"/>
  <property name="targetdir" location="target"/>
  <property name="testdir" location="${targetdir}/test"/>

  <path id="classpath">
    <fileset dir="lib">
      <include name="**/*.jar"/>
    </fileset>
    <pathelement path="conf" />
    <pathelement path="build" />

  </path>

  <target name="init">
    <mkdir dir="build" />
    <mkdir dir="logs" />
    <mkdir dir="${testdir}" />
  </target>

  <target name="clean">
    <delete dir="build"/>
  </target>

  <target name="compile" depends="init">

    <javac srcdir="src/main"
           destdir="build"
           optimize="off"
           deprecation="off"
           source="1.5"
           encoding="ISO-8859-1"
           memoryMaximumSize="256M"
           fork="true"
           debug="on" >
      <classpath refid="classpath"/>
    </javac>

    <javac srcdir="src/test"
           destdir="build"
           optimize="off"
           deprecation="off"
           source="1.5"
           encoding="ISO-8859-1"
           debug="on" >
      <classpath refid="classpath"/>
    </javac>

  </target>

  <target name="jar" depends="compile" description="Create driver jar">

    <exec executable="git" output="build/git-hash">
      <arg value="log" />
      <arg value="--pretty=format:%H" />
      <arg value="-1" />
    </exec>

    <jar jarfile="mongo.jar" >
      <fileset dir="build" />
    </jar>
  </target>


  <target name="javadocs" depends="compile" description="Generate API docs">
    <delete dir="docs/"/>
    <javadoc packagenames="com.mongodb.*"
             sourcepath="src/main/"
             defaultexcludes="yes"
             destdir="docs/${version}"
             author="true"
             version="true"
             source="1.5"
             use="true"
             access="package"
             >
      <link href="http://java.sun.com/j2se/1.5/docs/api/" />
      <classpath refid="classpath"/>
    </javadoc>

  </target>

  <target name="rebuild" depends="clean, compile"/>

  <!-- - - - - - - - - - - - - - - - - - - - - - -->
  <!-- test stuff -->
  <!-- - - - - - - - - - - - - - - - - - - - - - -->

  <taskdef name="testng"
           classpathref="classpath"
           classname="org.testng.TestNGAntTask"
           >
  </taskdef>


  <target name="test" depends="compile, test-basic" />


  <target name="test-basic" depends="init, compile">
    <testng classpathref="classpath" outputdir="${testdir}" listeners="com.mongodb.util.TestNGListener" haltonfailure="true" >
      <jvmarg value="-Xmx512M" />
      <xmlfileset dir="." includes="testng.xml"/>
    </testng>
  </target>

</project>
Something went wrong with that request. Please try again.