The problem was because of the CCW plugin that was ahead of time compiling Clojure source files to Java classes. The solution is to prevent it from doing so. With CCW 0.5 simply remove classes from the build path, with CCW 0.6 additionally delete the classes directory from the disk drive.
Here is a pretty detailed description of my workflow while starting the ClojureScript One in Eclipse:
- Clone ClojureScript One with Git to the workspace
- Run lein bootstrap in the ClojureScript One root
- Run lein pom
- Import existing maven project into Eclipse
- Manually add all the entires from project.clj to the build path (:source-path and :extra-classpath-dirs keys)
- Right click on project and Enable Clojure support
- Remove classes directory from the build path (might need to delete the directory)
- Run project as Clojure application
- Load the one.sample.repl namespace (load file and switch to the namespace) into the REPL and run (dev-server)
- Navigate to the web app’s development tab to see if you get any errors.
Note: don’t run (go) from the REPL in CCW because the ClojureScript REPL is incompatible with nrepl. In order to use the cljs repl stick to the simple console and run it from “lein repl”. Any questions? Don’t hesitate to ask.
Hope it works for you as it worked for me. Don’t be scared with all the steps and remember that ClojureScript is in alpha yet. To be honest I often end up messing with pure Java projects in similar fashion.