Hello! I wrote build.xml with the following content:
<project name="edn-extractor" default="jar"> <property name="src.dir" location="src" /> <property name="classes.dir" location="classes" /> <property name="jar.name" value="edn-extractor.jar" /> <path id="project.classpath"> <pathelement location="${src.dir}" /> <pathelement location="${classes.dir}" /> <fileset dir="lib"> <include name="**/*.jar" /> </fileset> </path> <target name="clean" description="Remove generated files."> <delete dir="${classes.dir}" /> <delete file="${jar.name}" /> </target> <target name="def-tasks"> <taskdef name="compile-clojure" classname="com.ubermensch.ant.clojure.CompileTask" classpath="lib/clojure.jar:lib/clojure-contrib.jar:lib/clojure-ant-tasks.jar" /> </target> <target name="compile" depends="def-tasks"> <mkdir dir="${classes.dir}" /> <compile-clojure> <classpath> <path refid="project.classpath" /> </classpath> </compile-clojure> </target> <target name="jar" depends="compile"> <jar jarfile="${jar.name}" basedir="${classes.dir}"> <fileset dir="${src.dir}"> <include name="**/*.clj" /> </fileset> </jar> </target> </project> And I have a simple directory structure: # find . ./build.xml ./src ./src/edn ./src/edn/main.clj ./lib ./lib/clojure-contrib.jar ./lib/clojure.jar ./lib/clojure-ant-tasks.jar Here is the content of main.clj: (ns edn.main (:gen-class)) (defn -main [greetee] (println (str "Hello " greetee "!"))) Then if I run ant, I get: Buildfile: build.xml def-tasks: BUILD FAILED java.lang.ExceptionInInitializerError at clojure.lang.Namespace.<init>(Namespace.java:32) at clojure.lang.Namespace.findOrCreate(Namespace.java:122) at clojure.lang.Var.internPrivate(Var.java:94) at com.ubermensch.ant.clojure.base_task.<clinit>(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:583) at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:228) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.apache.tools.ant.Main.runBuild(Main.java:758) at org.apache.tools.ant.Main.startAnt(Main.java:217) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate clojure/core__init.class or clojure/core.clj on classpath: at clojure.lang.RT.<clinit>(RT.java:295) ... 25 more Caused by: java.io.FileNotFoundException: Could not locate clojure/core__init.class or clojure/core.clj on classpath: at clojure.lang.RT.load(RT.java:402) at clojure.lang.RT.load(RT.java:371) at clojure.lang.RT.doInit(RT.java:406) at clojure.lang.RT.<clinit>(RT.java:292) ... 25 more Total time: 0 seconds Either of clojure/core.clj and clojure/core__init.class is on classpath, I think. What am I doing wrong? --~--~---------~--~----~------------~-------~--~----~ 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 Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---