Fork me on GitHub
#depstar
<
2020-12-29
>
maxp06:12:06

Thank you, depstar now works great.

maxp06:12:35

some of my thoughts about pom.xml: • IDEs recognize folders with pom.xml as Java project and offer 'add java support' • it is not so good when build process touches git indexed files • two separate lists of dependencies in source tree (deps.edn / pom.xml)

seancorfield17:12:53

@maxp The problem -- for libraries, at least -- is that pom.xml is needed for deployment and contains information that other tooling needs beyond just group/artifact/version and dependencies (which is the bare minimum that clojure -Spom -- or depstar :sync-pom true -- will generate). http://cljdoc.org, for example, uses information from the pom.xml file to populate stuff in the generated docs (all the SCM information). Even Clojars relies on some of that SCM information. The POM is also used to determine (transitive) dependencies when someone else depends on your library JAR. So there's information that has to be in the pom.xml file that cannot be generated (as much as clj-new tries to generate a "full-size" pom.xml when you create a new project -- by making a lot of assumptions about SCM and developers and so on). And if that information cannot be generated -- and may need to be maintained by hand (such as adding/changing developers or updating SCM if the project is moved from GitHub to GitLab, for example) -- then that information must be under version control.

seancorfield17:12:29

I don't care much about the IDE problem (the vast majority of Clojure developers do not use such an IDE and even for those who do, it is only going to ask once per project right?). I agree that it is frustrating that pom.xml contains information that has to be versioned but that's the world we live in as Clojure developers, and also that it is redundant for dependencies to be in two files but that's why clojure -Spom exists (and why depstar can now do that automatically for you: I've added :sync-pom true to the :exec-args in some of my projects already).

seancorfield17:12:19

For library (thin) JARs, depstar already treats the pom.xml as optional but makes it easy to create/maintain it automatically if you wish.

seancorfield17:12:21

For standalone (uber) JARs, I agree that depstar is too aggressive and could certainly build a .jar file that responds to java -jar without a pom.xml file. https://github.com/seancorfield/depstar/issues/59