Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 2973d99652fb8762152dac931f1813bf472012e8 1 parent 624bf2a
@technomancy authored
View
1  bin/lein
@@ -216,6 +216,7 @@ elif [ "$1" = "upgrade" ]; then
echo "You do not have permission to upgrade the installation in $SCRIPT"
exit 1
else
+ # TODO: change to stable when 2.0.0 is released
TARGET_VERSION="${2:-'preview'}"
echo "The script at $SCRIPT will be upgraded to the latest $TARGET_VERSION version."
echo -n "Do you want to continue [Y/n]? "
View
25 doc/FAQ.md
@@ -5,14 +5,14 @@
**Q:** What's a group ID? How do snapshots work?
**A:** See the
- [tutorial](https://github.com/technomancy/leiningen/blob/preview/doc/TUTORIAL.md)
+ [tutorial](https://github.com/technomancy/leiningen/blob/rc/doc/TUTORIAL.md)
for background.
**Q:** How should I pick my version numbers?
**A:** Use [semantic versioning](http://semver.org).
**Q:** What if my project depends on jars that aren't in any repository?
-**A:** The [deploy guide](https://github.com/technomancy/leiningen/blob/preview/doc/DEPLOY.md)
+**A:** The [deploy guide](https://github.com/technomancy/leiningen/blob/rc/doc/DEPLOY.md)
explains how to set up a private repository. If you are not sharing
them with a team you could also just
[install locally](https://github.com/kumarshantanu/lein-localrepo).
@@ -20,7 +20,7 @@
the [s3-wagon-private](https://github.com/technomancy/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](https://github.com/technomancy/leiningen/blob/preview/doc/TUTORIAL.md)
+**A:** Leiningen provides a feature called *checkout dependencies*. See the [tutorial](https://github.com/technomancy/leiningen/blob/rc/doc/TUTORIAL.md)
to learn more.
**Q:** Is it possible to exclude indirect dependencies?
@@ -93,11 +93,14 @@
project launches, though there are compatibility issues with some
libraries.
-**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](https://github.com/ato/clojars-web/issues/24),
- 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](https://clojars.org/repo) by default,
+ replacing it with the
+ [Clojars releases repository](https://github.com/ato/clojars-web/wiki/Releases).
+ 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" "https://clojars.org/repo"]]`
View
8 doc/TUTORIAL.md
@@ -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
-[README](https://github.com/technomancy/leiningen/blob/preview/README.md).
+[README](https://github.com/technomancy/leiningen/blob/rc/README.md).
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
-[sample.project.clj](https://github.com/technomancy/leiningen/blob/preview/sample.project.clj).
+[sample.project.clj](https://github.com/technomancy/leiningen/blob/rc/sample.project.clj).
### 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](https://github.com/technomancy/leiningen/blob/preview/doc/DEPLOY.md)
+[maintain your own private repository](https://github.com/technomancy/leiningen/blob/rc/doc/DEPLOY.md)
or get it into [Central](http://search.maven.org), the easiest way is
to publish it at [Clojars](http://clojars.org). Once you have
[created an account](https://clojars.org/register) 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](http://gnupg.org) to prove your
authorship of the release. See the
-[deploy guide](https://github.com/technomancy/leiningen/blob/preview/doc/DEPLOY.md).
+[deploy guide](https://github.com/technomancy/leiningen/blob/rc/doc/DEPLOY.md).
for details of how to set that up. The deploy guide includes
instructions for deploying to other repositories as well.
View
7 leiningen-core/src/leiningen/core/classpath.clj
@@ -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 http://j.mp/repeatability"))
+ (println "This could be due to a typo in :dependencies or network issues.")
+ (when-not (some #(= "https://clojars.org/repo/" (:url (second %))) repositories)
+ (println "It's possible the specified jar is in the old Clojars Classic repo.")
+ (println "If so see https://github.com/ato/clojars-web/wiki/Releases.")))
(throw (ex-info "Could not resolve dependencies" {:exit-code 1})))
(catch Exception e
(if (and (instance? java.net.UnknownHostException (root-cause e))
View
3  leiningen-core/src/leiningen/core/project.clj
@@ -127,8 +127,7 @@
(def default-repositories
(with-meta
[["central" {:url "http://repo1.maven.org/maven2/"}]
- ;; TODO: point to releases-only before 2.0 is out
- ["clojars" {:url "https://clojars.org/repo/"}]]
+ ["clojars" {:url "http://releases.clojars.org/repo/"}]]
{:reduce add-repo}))
(def deploy-repositories
View
2  leiningen-core/test/leiningen/core/test/project.clj
@@ -36,7 +36,7 @@
:twelve 12 ; testing unquote
:repositories [["central" {:url "http://repo1.maven.org/maven2/"}]
- ["clojars" {:url "https://clojars.org/repo/"}]]})
+ ["clojars" {:url "http://releases.clojars.org/repo/"}]]})
(deftest test-read-project
(let [actual (read (.getFile (io/resource "p1.clj")))]
View
16 todo.org
@@ -4,12 +4,16 @@ See also https://github.com/technomancy/leiningen/issues
* 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 http://nullprogram.com/blog/2011/11/06/ ?
+ - [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
+ https://github.com/ato/clojars-web/wiki/Releases
** 2.0.0-preview9
- [X] Fast trampolining
- [X] Latest newnew
Please sign in to comment.
Something went wrong with that request. Please try again.