Created
July 21, 2009 15:20
-
-
Save hlship/151387 to your computer and use it in GitHub Desktop.
Allows all .clj files to be located and compiled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<target name="compile" description="Compile Clojure sources."> | |
<mkdir dir="${classes.dir}" /> | |
<!-- Seek out the namespaces to compile. Note that this will fail if the actual name of a package includes an underscore, as | |
all underscores are converted to dashes. --> | |
<pathconvert pathsep=" " property="compile.namespaces"> | |
<fileset dir="${src.dir}" includes="**/*.clj" /> | |
<chainedmapper> | |
<packagemapper from="${basedir}/${src.dir}/*.clj" to="*" /> | |
<filtermapper> | |
<replacestring from="_" to="-" /> | |
</filtermapper> | |
</chainedmapper> | |
</pathconvert> | |
<java classname="clojure.lang.Compile"> | |
<classpath> | |
<path refid="libs.path" /> | |
<path location="${classes.dir}" /> | |
<path location="${src.dir}" /> | |
</classpath> | |
<sysproperty key="clojure.compile.path" value="${classes.dir}" /> | |
<arg line="${compile.namespaces}" /> | |
</java> | |
</target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment