0

I added this to the project/plugin.sbt file:

resolvers ++= Seq(
  "JBoss repository" at "http://repository.jboss.org/nexus/content/groups/public/",
  "Project Odd repository" at "http://repository-projectodd.forge.cloudbees.com/upstream/"
)

addSbtPlugin("io.escalante.sbt" % "sbt-escalante" % "0.1.1")

then to build.sbt

import io.escalante.sbt.EscalantePlugin._
import io.escalante.sbt.EscalantePlugin.EscalanteKeys._
escalanteSettings

and as I load sbt 0.12.1 I get:

[error] (*:update) sbt.ResolveException: unresolved dependency: org.jboss.shrinkwrap.descriptors#shrinkwrap-descriptors-spi;1.0.3.Final: not found

How can I solve this?

(I don;t have enough points to create the #escalante tag :( , sorry for using the sbt tag

Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120
fmpwizard
  • 2,758
  • 1
  • 22
  • 24
  • Diego, can you try a few things? First, upgrade to SBT 0.12.2 (I had some issues with 0.12.1 or 0.12 but cannot remember which...) and try again. Secondly, try if adding a direct dependency for `"org.jboss.shrinkwrap.descriptors" % "shrinkwrap-descriptors-spi" % "2.0.0-alpha-3"` build.sbt file works. – Galder Zamarreño Mar 12 '13 at 08:16
  • 1
    For interest of the public, this appears to be a bug in SBT/Ivy which is resolving the wrong dependency. See https://github.com/sbt/sbt/issues/647 for full details. – Galder Zamarreño Mar 12 '13 at 08:17
  • sbt 0.12.2 did not fix it, adding "org.jboss.shrinkwrap.descriptors" % "shrinkwrap-descriptors-spi" % "2.0.0-alpha-3" to build.sbt did not fix it either. Maybe you need to add to https://github.com/arashi01/sbt-escalante/blob/79ca36b13f62f0cb9e5b886a55936bc9e453b425/build.sbt the exclude option, to exclude the wrong version , see https://github.com/harrah/xsbt/wiki/Library-Management – fmpwizard Mar 12 '13 at 11:52
  • Diego, I haven't been able to replicate the issue here so far on my side. Mind building the SBT plugin on your side adding this dependency and see if it works? `"org.jboss.arquillian.config" % "arquillian-config-impl-base" % "1.0.3.Final" exclude("org.jboss.shrinkwrap.descriptors", "shrinkwrap-descriptors-spi")` - If that doesn't work, can you try adding a `excludeAll` with rules for both `shrinkwrap-descriptors-spi` and `shrinkwrap-descriptors-api-base`? – Galder Zamarreño Mar 12 '13 at 18:26
  • Diego, I also haven't been able to reliably replicate the issue yet (I get the error with sbt-escalante 0.1.0 but not with 0.1.1). Just wanted to confirm that the build.sbt file in which you added the `"org.jboss.shrinkwrap.descriptors" % "shrinkwrap-descriptors-spi" % "2.0.0-alpha-3"` dependency is located in `/project` (i.e in your sbt plugin project definition) and not your main build.sbt as it is a plugin dependency. – arashi01 Mar 12 '13 at 22:52

1 Answers1

2

Just experienced this issue again.

It seems that adding the shrinkwrap-descriptors-spi dependency as a workaround for sbt#647 doesn't always work when using the published sbt-escalante binary from the maven repo, however adding it as a remote git plugin project dependency seems to.

To do so you will need to remove the addSbtPlugin("io.escalante.sbt" % "sbt-escalante" % "0.1.1") line from your project/build.sbt file and add a *.scala plugin project definition file in your project/project directory with something like the following:

Sample 'project/project/Plugins.scala':

import sbt._
import Keys._

object Plugins extends Build {
  lazy val pluginProject = Project("plugins", file(".")).settings(
    resolvers ++= Seq(
      "JBoss repository" at "http://repository.jboss.org/nexus/content/groups/public/",
      "Project Odd repository" at "http://repository-projectodd.forge.cloudbees.com/upstream/")        
  ).dependsOn(sbtEscalante)

  lazy val sbtEscalante = uri("git://github.com/escalante/sbt-escalante.git#0.1.1")
}

A sample git project can be found here

arashi01
  • 579
  • 12
  • 11
  • Thanks! I'll be trying this later this week and come back and update. – fmpwizard Mar 17 '13 at 04:17
  • Sorry guys for not replying (trying to configure things properly to receive notifications on answers/comments on this post). Ali, thanks for posting the workaround! I'll apply to the quickstarts in next update for SBT plugin version 0.2.0. @Diego, let us know if this works for you :) – Galder Zamarreño Mar 20 '13 at 09:07
  • @fmpwizard, did you manage to try and see if it works for you? – arashi01 Mar 28 '13 at 22:39
  • 1
    Sorry for the late testing, the workaround works!, I tried changing the plugin git url to point to 0.1.2 and it also worked. Thanks! Now it's pretty late here, but tomorrow I'll try to actually run escalante from sbt, but at least now it compiles – fmpwizard Mar 29 '13 at 07:16