Skip to content
Browse files

Implicitly exclude clojure & contrib from dev-deps and plugins. Fixes #…

  • Loading branch information...
1 parent 203d9e0 commit 4e098f2889b5fb660c7a9532b94dc63e75f96833 @technomancy technomancy committed
Showing with 13 additions and 6 deletions.
  1. +3 −1 src/leiningen/deps.clj
  2. +2 −1 src/leiningen/plugin.clj
  3. +2 −1 test/leiningen/test/deps.clj
  4. +1 −1 test_projects/dev-deps-only/project.clj
  5. +5 −2 todo.org
View
4 src/leiningen/deps.clj
@@ -18,6 +18,8 @@
(org.apache.maven.artifact.repository ArtifactRepositoryPolicy)
(org.apache.tools.ant.util FlatFileNameMapper)))
+(def dev-exclusions '[org.clojure/clojure org.clojure/clojure-contrib])
+
(def update-policies {:daily ArtifactRepositoryPolicy/UPDATE_POLICY_DAILY
:always ArtifactRepositoryPolicy/UPDATE_POLICY_ALWAYS
:never ArtifactRepositoryPolicy/UPDATE_POLICY_NEVER})
@@ -193,7 +195,7 @@
(clean project))
(let [fileset (do-deps project :dependencies)]
(when-not (or skip-dev (no-dev?))
- (do-deps project :dev-dependencies))
+ (do-deps (assoc project :exclusions dev-exclusions) :dev-dependencies))
(extract-native-deps project)
(when (:checksum-deps project)
(spit (new-deps-checksum-file project) (deps-checksum project)))
View
3 src/leiningen/plugin.clj
@@ -2,7 +2,7 @@
"Manage user-level plugins."
(:use [leiningen.core :only [read-project abort]]
[leiningen.uberjar :only [write-components]]
- [leiningen.deps :only [deps]]
+ [leiningen.deps :only [deps dev-exclusions]]
[leiningen.jar :only [local-repo-path extract-jar
get-default-uberjar-name]]
[leiningen.util.file :only [tmp-dir delete-file-recursively]]
@@ -57,6 +57,7 @@ Syntax: lein plugin install [GROUP/]ARTIFACT-ID VERSION
(.replace "$HOME" (System/getProperty "user.home")))
_ (extract-jar (file jarfile) temp-project)
project (read-project (str (file temp-project "project.clj")))
+ project (assoc project :exclusions dev-exclusions)
standalone-filename (plugin-standalone-filename group name version)]
(deps (dissoc project :dev-dependencies :native-dependencies
:eval-in-leiningen))
View
3 test/leiningen/test/deps.clj
@@ -26,7 +26,8 @@
(let [jars (set (map #(.getName %)
(.listFiles (file (:root dev-deps-project)
"lib" "dev"))))]
- (is (contains? jars "clojure-1.2.0.jar"))))
+ (is (not (contains? jars "clojure-1.2.0.jar")))
+ (is (contains? jars "cheshire-2.0.2.jar"))))
(deftest ^{:online true} test-snapshots-releases
(try
View
2 test_projects/dev-deps-only/project.clj
@@ -1,4 +1,4 @@
(defproject dev-deps-only "1.0.0-SNAPSHOT"
:java-source-path "src"
- :dev-dependencies [[org.clojure/clojure "1.2.0"]]
+ :dev-dependencies [[cheshire "2.0.2"]]
:main dev_deps_only.Junk)
View
7 todo.org
@@ -5,11 +5,14 @@ See also https://github.com/technomancy/leiningen/issues
* For 1.7.0
- [X] System/exit in repl (#324)
- [X] interactive task takes full CPU (#346)
+ - [X] whole-namespace test selectors (#242)
+ - [X] Auto-exclusions for dev-deps and plugins (#375)
+ - [ ] Write plugin migration guide for 2.0; determine and back-port features
+ - [ ] Emit build extensions in pom (#365) (patch on the way)
+ - [ ] Fix search with :omit-default-repos (#361)
- [ ] NPE in deploy (#350)
- - [ ] whole-namespace test selectors (#242)
- [ ] I/O slowdown when testing (#335)
- [ ] Fix JVM_OPTS escaping (#326)
- - [ ] help task in Windows doesn't show text (#323)
- double-check 309
* For 1.6.2
- [X] resources with eval-in-leiningen (#248)

0 comments on commit 4e098f2

Please sign in to comment.
Something went wrong with that request. Please try again.