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

`:type :pom` seems to be broken (2.0-preview2) #457

Closed
benkard opened this Issue Mar 17, 2012 · 3 comments

Comments

2 participants

benkard commented Mar 17, 2012

sample.project.clj contains the following dependency:

[net.sf.ehcache/ehcache "2.3.1" :type "pom"]

With this dependency, lein2 deps fails (where lein2 is Leiningen 2.0-preview2):

Exception in thread "main" java.lang.RuntimeException: org.sonatype.aether.resolution.DependencyResolutionException: Could not find artifact net.sf.ehcache:ehcache:jar:2.3.1 in central (http://repo1.maven.org/maven2)

lein precate simply drops the :type "pom" part, but this does not seem to change the behavior of Leiningen 2.0-preview2 in any way.

(Note that I am not sufficiently familiar with Maven to know what :type "pom" means, but I seem to need it in order to successfully depend on the openid4java library.)

Collaborator

xeqi commented Mar 26, 2012

Looks like pomegranate uses :extension "pom" instead of :type "pom" as that is what it was called in the aether docs. However, using that causes an exception:

Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
    at clojure.lang.Util.runtimeException(Util.java:165)
    at clojure.lang.Reflector.invokeConstructor(Reflector.java:193)
    at leiningen.core.classpath$extract_native_deps$fn__255.invoke(classpath.clj:42)
    at clojure.core$map$fn__3811.invoke(core.clj:2432)
    at clojure.lang.LazySeq.sval(LazySeq.java:42)
    at clojure.lang.LazySeq.seq(LazySeq.java:60)
    at clojure.lang.RT.seq(RT.java:466)
    at clojure.core$seq.invoke(core.clj:133)
    at leiningen.core.classpath$extract_native_deps.invoke(classpath.clj:42)
    at leiningen.core.classpath$resolve_dependencies.doInvoke(classpath.clj:90)
    at clojure.lang.RestFn.invoke(RestFn.java:425)
    at leiningen.deps$deps.invoke(deps.clj:10)
    at clojure.lang.Var.invoke(Var.java:401)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.Var.applyTo(Var.java:518)
    at clojure.core$apply.invoke(core.clj:602)
    at leiningen.core.main$resolve_task$fn__648.doInvoke(main.clj:54)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:602)
    at leiningen.core.main$apply_task.invoke(main.clj:75)
    at leiningen.core.main$_main.doInvoke(main.clj:124)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.lang.Var.invoke(Var.java:401)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.Var.applyTo(Var.java:518)
    at clojure.core$apply.invoke(core.clj:600)
    at clojure.main$main_opt.invoke(main.clj:323)
    at clojure.main$main.doInvoke(main.clj:426)
    at clojure.lang.RestFn.invoke(RestFn.java:436)
    at clojure.lang.Var.invoke(Var.java:409)
    at clojure.lang.AFn.applyToHelper(AFn.java:167)
    at clojure.lang.Var.applyTo(Var.java:518)
    at clojure.main.main(main.java:37)
Caused by: java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:131)
    at java.util.jar.JarFile.<init>(JarFile.java:150)
    at java.util.jar.JarFile.<init>(JarFile.java:114)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
    at clojure.lang.Reflector.invokeConstructor(Reflector.java:183)
    ... 35 more

Self-reminder about what to fix:

  1. Fix exception / make sure :extension "pom" works
  2. Keep pom file off the classpath (?)
  3. Make issue or fix pom generation for dependencies with :extension
  4. Make issue for or fix lein-precate to change the key
  5. Update sample.project.clj

technomancy added a commit that referenced this issue Mar 30, 2012

Collaborator

xeqi commented Mar 30, 2012

lein-precate issue at technomancy/lein-precate#3

xeqi added a commit that referenced this issue Mar 30, 2012

@xeqi xeqi closed this in a8c06fb Mar 30, 2012

Collaborator

xeqi commented Apr 4, 2012

:extension "pom" now works in master, and lein-precate 0.3.0 will keep dependency options and convert :type to :extension.

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