0

そのため、 test.generative でいくつかの名前空間を要求するのに問題がありました。次の 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"]])

次に、ターミナルから:

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

に続く、

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

clojure.test.generative を要求することはできますが、 clojure.test.generative.runner を要求することはできないようです。私は何を間違っていますか?

4

1 に答える 1

1

0.1.4 の test.generative mvn jar に問題があるようです。

project.clj のコピーを使用し、依存関係を 0.1.5 に切り替えたところ、問題は解決しました。

于 2013-07-28T01:31:34.490 に答える