I have a Clojure project that I would like to package and use in one of my Java projects that uses Maven.
When I generate a pom.xml file using Leiningen, it sets the groupId to artifactId, but I need the groupId to be the same as my parent Java project.
Also, I would like to be able to specify the packaging type in the pom.xml to be jar
In short: how do I set the groupId and packaging properties in project.clj to generate a pom.xml containing those properties?
Leiningen uses the groupId/artifactId
naming convention to distinguish between the two entities. Look at the sample project.clj to see how it's done. When running lein pom
groupId
and artifactId
will be then properly resolved.
Sample snippet from the linked 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"
;; ...
EDIT: I missed the question about packaging. AFAICS you can't specify the packaging property in project.clj
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With