9

我有一个 Clojure 项目,我想打包并在我的一个使用 Maven 的 Java 项目中使用它。

当我使用 Leiningen 生成 pom.xml 文件时,它将 groupId 设置为 artifactId,但我需要 groupId 与我的父 Java 项目相同。

另外,我希望能够将 pom.xml 中的包装类型指定为 jar

简而言之:如何在 project.clj 中设置 groupId 和包装属性以生成包含这些属性的 pom.xml?

4

1 回答 1

11

Leiningen 使用groupId/artifactId命名约定来区分这两个实体。查看示例 project.clj以了解它是如何完成的。运行的时候lein pom groupIdartifactId再正常解决。

来自链接的示例片段project.clj

;; The project is named "sample", and its group-id is "org.example".
(defproject org.example/sample "1.0.0-SNAPSHOT" ; version "1.0.0-SNAPSHOT"
;; ...

编辑:我错过了关于包装的问题。AFAICS 你不能在project.clj.

于 2011-10-21T14:02:22.700 回答