【问题标题】:Leiningen: How to set Maven groupId and packaging properties in project.cljLeiningen:如何在 project.clj 中设置 Maven groupId 和打包属性
【发布时间】:2011-10-21 13:57:09
【问题描述】:

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

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

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

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

【问题讨论】:

    标签: maven clojure leiningen


    【解决方案1】:

    Leiningen 使用groupId/artifactId 命名约定来区分这两个实体。查看sample project.clj 以了解它是如何完成的。运行lein pomgroupIdartifactId会被正确解析。

    来自链接的project.clj 的示例 sn-p:

    ;; 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 中指定包装属性。

    【讨论】:

      猜你喜欢
      • 2018-04-13
      • 2014-06-22
      • 2023-03-29
      • 1970-01-01
      • 1970-01-01
      • 2012-02-18
      • 1970-01-01
      • 2013-11-02
      • 2011-04-06
      相关资源
      最近更新 更多