Leiningen template in private maven repo

354 views
Skip to first unread message

Michael Willis

unread,
Sep 11, 2015, 12:38:24 PM9/11/15
to Clojure
I'm trying to write a leiningen template for company internal use.  I have deployed it to our internal Artifactory instance, and added the Artifactory URL to :repositories in ~/.lein/profiles.clj, but `lein new` can't resolve it:

$ lein new rest-microservice my-new-api
Failed to resolve version for rest-microservice:lein-template:jar:RELEASE: Could not find metadata rest-microservice:lein-template/maven-metadata.xml in local (~/.m2/repository)
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not find template yodle-service on the classpath.


Incidentally, I get more information if I pass in the --snapshot flag:

$ lein new rest-microservice my-new-api --snapshot
Could not find metadata rest-microservice:lein-template/maven-metadata.xml in local (~/.m2/repository)
Failure to find rest-microservice:lein-template/maven-metadata.xml in https://repo1.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
Failure to find rest-microservice:lein-template/maven-metadata.xml in https://clojars.org/repo/ was cached in the local repository, resolution will not be reattempted until the update interval of clojars has elapsed or updates are forced
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
Could not find template rest-microservice on the classpath.


It seems like `lein new` doesn't look for templates in the internal repository, even though I have configured ~/.lein/profiles.clj such that I have successfully made a project.clj use dependencies from Artifactory.

Is there some other configuration required to use leiningen templates from an internal repo?

Thanks,
Michael

Michael Willis

unread,
Sep 11, 2015, 1:40:58 PM9/11/15
to Clojure
I figured it out - leiningen looks for template in the default repos, and anything configured under {:user {:plugin-repositories ...}}
Reply all
Reply to author
Forward
0 new messages