Browse files

Check Clojars releases repository instead of classic. Fixes #241.

  • Loading branch information...
1 parent 624bf2a commit 2973d99652fb8762152dac931f1813bf472012e8 @technomancy committed Nov 14, 2012
@@ -216,6 +216,7 @@ elif [ "$1" = "upgrade" ]; then
echo "You do not have permission to upgrade the installation in $SCRIPT"
exit 1
+ # TODO: change to stable when 2.0.0 is released
echo "The script at $SCRIPT will be upgraded to the latest $TARGET_VERSION version."
echo -n "Do you want to continue [Y/n]? "
@@ -5,22 +5,22 @@
**Q:** What's a group ID? How do snapshots work?
**A:** See the
- [tutorial](
+ [tutorial](
for background.
**Q:** How should I pick my version numbers?
**A:** Use [semantic versioning](
**Q:** What if my project depends on jars that aren't in any repository?
-**A:** The [deploy guide](
+**A:** The [deploy guide](
explains how to set up a private repository. If you are not sharing
them with a team you could also just
[install locally](
In general it's easiest to deploy them to a private S3 bucket with
the [s3-wagon-private]( plugin.
**Q:** I want to hack two projects in parallel, but it's annoying to switch between them.
-**A:** Leiningen provides a feature called *checkout dependencies*. See the [tutorial](
+**A:** Leiningen provides a feature called *checkout dependencies*. See the [tutorial](
to learn more.
**Q:** Is it possible to exclude indirect dependencies?
@@ -93,11 +93,14 @@
project launches, though there are compatibility issues with some
-**Q:** Why is Leiningen 2 still in a preview release?
-**A:** As of the preview3 release, Leiningen 2 is very stable and
- recommended for general use. The main thing keeping it from a final
- release is the fact that the current Clojars repository
- [mingles snapshots with releases](,
- which is undesirable. Since switching the default repositories to a
- releases-only Clojars (which is still in development) would be a
- breaking change, a series of previews is being released in the mean time.
+**Q:** Leiningen can't find some jars that the preview version could!
+**A:** As of 2.0.0-RC1, Leiningen no longer checks the
+ [Clojars classic repository]( by default,
+ replacing it with the
+ [Clojars releases repository](
+ This speeds up dependency resolution and allows for more secure
+ builds which enforce artifact signatures, but many libraries haven't
+ been promoted to the releases repository yet. If you need such a
+ library (or any snapshot version), you can add the old repo to your
+ `:repositories` in `project.clj`: `:repositories
+ [["clojars-classic" ""]]`
@@ -64,7 +64,7 @@ Next lets take a look at how projects are created.
## Creating a Project
We'll assume you've got Leiningen installed as per the
Generating a new project is easy:
$ lein new my-stuff
@@ -197,7 +197,7 @@ Clojars is the Clojure community's centralized jar repository, while Central is
You can add third-party repositories by setting the `:repositories` key
in project.clj. See the
### Checkout Dependencies
@@ -551,7 +551,7 @@ at all from the version that was tested in the CI environment.
If your project is a library and you would like others to be able to
use it as a dependency in their projects, you will need to get it into
a public repository. While it's possible to
-[maintain your own private repository](
+[maintain your own private repository](
or get it into [Central](, the easiest way is
to publish it at [Clojars]( Once you have
[created an account]( there, publishing
@@ -583,7 +583,7 @@ they don't have to be re-entered every time, see `lein help
deploying`. When deploying a release that's not a snapshot, Leiningen
will attempt to sign it using [GPG]( to prove your
authorship of the release. See the
-[deploy guide](
+[deploy guide](
for details of how to set that up. The deploy guide includes
instructions for deploying to other repositories as well.
@@ -147,9 +147,10 @@
:proxy (get-proxy-settings))
(catch DependencyResolutionException e
(binding [*out* *err*]
- (println "Check :dependencies and :repositories for typos.")
- (println "It's possible the specified jar is not in any repository.")
- (println "If so, see \"Free-floating Jars\" under"))
+ (println "This could be due to a typo in :dependencies or network issues.")
+ (when-not (some #(= "" (:url (second %))) repositories)
+ (println "It's possible the specified jar is in the old Clojars Classic repo.")
+ (println "If so see")))
(throw (ex-info "Could not resolve dependencies" {:exit-code 1})))
(catch Exception e
(if (and (instance? (root-cause e))
@@ -127,8 +127,7 @@
(def default-repositories
[["central" {:url ""}]
- ;; TODO: point to releases-only before 2.0 is out
- ["clojars" {:url ""}]]
+ ["clojars" {:url ""}]]
{:reduce add-repo}))
(def deploy-repositories
@@ -36,7 +36,7 @@
:twelve 12 ; testing unquote
:repositories [["central" {:url ""}]
- ["clojars" {:url ""}]]})
+ ["clojars" {:url ""}]]})
(deftest test-read-project
(let [actual (read (.getFile (io/resource "p1.clj")))]
@@ -4,12 +4,16 @@ See also
* For 2.0.0
** 2.0.0-final
- - [ ] Reduce verbosity of Aether. (#610)
- - [ ] Global offline flag. (#687)
- - [ ] Honor mirror for search indices (#281)
- - [ ] Allow search queries on any field. (#243)
- - [ ] Drop clojars snapshots from default repos (#241)
- - look at ?
+ - [X] Reduce verbosity of Aether. (#610)
+ - [X] Global offline flag. (#687)
+ - [X] Honor mirror for search indices (#281)
+ - [X] Allow search queries on any field. (#243)
+ - [X] Drop clojars snapshots from default repos (#241)
+ - [X] Remove mention of preview branch from docs, bin/lein
+ - [ ] Deploy and configure clojars promotion functionality
+ - [ ] Check to see that libraries are being promoted
+ - [ ] Document releases repository on Clojars wiki
** 2.0.0-preview9
- [X] Fast trampolining
- [X] Latest newnew

0 comments on commit 2973d99

Please sign in to comment.