tools-deps

isak 2023-10-06T20:10:17.872309Z

With you are working on a library and generate a pom with deps, is the intention that this pom is modified manually and checked in?

seancorfield 2023-10-07T15:27:50.891869Z

In all my projects, I used to keep the src-pom checked in (in a subfolder but it could easily have been just a different name) and then just generate into target as part of the jar build. Most of my projects had a src-pom that was generated by clj-new or deps-new which has more sections in it than the basic tools.deps (or tools.build) generated pom.xml. Yesterday, with the release of tools.build 0.9.6 and the addition of the pom-data option, I got rid of the src-pom and checked in file and switched to providing all that extra information in build.clj via pom-data. You can look at HoneySQL or next.jdbc for examples.

👍 1
🙏 1
lread 2023-10-07T15:30:56.288739Z

@seancorfield cool! I'm gonna take a peek at your changes. I only had what I was calling "anemic" pom.xml files checked into git because tools.build couldn't fill in some blanks for me.

seancorfield 2023-10-07T15:47:03.093889Z

https://github.com/seancorfield/next-jdbc/blob/develop/build.clj#L35-L60 is how I'm doing it now (I can post a link now I'm not just on my phone). Here's the commit where I deleted the old template/pom.xml and switch to that Hiccup-style data: https://github.com/seancorfield/next-jdbc/commit/35eb931877c337103aae6f7145c168b31b635696

👍 1
isak 2023-10-06T20:15:54.570419Z

Oh I think I might see it now, there is a "source pom" and generated ones

Alex Miller (Clojure team) 2023-10-06T20:18:28.405739Z

some tools can work from the generated pom.xml, so in some cases you might find it useful to check in the generated pom.xml (and in that case, I would name the generated one something like template-pom.xml)

isak 2023-10-06T20:18:59.785059Z

Ok, good idea, thank you