Welcome! Please see the About page for a little more info on how this works.

+2 votes
in tools.build by
retagged by

I have a project that generates more than one jar artifact. For project A, I have ./pom.xml that is used as a template and everything works fine.

For project B, I want to generate a pom.xml that's completely separate from project A which does not use ./pom.xml as a template. I generate the pom as follows:

(require '[clojure.tools.build.api :as b])
(b/write-pom {:class-dir class-dir
                  :pom-data pom-data
                  :lib coord
                  :version version
                  :basis basis})

However, since ./pom.xml exists, it is used as a template. Explicitly passing nil for :src-pom doesn't help. The only workaround I could find was to pass in a bogus path for :src-pom.

1 Answer

+1 vote
by
selected by
ago by
I just ran into this (again) so it reminded me to come and vote for the question and this answer. For now, I used :src-pom "no-such-pom.xml" to force :pom-data to be used instead of ./pom.xml in dev's local version of the repo but that's a hack :(
...