Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Minor problem with dependency exclusions, lein2 preview4 #593

Closed
sunng87 opened this Issue May 22, 2012 · 4 comments

Comments

4 participants

sunng87 commented May 22, 2012

I'll begin with how to reproduce this issue:

create project test, add zookeeper-clj as deps:

(defproject test "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [zookeeper-clj "0.9.2"
                  :exclusions [junit jline]]])

run lein2 deps :tree, junit and jline are correctly excluded:

$ lein2 deps :tree
 [org.clojure/clojure "1.3.0"]
 [zookeeper-clj "0.9.2" :exclusions [[junit] [jline]]]
   [commons-codec "1.5"]
   [log4j "1.2.16"]
   [org.apache.zookeeper/zookeeper "3.3.2"]

Then create a project test2, add test as deps:

(defproject test2 "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.3.0"]
                 [test "0.1.0-SNAPSHOT"]])

then run lein2 deps :tree, however, junit and jline are included :

$ lein2 deps :tree
 [org.clojure/clojure "1.3.0"]
 [test "0.1.0-SNAPSHOT"]
   [zookeeper-clj "0.9.2" :exclusions [[/junit] [/jline]]]
     [commons-codec "1.5"]
     [log4j "1.2.16"]
     [org.apache.zookeeper/zookeeper "3.3.2"]
       [jline "0.9.94"]
         [junit "3.8.1"]

I think the root cause may be:

[zookeeper-clj "0.9.2" :exclusions [[/junit] [/jline]]]

There's some error when parsing the coordinator of exclusion.

Owner

technomancy commented May 22, 2012

Depending how involved this is we could move it to preview6. @cemerick you think this is a simple fix?

Collaborator

winks commented May 24, 2012

I could not reproduce this on Windows yesterday. Now I get the exact same result as above on Debian.

Collaborator

xeqi commented May 26, 2012

This is an issue with lein's pom generation. It does not generate the correct groupId tag when the group/artifact are the same in an exclusion.

Collaborator

xeqi commented May 26, 2012

Rather, it does not generate a groupId tag when the exclusion uses the shortened form of artifact instead of group/artifact.

@xeqi xeqi closed this in e2d2e68 May 26, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment