要在非标准目录结构下配置 Leiningen 以找到源代码,您需要在项目的 project.clj
文件中指定源代码的位置。以下是一个示例配置,以便在非标准目录结构下找到源代码:
(defproject my-project "0.1.0-SNAPSHOT"
:description "An example project with custom source directory"
:url "http://example.com/FIXME"
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "https://www.eclipse.org/legal/epl-2.0/"}
:dependencies [[org.clojure/clojure "1.10.3"]]
:source-paths ["/path/to/your/source/directory"]
:test-paths ["/path/to/your/test/directory"]
:resource-paths ["/path/to/your/resources/directory"])
在这个示例中,我们使用 :source-paths
、:test-paths
和 :resource-paths
选项来指定源代码、测试和资源目录的位置。您可以根据需要修改这些路径。
请注意,这个配置不会影响项目的目录结构,而只是告诉 Leiningen 在哪里找到源代码。如果您需要将项目的目录结构更改为非标准结构,您可能需要调整项目的其他部分,例如构建工具和依赖项。
推荐的腾讯云相关产品:
这些产品可以与Leiningen一起使用,以便在非标准目录结构下找到源代码。
没有搜到相关的沙龙
领取专属 10元无门槛券
手把手带您无忧上云