[0.10.0] explicit url dependency in plugin not pulled down on update

26 views
Skip to first unread message

Keith Irwin

unread,
Jun 10, 2011, 10:28:55 PM6/10/11
to simple-b...@googlegroups.com
When I include a dependency in a Plugin's build.sbt which looks like this (from the docs):

    libraryDependencies += "slinky" % "slinky" % "2.1" from "http://slinky2.googlecode.com/svn/artifacts/2.1/slinky.jar"

the jar doesn't get downloaded when I "sbt update", which means my build no longer works.

The plugin's ivy.xml looks like:

    <dependency org="slinky" name="slinky" rev="2.1" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>

in other words, no link to the jar (if that's what's required, here).

Is this a bug, or am I declaring that dependency incorrectly?

Keith

Keith Irwin

unread,
Jun 10, 2011, 11:04:28 PM6/10/11
to simple-b...@googlegroups.com
I tried an explicit ivyXML expression, like so:

ivyXML :=
  <dependencies>
    <dependency org="org.whatever" name="whatever" rev="9.0">
      <artifact name="whatever" type="jar" ext="jar" url="http://example.com/path/to/whatever.jar"/>
    </dependency>
  </dependencies>

and an "sbt publish-local" generated the following ivy.xml fragment:

  <dependency org="org.whatever" name="whatever" rev="9.0" conf="compile->default(compile)">
    <artifact name="whatever" type="jar" ext="jar"/>
  </dependency>

So it looks like SBT is completely ignoring that setting, eh? SBT is using ivy 2.0 and the URL setting is since 1.4.

K

Mark Harrah

unread,
Jun 10, 2011, 11:17:36 PM6/10/11
to simple-b...@googlegroups.com

I'm aware of this, but I don't think it is happening on the sbt side. It could be by design for Ivy, but I've not seen anything in the Ivy documentation that indicates why it gets dropped.

-Mark

Keith Irwin

unread,
Jun 10, 2011, 11:51:46 PM6/10/11
to simple-b...@googlegroups.com
Hm. The old coffee-script plugin seemed to download it okay without you having to add the dependency explicitly in your own build.

I updated the ivy.xml in my downloaded plugin (in ~/.ivy2) to include the artifact with the URL, and SBT then worked fine.

I'll see if I can figure out if there's something amiss in SBT itself.

Keith

Mark Harrah

unread,
Jun 12, 2011, 12:24:47 AM6/12/11
to simple-b...@googlegroups.com
On Fri, 10 Jun 2011 20:51:46 -0700 (PDT)
Keith Irwin <keith...@gmail.com> wrote:

> Hm. The old coffee-script plugin seemed to download it okay without you
> having to add the dependency explicitly in your own build.

I just tried it and it failed for me. If you look at the published pom, the URL information is not there.

Ivy uses the URL as a hint for where to get a file when it can't find it in any repositories, so perhaps it caches that information for use in general once you've built coffee-script directly (where it would see the URL declared).

> I updated the ivy.xml in my downloaded plugin (in ~/.ivy2) to include the
> artifact with the URL, and SBT then worked fine.

In theory, you could modify the delivered XML file, but it would probably be better to fix it in Ivy properly.

-Mark

Reply all
Reply to author
Forward
0 new messages