Skip to content


Subversion checkout URL

You can clone with
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

81 lines (69 sloc) 2.623 kB
<project name="enlive" default="jar">
Pack all enlive sources into a JAR. Compile those that can
be compiled standalone if the clojure.jar property points us to
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="build" location="classes"/>
<available property="hasclojure" file="${clojure.jar}"/>
<!-- The JAR file to create. -->
<property name="jarfile" location="enlive.jar"/>
<property name="slimjarfile" location="enlive-slim.jar"/>
<target name="init">
<mkdir dir="${build}"/>
<target name="clean" description="Remove generated files and directories.">
<delete file="${jarfile}"/>
<delete file="${slimjarfile}"/>
<delete dir="${build}"/>
<target name="check_hasclojure"
description="Print a warning message if clojure.jar is undefined"
<echo>WARNING: You have not defined a path to clojure.jar so I can't compile files.
This won't break anything.
To enable compiling, run "ant -Dclojure.jar=&lt;...path to clojure.jar..&gt;"
<target name="compile_clojure" depends="init,check_hasclojure"
description="Compile Clojure sources."
<java classname="clojure.lang.Compile">
<path location="${build}"/>
<path location="${src}"/>
<path location="${clojure.jar}"/>
<fileset dir="${lib}">
<include name="**/*.jar"/>
<sysproperty key="clojure.compile.path" value="${build}"/>
<arg value="net.cgrand.enlive-html"/>
<arg value="net.cgrand.insertion-point"/>
<arg value="net.cgrand.xml"/>
<arg value="net.cgrand.enlive-html.state-machine"/>
<target name="jar" description="Create jar files." depends="compile_clojure">
<jar jarfile="${jarfile}">
<fileset file="epl-v10.html"/>
<fileset dir="${src}" includes="**/*.clj"/>
<fileset dir="${build}" includes="**/*.class"/>
<attribute name="Class-Path" value="."/>
<jar jarfile="${slimjarfile}">
<fileset file="epl-v10.html"/>
<fileset dir="${src}" includes="**/*.clj"/>
<attribute name="Class-Path" value="."/>
<target name="clean-build" depends="clean,compile_clojure,jar"
description="Builds clojure-contrib from scratch and runs all tests."/>
Jump to Line
Something went wrong with that request. Please try again.