Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 157 lines (143 sloc) 6.241 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 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
<?xml version="1.0"?>
<project name="incanter" default="incanter">

  <description>
    Compile Incanter into a Java JAR.
  </description>

  <property name="src" location="src/main" />
  <property name="build.dir" location="build" />
  <property name="target.dir" location="target" />
  <property name="lib" location="lib" />
  <property name="clojure.jar" location="${lib}/clojure-1.1.0-alpha-SNAPSHOT.jar" />
  <property name="clojure-contrib.jar" location="${lib}/clojure-contrib.jar" />
  <property name="colt.jar" location="${lib}/parallelcolt-0.7.2.jar" />
  <property name="jfreechart.jar" location="${lib}/jfreechart-1.0.13.jar" />
  <property name="processing-core.jar" location="${lib}/processing/core.jar" />
  <property name="arpack-combo.jar" location="${lib}/arpack-combo-0.1.jar" />
  <property name="concurrent.jar" location="${lib}/concurrent.jar" />
  <property name="gnujaxp.jar" location="${lib}/gnujaxp.jar" />
  <property name="jcommon.jar" location="${lib}/jcommon-1.0.16.jar" />
  <property name="jline.jar" location="${lib}/jline-0.9.94.jar" />
  <property name="netlib.jar" location="${lib}/netlib-java-0.9.1.jar" />
  <property name="opencsv.jar" location="${lib}/opencsv-1.8.jar" />
  <property name="joda-time.jar" location="${lib}/joda-time-1.6.jar" />
  <property name="clojure-json.jar" location="${lib}/clojure-json-1.1-SNAPSHOT.jar" />
  <property name="jarfile" location="${target.dir}/incanter-1.0-SNAPSHOT.jar" />
  <property name="core-jarfile" location="${target.dir}/incanter-core-1.0-SNAPSHOT.jar" />
  <property name="LICENSE" location="epl-v10.html" />
  <property name="deps.file" value="deps-1.0.zip"/>
  <property name="deps.url" value="http://cloud.github.com/downloads/liebke/incanter/${deps.file}"/>

  <path id="classpath">
    <path location="${src}/clojure"/>
    <path location="${src}/java"/>
    <path location="${build.dir}" />
    <!-- Incanter core dependencies -->
    <path location="${clojure.jar}"/>
    <!-- Parallel Colt jars -->
    <path location="${colt.jar}"/>
    <path location="${netlib.jar}"/>
    <path location="${arpack-combo.jar}"/>

    <!-- Remaining Incanter dependencies -->
    <path location="${clojure-contrib.jar}"/>
    <!-- incanter.charts dependencies -->
    <path location="${jfreechart.jar}"/>
    <path location="${jcommon.jar}"/>
    <path location="${gnujaxp.jar}"/>
    <!-- incanter.processing dependencies -->
    <path location="${processing-core.jar}"/>
    <!-- incanter.io dependencies -->
    <path location="${opencsv.jar}"/>
    <path location="${clojure-json.jar}"/>
    <!-- incanter.chrono dependencies -->
    <path location="${joda-time.jar}"/>
  </path>

  <target name="init">
    <mkdir dir="${build.dir}" />
    <mkdir dir="${target.dir}" />
  </target>
  
  <target name="compile-java" depends="init"
          description="Compile Java sources.">
          <javac srcdir="${src}/java" destdir="${build.dir}" includeJavaRuntime="yes"
           debug="true" target="1.5">
      <classpath>
        <path location="${src}/java"/>
        <path location="${clojure.jar}"/>
        <path location="${colt.jar}"/>
        <!-- <path location="${clojure-contrib.jar}"/>
<path location="${jfreechart.jar}"/>
<path location="${processing-core.jar}"/>
<path location="${arpack-combo.jar}"/>
<path location="${concurrent.jar}"/>
<path location="${gnujaxp.jar}"/>
<path location="${jcommon.jar}"/>
<path location="${jline.jar}"/>
<path location="${netlib.jar}"/>
<path location="${opencvs.jar}"/>
<path location="${joda-time.jar}"/>
<path location="${clojure-json.jar}"/> -->
        <path location="${build.dir}" />
      </classpath>
    </javac>
  </target>

  <target name="compile-clj" depends="compile-java"
          description="Compile Clojure sources.">
    <java classname="clojure.lang.Compile" fork="true" failonerror="true">
      <sysproperty key="clojure.compile.path" value="${build.dir}"/>
      <classpath refid="classpath" />
      <arg value="incanter.internal" />
      <arg value="incanter.core" />
      <arg value="incanter.stats" />
      <arg value="incanter.charts" />
      <arg value="incanter.processing" />
      <arg value="incanter.io" />
      <arg value="incanter.datasets" />
      <arg value="incanter.optimize" />
      <arg value="incanter.som" />
      <arg value="incanter.bayes" />
      <arg value="incanter.censored" />
      <arg value="incanter.chrono" />
      <arg value="incanter.classification" />
      <arg value="incanter.incremental-stats" />
      <arg value="incanter.information-theory" />
      <arg value="incanter.probability" />
      <arg value="incanter.transformations" />
    </java>
  </target>

  <target name="incanter" depends="compile-clj">
          <jar jarfile="${jarfile}" >
      <fileset dir="${build.dir}" includes="**/*.class"/>
      <!-- <fileset dir="${src}" includes="**/*.clj"/>
<fileset dir="${src}" includes="**/*.java"/> -->
      <manifest>
        <attribute name="Class-Path" value="."/>
      </manifest>
    </jar>
  </target>
  
  <target name="compile-core-clj" depends="compile-java"
          description="Compile Clojure sources.">
    <java classname="clojure.lang.Compile" fork="true" failonerror="true">
      <sysproperty key="clojure.compile.path" value="${build.dir}"/>
      <classpath refid="classpath" />
      <arg value="incanter.internal" />
      <arg value="incanter.core" />
      <arg value="incanter.stats" />
    </java>
  </target>

  <target name="incanter-core" depends="compile-core-clj">
          <jar jarfile="${core-jarfile}" >
            <fileset dir="${build.dir}" includes="**/*.class"/>
      <manifest>
        <attribute name="Class-Path" value="."/>
      </manifest>
    </jar>
  </target>

  <target name="clean">
    <delete file="${jarfile}"/>
    <delete file="${core-jarfile}"/>
    <delete dir="${build.dir}" />
    <delete dir="${target.dir}" />
  </target>


  <target name="deps" description="Download dependencies and unzip">
    <get usetimestamp="true" description="Incanter dependencies" src="${deps.url}" dest="${deps.file}"/>
    <unzip src="${deps.file}" dest="."/>
  </target>
  
</project>
Something went wrong with that request. Please try again.