Giter Club home page Giter Club logo

Comments (21)

lrenn avatar lrenn commented on September 24, 2024

Ahh, yeah, you're mixing up ivysettings files with ivy files. The ivy settings file defines your repositories. You'll need to create one and define that ParsPro repository in it. You don't need an ivy file. Just add a dependency in your project.clj like

 [com.sciplay/gls-db-service "1.0.2"]

Once that works, you can try the configurations

[com/sciplay/gls-db-service "1.0.2" :conf "release"]

See this link to create a simple ivy settings file.

http://ant.apache.org/ivy/history/2.3.0/settings.html

You just need to define that one repo.

Edit: I'm heading out for the night. I'll check back tonight.

from lein-ivy.

lrenn avatar lrenn commented on September 24, 2024

Actually, scratch that. I'll just add support for the url resolvers directly into it. That way, no need for the ivysettings.xml. Right now it assumes ibiblio resolvers.

I'd say give it a break for tonight and I'll get you going before the end of the weekend.

Thanks for giving this a shot! I'm excited to get back to work on it.

from lein-ivy.

lrenn avatar lrenn commented on September 24, 2024

By the way, your project.clj will eventually look something like this.

 (defproject imogen-service "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"}
   :plugins [[lein-ivy "0.2.0-SNAPSHOT"]]
   :hooks [leiningen.ivy]
   :dependencies [[org.clojure/clojure "1.5.1"]
                          [com.sciplay/gls-db-service "1.0.2" :conf "default->release"]])

If you put that in now, you'll see it try to resolve but fail to find the sciplay dependency (since that repo isn't yet defined).

I'll get back in touch soon.

from lein-ivy.

johnptoohey avatar johnptoohey commented on September 24, 2024

Great thanks. I did have an ivysettings from an old java project, and had the :ivysettings key point at that, but same results. I'll be back tomorrow. Would be great to have Ivy working again. Don't understand why there is not more people asking for this.

from lein-ivy.

lrenn avatar lrenn commented on September 24, 2024

Could you give me more info on repo.parsepro.com? Specifically they type and any attributes it has. It should be in your ivy settings file (which if you could post would be awesome).

http://ant.apache.org/ivy/history/2.3.0/settings/resolvers.html

Url resolvers are generic types that are used to create others, so you probably are using a different type.

What I've got should work fine for you if you set the ivysettings key to a valid settings file. What i'd like to do is support repos in project.clj. I already have support for that, but only for ibibilio (maven) style repos.

from lein-ivy.

johnptoohey avatar johnptoohey commented on September 24, 2024

ivysettings.xml

<ivysettings>
  <settings defaultResolver="default"/>
  <include url="http://repo.parspro.com/parspro-ivysettings-public.xml"/>
  <include url="file://${ivy.settings.dir}/ivysettings-local.xml"/>
  <include url="file://${ivy.settings.dir}/ivysettings-main-chain.xml"/>
  <include url="file://${ivy.settings.dir}/ivysettings-default-chain.xml"/>
</ivysettings>

ivysettings that is on the actual web server

<ivysettings>
  <resolvers>
    <url name="public">
      <ivy pattern="http://repo.parspro.com/parspro-repository/advanced/[organisation]/[module]/ivys/ivy-[revision].xml" />
      <artifact pattern="http://repo.parspro.com/parspro-repository/advanced/[organisation]/[module]/jars/[artifact]-[revision].[ext]" />
    </url>
  </resolvers>
</ivysettings>

from lein-ivy.

lrenn avatar lrenn commented on September 24, 2024

So, I was able to get this working without a code change. I did however need to push everything to clojars or vine and lein-ivy wouldn't resolve from ivy.

Could you try this:

https://gist.github.com/lrenn/7074702

The first file will be ivysettings.xml and the second will be project.clj. Then just try a lein repl and it should work. Let me know if you have any issues.

from lein-ivy.

johnptoohey avatar johnptoohey commented on September 24, 2024

Does the order of the entries in the project.clj matter?

Exception in thread "Thread-4" java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to clojure.lang.Named
        at clojure.core$namespace.invoke(core.clj:1513)
        at vine.xml$group.invoke(xml.clj:8)
        at vine.xml$exclusion.invoke(xml.clj:12)
        at clojure.core$map$fn__4207.invoke(core.clj:2485)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:60)
        at clojure.lang.RT.seq(RT.java:484)
        at clojure.lang.LazilyPersistentVector.create(LazilyPersistentVector.java:31)
        at clojure.core$vec.invoke(core.clj:354)
        at vine.xml$make_dependencies$iter__654__658$fn__659.invoke(xml.clj:24)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:60)
        at clojure.lang.RT.seq(RT.java:484)
        at clojure.core$seq.invoke(core.clj:133)
        at clojure.core$concat$cat__3925$fn__3926.invoke(core.clj:687)
        at clojure.lang.LazySeq.sval(LazySeq.java:42)
        at clojure.lang.LazySeq.seq(LazySeq.java:60)
        at clojure.lang.Cons.next(Cons.java:39)
        at clojure.lang.PersistentVector.create(PersistentVector.java:51)
        at clojure.lang.LazilyPersistentVector.create(LazilyPersistentVector.java:31)
        at clojure.core$vector.doInvoke(core.clj:345)
        at clojure.lang.RestFn.applyTo(RestFn.java:151)
        at clojure.core$apply.invoke(core.clj:617)
        at vine.xml$dependencies.invoke(xml.clj:30)
        at vine.xml$ivy_sexp.invoke(xml.clj:75)
        at vine.xml$ivy_element.invoke(xml.clj:79)
        at vine.xml$make_ivy_xml.invoke(xml.clj:83)
        at vine.xml$ivy_xml.invoke(xml.clj:88)
        at vine.xml$ivy_xml.invoke(xml.clj:95)
        at vine.xml$ivy_xml.invoke(xml.clj:96)
        at vine.core$ivy_resolve.invoke(core.clj:25)
        at vine.core$resolved_files.invoke(core.clj:31)
        at leiningen.ivy$ivy_resolve_dependencies.doInvoke(ivy.clj:19)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:617)
        at leiningen.ivy$resolve_hook.doInvoke(ivy.clj:28)
        at clojure.lang.RestFn.applyTo(RestFn.java:139)
        at clojure.core$apply.invoke(core.clj:619)
        at robert.hooke$compose_hooks$fn__741.doInvoke(hooke.clj:40)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:617)
        at robert.hooke$run_hooks.invoke(hooke.clj:46)
        at robert.hooke$prepare_for_hooks$fn__746$fn__747.doInvoke(hooke.clj:54)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.invoke(RestFn.java:457)

from lein-ivy.

lrenn avatar lrenn commented on September 24, 2024

It shouldn't, but are you using the exact file from the gist? It's working fine for me. This is the same error you've been getting all along (which I never got). What's the output of:

 lein -version

Though I doubt that's it. This is failing while trying to determine the group of a dependency while building the ivy.xml. Use the exact files from that gist.

from lein-ivy.

lrenn avatar lrenn commented on September 24, 2024

Ah, I got it. If you are using the exact file and you're still getting the error then it's probably some plugin from your profiles.clj.

  cat ~/.lein/profiles.clj

What's in there?

from lein-ivy.

johnptoohey avatar johnptoohey commented on September 24, 2024
λ lein -version
Leiningen 2.1.1 on Java 1.6.0_51 Java HotSpot(TM) 64-Bit Server VM

λ cat ~/.lein/profiles.clj
{:user {:plugins [
                  [lein-midje "3.0.1"]
                  ]}}
(defproject imogen-core "1.1.0-SNAPSHOT"
  :description "Imogen Server - Provides reporting services for GLSi"
  :dependencies [
                 [org.clojure/clojure "1.5.1"]
                 [cheshire "5.0.2"]
                 [com.taoensso/carmine "2.0.0"]
                 [com.taoensso/timbre "2.4.1"]
                 [clj-http "0.7.0"]
                 [slingshot "0.10.3"]
                 [lumiere "1.0.0-SNAPSHOT"]
                 [com.netflix.hystrix/hystrix-clj "1.3.1"]
                 [sonian/carica "1.0.2"]
                 [com.palletops/thread-expr "1.3.0"]
                 [org.clojure/core.match "0.2.0-rc3"]
                 [riemann-clojure-client "0.2.6"]
                 [org.clojure/core.async "0.1.0-SNAPSHOT"]
                 [com.keminglabs/jzmq "a6c1706"]
                 [com.keminglabs/zmq-async "0.0.1-SNAPSHOT"]
                 [com.sciplay/gls-db-service "1.0.2" :conf "default->release"]]

  :repositories [
                 ["sonatype-oss-public" "https://oss.sonatype.org/content/groups/public/"]
                 ]
  :profiles {:dev {:dependencies [[midje "1.5.0"]]}}
  :main imogen.init
  :injections [(require 'clojure.pprint)]

  :native-path "/usr/local/lib"
  :plugins [[lein-ivy "0.2.0-SNAPSHOT"]]
  :hooks [leiningen.ivy]
  :ivysettings "./ivysettings.xml"
  :source-paths ["src" "src/imogen"]
  :test-paths ["test" "test/imogen"]
  :resource-paths ["./resources"]
  :uberjar-name "imogen-core-standalone.jar"
  :jar-name "imogen-core.jar"
  :manifest {"Author" "John Toohey", "Version" "1.0"})

from lein-ivy.

lrenn avatar lrenn commented on September 24, 2024

Yeah, even this is working for me, however I'm using lein 2.2.0.

 ,-[lrenn@cygnus]-[~/src/imogen-core]-[130]-[9264]
 `-[:(] % lein -version
 Leiningen 2.2.0 on Java 1.7.0_17 Java HotSpot(TM) Client VM

from lein-ivy.

lrenn avatar lrenn commented on September 24, 2024

I get the same error when I upgrade to 2.3.3.

Looking into it.

from lein-ivy.

johnptoohey avatar johnptoohey commented on September 24, 2024

I have the same errors using your project.clj file. Could it be connected to the Java version?

from lein-ivy.

lrenn avatar lrenn commented on September 24, 2024

Wow, it seems sometimes leiningen throws in a [org.clojure/clojure] dependency into the project. I updated vine to filter this out for now while I figure out why it does this. None of the other dependency ever look like this and it's not the same clojure dependency that comes from the project.clj. Leiningen is adding it for some reason. I think this might be special handling for when a specific version of clojure is requested.

Anyway, pull vine and lein install it. Then give lein repl a shot again. Working for me now.

from lein-ivy.

johnptoohey avatar johnptoohey commented on September 24, 2024

Perfect. Thank you.
To add publishing, which project should I look at?

from lein-ivy.

lrenn avatar lrenn commented on September 24, 2024

Creating a new issue for publish.

from lein-ivy.

johnptoohey avatar johnptoohey commented on September 24, 2024

Just upgrade to new laptop and have Java 7 installed. Now when I try to build the project, I see the ivt is looking to

lein jar
:: loading settings :: url = jar:file:/Users/jt/.m2/repository/org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar!/org/apache/ivy/core/settings/ivysettings.xml

for the ivysettings file instead of the one in the project directory. Could this be related to the java version?

from lein-ivy.

lrenn avatar lrenn commented on September 24, 2024

Java version should have nothing to do with it (I use 7 as well). Does the project.clj you're using still have the

:ivysettings "./ivysettings.xml"

?

from lein-ivy.

johnptoohey avatar johnptoohey commented on September 24, 2024

Found it. Its

:ivy-settings "./ivysettings.xml"

from lein-ivy.

lrenn avatar lrenn commented on September 24, 2024

Ug. So sorry about that.

from lein-ivy.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.