On 2008-11-26, Stuart Sierra <[EMAIL PROTECTED]> wrote:

> The Ant task looks like this:

>       <property name="cljsrc" location="${src}/clj"/>
>       <property name="build" location="classes"/>
>       <property name="precompile" location="${cljsrc}/precompile.clj"/>
>       ...
>       <target name="core" depends="compile"
>               description="Precompile Clojure core sources.">
>               <java classname="clojure.lang.Script"
>                       classpath="${build}:${cljsrc}">
>                         <sysproperty key="clojure.compile.path"
>                                      value="${build}"/>
>                       <arg value="${precompile}"/>
>               </java>
>       </target>

It should be pretty easy to wrap this in a macrodef or two, which
could go into an antlib.xml file in clojure.jar so that

<taskdef uri="antlib:clojure" classpath=".../clojure.jar"/>
<clj:script scriptfile="some.clj" xmlns:clj="antlib:clojure"/>

could be used for running arbitrary scripts and 

<clj:compile compilepath="${build}/>

to compile stuff in ${build}.

Looks pretty easy and it would probably take me longer to sign and
send the CA than to put together an antlib.xml file 8-)

If anybody is interested, let me know.

Stefan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to