This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-17
Channels
- # announcements (12)
- # babashka (27)
- # beginners (65)
- # biff (8)
- # calva (22)
- # clj-kondo (1)
- # clj-otel (5)
- # clojure (65)
- # clojure-europe (127)
- # clojure-nl (1)
- # clojure-norway (11)
- # clojure-portugal (2)
- # clojure-uk (2)
- # clojurescript (18)
- # cursive (5)
- # data-science (3)
- # datahike (14)
- # datascript (3)
- # datomic (7)
- # deps-new (11)
- # emacs (31)
- # exercism (1)
- # fulcro (1)
- # honeysql (3)
- # hyperfiddle (38)
- # introduce-yourself (4)
- # leiningen (2)
- # malli (20)
- # meander (2)
- # missionary (3)
- # off-topic (4)
- # pathom (3)
- # practicalli (2)
- # reagent (5)
- # releases (1)
- # sci (1)
- # shadow-cljs (9)
- # xtdb (8)
So I am getting ready to release a new web library and thought it would be super-nice to include a leiningen template. And I am delighted to see how straighforward it seems! https://cljdoc.org/d/leiningen/leiningen/2.9.8/doc/writing-templates I looked a couple of years ago and it was quite daunting. Maybe I looked in the wrong place. Anyway, great! I am working thru the instructions and hit my first speed bump. The doc says:
While developing a template, if you're in the template project directory, leiningen will pick it up and you'll be able to test it. e.g. from the liquid-cool-template dir:
$ lein new us.technomancy/liquid-cool myproject
will create a directory called myproject, built from your template.
Maybe I do not understabd "in the template project directory"? I think I am, but I get
~/dev/web-mx-template $ lein new com.tiltontec/web-mx myproject
Failed to resolve version for com.tiltontec:lein-template.web-mx:jar:RELEASE: Could not find metadata com.tiltontec:lein-template.web-mx/maven-metadata.xml in local (/Users/kennethtilton/.m2/repository)
Failed to read artifact descriptor for com.tiltontec:lein-template.web-mx:jar:RELEASE
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not find template for com.tiltontec/web-mx on the classpath: leiningen.new.web-mx
I see I can also do lein install
, but I want to understand why this does not work first, and installing will mask that.
Any ideas welcome! 🙏👍 4
I broke down and installed:
~/dev/web-mx-template $ lein install
Created /Users/kennethtilton/dev/web-mx-template/target/lein-template.web-mx-0.1.0-SNAPSHOT.jar
Wrote /Users/kennethtilton/dev/web-mx-template/pom.xml
Installed jar and pom into local repo.
~/dev/web-mx-template $ u
~/dev $ lein new com.tiltontec/web-mx temp-wmx
Failed to resolve version for com.tiltontec:lein-template.web-mx:jar:RELEASE
Failed to read artifact descriptor for com.tiltontec:lein-template.web-mx:jar:RELEASE
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not find template for com.tiltontec/web-mx on the classpath: leiningen.new.web-mx
And a desperation stab:
~/dev $ lein new com.tiltontec/web-mx-template temp-wmx
Failed to resolve version for com.tiltontec:lein-template.web-mx-template:jar:RELEASE: Could not find metadata com.tiltontec:lein-template.web-mx-template/maven-metadata.xml in local (/Users/kennethtilton/.m2/repository)
Failed to read artifact descriptor for com.tiltontec:lein-template.web-mx-template:jar:RELEASE
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not find template for com.tiltontec/web-mx-template on the classpath: leiningen.new.web-mx-template
~/dev $ lein version
Leiningen 2.10.0 on Java 11.0.9.1 OpenJDK 64-Bit Server VM
Looking forward to getting this going!