tools-build

souenzzo 2026-05-30T01:05:16.371269Z

Note on tools.build I could not find the usage of :src-pom. It's unclear which attributes the src-pom file can have, which it cannot, and which will be overwritten.

seancorfield 2026-05-30T01:19:16.851269Z

:src-pom - source pom.xml to synchronize from, default = "./pom.xml"
             may be :none to ignore any existing pom.xml file
A string -- a file path. Are you thinking of :pom-data perhaps?

seancorfield 2026-05-30T01:19:46.689609Z

:pom-data - vector of hiccup-style extra pom top elements to include when
    :src-pom is :none or the source pom.xml does not exist:
     [[:licenses
       [:license
        [:name "Eclipse Public License 1.0"]
        [:url "";]
        [:distribution "repo"]]]
      [:organization "Super Corp"]]
    The pom-data MUST NOT include:
      :modelVersion, :packaging, :groupId, :artifactId, :version, :name,
      :deps, :repositories, :build, or :scm
Both of those are from the docstring / API docs.

souenzzo 2026-05-30T01:29:30.974659Z

Yes, I know that it is a string to a pom.xml file - but there are no mentions of the content or restrictions of this pom - or even a minimal example

seancorfield 2026-05-30T01:30:37.978479Z

It's a standard pom.xml file with as much or as little detail in it as you want to provide. I guess you'd have to read the Maven docs since it's a Maven standard document?

seancorfield 2026-05-30T01:34:18.168579Z

I don't use :src-pom, now that we have :pom-data, since it's tedious to write XML by hand and there are caveats about having pom.xml in your GH repo (you really need it in a subfolder, not in the root, to avoid Maven-based tooling from making incorrect assumptions about your (template) pom.xml.

seancorfield 2026-05-30T01:34:49.383069Z

https://clojure-doc.org/articles/cookbooks/cli_build_projects/#the-generated-pomxml-file shows the :pom-data approach and why you would want to go that way instead.

souenzzo 2026-05-30T01:36:47.768639Z

Looking at the code, I was able to understand: • all deps in dependencies will be replaced - I'd say that 'src-pom should not have dependencies key' or something like it. In any case, in the official documentation, which discusses various uses, this attribute isn't even mentioned – I think it should be. I'm not having any problems using tools.build - I'm making advanced use of it - and I realized that this part is poorly documented.

seancorfield 2026-05-30T01:38:47.707919Z

I don't think :src-pom should be mentioned -- it was the original way to deal with generating a full pom.xml file but it is kind of legacy now and a lot less convenient than using :pom-data.

seancorfield 2026-05-30T01:41:17.509789Z

I only just noticed that the tools.build guide -- which is very superficial -- links to the clojure-doc article I linked above and to another page on clojure-doc https://clojure-doc.org/articles/ecosystem/libraries_authoring/ -- so I guess those are considered the tools.build Reference Docs now 😄

seancorfield 2026-05-30T01:42:31.898589Z

"Guides" on http://clojure.org tend to be very surface level and don't go deep into any of the options. The assumption is that you'll either consult the API docs or some Reference Docs for more detail.

Alex Miller (Clojure team) 2026-05-30T02:56:35.517739Z

The docstring does mention it and say which parts are replaced?

Alex Miller (Clojure team) 2026-05-30T02:57:48.305169Z

The size of even a small pom.xml are too much to fit in a docstring example

seancorfield 2026-05-30T13:16:10.775979Z

I think the OP doesn't know what a pom.xml file can contain -- which is a Maven docs issue, not a Clojure docs issue.