Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error building clojure project with lein

I'm not at all familiar with clojure, and I have the source for a project that I'm trying to build. The project has a project.clj file, which google says means I should use the lein build tool. However:

$ lein compile #lein jar does the same thing
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate testui/core__init.class oCompiling testui.core
r testui/core.clj on classpath

I suspect that project.clj may be broken. core.clj is located in src/com/foodient/semanticanalysis/testui, and project.clj looks like this:

(defproject testui "1.0.0-SNAPSHOT"
  :description "FIXME: write description"
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [org.apache.poi/poi "3.8-beta4"]
                 [gate-clj "1.0.0"]]
  :aot [testui.core]
  :main testui.core
  :run-aliases {:test testui.core/-main})

Any ideas?

like image 231
jjm Avatar asked Dec 28 '22 00:12

jjm


1 Answers

If you set up a lein project and the name has that Clojuristic dash in it, like bene-csv (one of mine), then lein new bene-csv creates several directories and ./bene-csv/project.clj. My core.clj is located in ./bene-csv/src/bene_csv/core.clj. Note the dash is dropped in bene_csv in favor of an underscore.

As to your problem more than likely core.clj is not located where lein expects it, which should be ./testui/src/testui/core.clj. I hope this helps.

like image 125
octopusgrabbus Avatar answered Dec 29 '22 15:12

octopusgrabbus