This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-07
Channels
- # announcements (2)
- # bangalore-clj (1)
- # beginners (88)
- # calva (1)
- # cljdoc (1)
- # cljs-dev (1)
- # cljsrn (2)
- # clojure (88)
- # clojure-berlin (2)
- # clojure-europe (2)
- # clojure-india (1)
- # clojure-spec (3)
- # clojure-uk (3)
- # clojurescript (9)
- # clojureverse-ops (4)
- # clojutre (2)
- # cursive (3)
- # data-science (1)
- # emacs (3)
- # fulcro (12)
- # pathom (4)
- # reitit (1)
- # rum (10)
- # shadow-cljs (9)
- # spacemacs (11)
- # sql (7)
- # tools-deps (16)
- # vim (14)
- # xtdb (3)
- # yada (1)
seancorfield/depstar "0.3.3"
is available -- no longer uses clojure.xml
so you won't get "Illegal Reflective Access" warnings on JDK11 any more!
I'm trying to create my own clj project template using clj-new
. when using it, there's an error:
Failed with: Failed to resolve version for :home/tianshu/develop/ministack/lein-template:jar:RELEASE: Could not find metadata :home/tianshu/develop/ministack/lein-template/maven-metadata.xml in local (/home/tianshu/.m2/repository)
Execution error (ExceptionInfo) at clj-new.helpers/resolve-remote-template (helpers.clj:148).
Could not load artifact for template: /home/tianshu/develop/ministack
Tried coordinates:
[/home/tianshu/develop/ministack/boot-template "RELEASE"]
[/home/tianshu/develop/ministack/lein-template "RELEASE"]
Full report at:
/tmp/clojure-14768781517611096608.edn
what does this mean, why a lein-template and boot-template is needed?you are somehow declaring a maven dependency with a group-id of /home/tianshu/develop/ministack/ and an artifact-id of lein-template
But it is said I should use qualified symbol or multi-segment clojure symbols.
Project names must be valid qualified or multi-segment Clojure symbols.
clj-new
looks for a clj
template, then a boot
template, then a lein
template -- so you can use it to create projects with other tools' templates.
(it's based on boot-new
which looks for a boot
template, then a lein
template -- and I based that library in turn on the innards of lein new
, and in fact both boot-new
and clj-new
include some Leiningen code, with permission)
The idea behind "Project names must be valid qualified or multi-segment Clojure symbols." is to avoid the everything.core
default that Leiningen (and Boot) fall back on if you provide a single segment name.
For qualified names, it sort of expects you to use something relatively unique like your GitHub username when creating a project: clj -A:new some-template tianshu/example
which will create a folder called example
but the main namespace in that project would be tianshu.example
Of course you can just go ahead and produce the same thing as Leiningen: clj -A:new some-template example.core
🙂 The folder will be example.core
but the main ns will be example.core
from src/example/core.clj
... ugh!
And finally if you combine them: clj -A:new app tianshu/example.core
you'll get a top-level example.core
project folder with src/tianshu/example/core.clj
for a main ns of tianshu.example.core