Question

So, I was having trouble requiring some namespaces in test.generative . I have the following project.clj:

(defproject gen "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                             [org.clojure/test.generative "0.1.4"]])

Then from the terminal:

stephen@stephen-ubuntu:~/Work/gen$ rm -r ../../.m2/
stephen@stephen-ubuntu:~/Work/gen$ lein deps
Retrieving lein-pprint/lein-pprint/1.1.1/lein-pprint-1.1.1.pom from clojars
Retrieving lein-marginalia/lein-marginalia/0.7.1/lein-marginalia-0.7.1.pom from clojars
Retrieving marginalia/marginalia/0.7.1/marginalia-0.7.1.pom from clojars
Retrieving org/clojure/clojure/1.4.0/clojure-1.4.0.pom from central
Retrieving org/sonatype/oss/oss-parent/5/oss-parent-5.pom from central
Retrieving org/clojure/tools.namespace/0.1.1/tools.namespace-0.1.1.pom from central
Retrieving org/clojure/pom.contrib/0.0.20/pom.contrib-0.0.20.pom from central
Retrieving org/clojure/java.classpath/0.1.1/java.classpath-0.1.1.pom from central
Retrieving org/clojure/clojure/1.3.0-alpha5/clojure-1.3.0-alpha5.pom from central
Retrieving org/clojure/tools.cli/0.2.1/tools.cli-0.2.1.pom from central
Retrieving org/clojure/pom.contrib/0.0.25/pom.contrib-0.0.25.pom from central
Retrieving org/clojure/clojure/1.3.0/clojure-1.3.0.pom from central
Retrieving org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.pom from central
Retrieving org/clojure/clojure/1.4.0/clojure-1.4.0.jar from central
Retrieving org/clojure/tools.namespace/0.1.1/tools.namespace-0.1.1.jar from central
Retrieving org/clojure/java.classpath/0.1.1/java.classpath-0.1.1.jar from central
Retrieving org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.jar from central
Retrieving org/clojure/tools.cli/0.2.1/tools.cli-0.2.1.jar from central
Retrieving lein-marginalia/lein-marginalia/0.7.1/lein-marginalia-0.7.1.jar from clojars
Retrieving lein-pprint/lein-pprint/1.1.1/lein-pprint-1.1.1.jar from clojars
Retrieving marginalia/marginalia/0.7.1/marginalia-0.7.1.jar from clojars
Retrieving org/clojure/clojure/1.5.1/clojure-1.5.1.pom from central
Retrieving org/clojure/test.generative/0.1.4/test.generative-0.1.4.pom from central
Retrieving org/clojure/pom.contrib/0.0.23/pom.contrib-0.0.23.pom from central
Retrieving org/clojure/clojure/1.3.0-beta1/clojure-1.3.0-beta1.pom from central
Retrieving org/clojure/tools.nrepl/0.2.3/tools.nrepl-0.2.3.pom from central
Retrieving org/clojure/pom.contrib/0.1.2/pom.contrib-0.1.2.pom from central
Retrieving org/sonatype/oss/oss-parent/7/oss-parent-7.pom from central
Retrieving org/clojure/clojure/1.2.0/clojure-1.2.0.pom from central
Retrieving clojure-complete/clojure-complete/0.2.3/clojure-complete-0.2.3.pom from clojars
Retrieving org/clojure/clojure/1.5.1/clojure-1.5.1.jar from central
Retrieving org/clojure/tools.nrepl/0.2.3/tools.nrepl-0.2.3.jar from central
Retrieving org/clojure/test.generative/0.1.4/test.generative-0.1.4.jar from central
Retrieving clojure-complete/clojure-complete/0.2.3/clojure-complete-0.2.3.jar from clojars

Followed by,

stephen@stephen-ubuntu:~/Work/gen$ lein repl
nREPL server started on port 36954
REPL-y 0.2.0
Clojure 1.5.1
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)

user=> (require '[clojure.test.generative.runner :as runner])

FileNotFoundException Could not locate clojure/test/generative/runner__init.class or clojure/test/generative/runner.clj on classpath:   clojure.lang.RT.load (RT.java:443)
user=> (require '[clojure.test.generative :as gen])
nil

Seems that I can require clojure.test.generative but not clojure.test.generative.runner . What am I doing wrong?

Was it helpful?

Solution

There appears to be a problem with the 0.1.4 test.generative mvn jar.

I used a copy of your project.clj and switched the dependency to 0.1.5, and the issue was resolved.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top