Fork me on GitHub
#deps-new
<
2023-02-08
>
jumar08:02:41

I'd like to customize url in the generated pom.xml I looked here: https://github.com/seancorfield/deps-new/blob/ede3fd25580258d4bb0fa7501b4ce9f5badd15e0/resources/org/corfield/new/template/root/pom.xml#L22

<url>https://{{scm/domain}}/{{scm/user}}/{{scm/repo}}</url>
So I need to actually change scm/user because I use my own domain as a group id and it's then used to derive github user name like this:
<url></url>
Instead, i need https://github.com/curiousprogrammer-net/email-check. Is there a way to do it?

seancorfield17:02:22

The docs are all linked from this para, under More General Usage but I'm open to suggestions on how to make that more discoverable: > See Project Names and Variables to see how the project name (:name) is used to derive the default values of all the built-in substitution variables. See All the Options for the full list of command-line options available when invoking deps-new. See Writing Templates for documentation on how to write your own templates.

seancorfield17:02:31

I just added a new section to the README near the top with a list of what's in the README and doc folder, with links, to make this more discoverable.

jumar04:02:40

Thanks, that helped when creating a new project like this:

clojure -Tnew lib :name net.curiousprogrammer/email-check :scm/user curiousprogrammer-net
But how can I customize it for an existing project? Should I just change the url in pom.xml inside the project root folder? How does it related to the auto-generated pom.xml in the target directory?

seancorfield05:02:24

Yes, once you've generated the project, the top-level pom.xml acts as a template for the one that gets created in the target folder -- per standard tools.build behavior.

seancorfield05:02:22

Specifically:

:src-pom - source pom.xml to synchronize from, default = "./pom.xml"

seancorfield05:02:27

In my own OSS projects, I've moved the top-level pom.xml to template/pom.xml and I specify :src-pom in the write-pom call to use that, because then tooling that scans the repo doesn't pick up a top-level pom.xml and try to treat it as the definitive version: https://github.com/seancorfield/next-jdbc/blob/develop/build.clj#L48

seancorfield05:02:43

At some point, I may change the generated projects to do that too.

seancorfield05:02:03

(I just created an issue for that)