This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-08
Channels
- # aleph (5)
- # announcements (3)
- # aws-lambda (24)
- # babashka (17)
- # beginners (59)
- # calva (168)
- # clerk (4)
- # clj-kondo (62)
- # clojure (77)
- # clojure-belgium (4)
- # clojure-brasil (10)
- # clojure-ecuador (3)
- # clojure-europe (41)
- # clojure-losangeles (2)
- # clojure-nl (2)
- # clojure-norway (24)
- # clojure-uk (2)
- # clojurescript (44)
- # clr (21)
- # community-development (7)
- # conjure (1)
- # cursive (6)
- # datalevin (15)
- # datomic (1)
- # deps-new (12)
- # emacs (45)
- # events (1)
- # fulcro (8)
- # funcool (7)
- # graphql (5)
- # hugsql (15)
- # jobs (2)
- # matcher-combinators (17)
- # meander (14)
- # membrane (31)
- # pathom (28)
- # pedestal (8)
- # practicalli (6)
- # re-frame (12)
- # releases (1)
- # remote-jobs (1)
- # shadow-cljs (32)
- # tools-deps (8)
- # vim (16)
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?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.
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.
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?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.
The jar
task calls b/write-pom
-- https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-write-pom
Specifically:
:src-pom - source pom.xml to synchronize from, default = "./pom.xml"
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
At some point, I may change the generated projects to do that too.
(I just created an issue for that)