jitpack / jitpack.io

Documentation and issues of https://jitpack.io
MIT License
2.51k stars 183 forks source link

SBT addSbtPlugin not working with jitpack #806

Open thibaultmeyer opened 8 years ago

thibaultmeyer commented 8 years ago

Hi,

Using jitpack with standard dependencies work like a charm but don't work with addSbtPlugin directive. By example, in a Play Framework project, the file project\plugins.sbt contain: the following lines:

resolvers += "jitpack" at "https://jitpack.io"

addSbtPlugin("com.github.0xbaadf00d" % "play-ebean" % "4e613c56c7")

During the compilation, I got this error :

[error] SERVER ERROR: Origin Time-out url=https://jitpack.io/com/github/0xbaadf00d/play-ebean_2.10_0.13/4e613c56c7/play-ebean-4e613c56c7.pom
[warn]  module not found: com.github.0xbaadf00d#play-ebean;4e613c56c7
[warn] ==== typesafe-ivy-releases: tried
[warn]   https://repo.typesafe.com/typesafe/ivy-releases/com.github.0xbaadf00d/play-ebean/scala_2.10/sbt_0.13/4e613c56c7/ivys/ivy.xml
[warn] ==== sbt-plugin-releases: tried
[warn]   https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.github.0xbaadf00d/play-ebean/scala_2.10/sbt_0.13/4e613c56c7/ivys/ivy.xml
[warn] ==== local: tried
[warn]   C:\Users\thiba\.ivy2\local\com.github.0xbaadf00d\play-ebean\scala_2.10\sbt_0.13\4e613c56c7\ivys\ivy.xml
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/com/github/0xbaadf00d/play-ebean_2.10_0.13/4e613c56c7/play-ebean-4e613c56c7.pom
[warn] ==== activator-launcher-local: tried
[warn]   D:\Users\thiba\Documents\Programmation\walllll\repository\com.github.0xbaadf00d\play-ebean\scala_2.10\sbt_0.13\4e613c56c7\ivys\ivy.xml
[warn] ==== activator-local: tried
[warn]   c:\activator\repository\com.github.0xbaadf00d\play-ebean\scala_2.10\sbt_0.13\4e613c56c7\ivys\ivy.xml
[warn] ==== typesafe-releases: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com/github/0xbaadf00d/play-ebean_2.10_0.13/4e613c56c7/play-ebean-4e613c56c7.pom
[warn] ==== typesafe-ivy-releasez: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.github.0xbaadf00d/play-ebean/scala_2.10/sbt_0.13/4e613c56c7/ivys/ivy.xml
[warn] ==== jitpack: tried
[warn]   https://jitpack.io/com/github/0xbaadf00d/play-ebean_2.10_0.13/4e613c56c7/play-ebean-4e613c56c7.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.github.0xbaadf00d#play-ebean;4e613c56c7: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn]  Note: Some unresolved dependencies have extra attributes.  Check that these dependencies exist with the requested attributes.
[warn]          com.github.0xbaadf00d:play-ebean:4e613c56c7 (scalaVersion=2.10, sbtVersion=0.13)
[warn]
[warn]  Note: Unresolved dependencies path:
[warn]          com.github.0xbaadf00d:play-ebean:4e613c56c7 (scalaVersion=2.10, sbtVersion=0.13) (D:\Users\thiba\Documents\Programmation\walllll\project\plugins.sbt#L24-25)
[warn]            +- default:walllll-build:0.1-SNAPSHOT (scalaVersion=2.10, sbtVersion=0.13)
sbt.ResolveException: unresolved dependency: com.github.0xbaadf00d#play-ebean;4e613c56c7: not found

JitPack play-ebean compilation log : https://jitpack.io/com/github/0xbaadf00d/play-ebean/4e613c56c7/build.log

jitpack-io commented 8 years ago

Hi,

It looks like sbt is trying to download https://jitpack.io/com/github/0xbaadf00d/play-ebean_2.10_0.13/4e613c56c7/play-ebean-4e613c56c7.pom

while the actual file produces by the build is: https://jitpack.io/com/github/0xbaadf00d/play-ebean/play-ebean_2.11/4e613c56c7/play-ebean_2.11-4e613c56c7.pom

with _2.11 being the difference.

Does addSbtPlugin("com.github.0xbaadf00d" % "play-ebean_2.11" % "4e613c56c7") work? If not then perhaps its possible to change the build to output the artifacts without the _2.11 suffix?

Also, there is a similar issue here that might help: https://github.com/jitpack/jitpack.io/issues/377

thibaultmeyer commented 8 years ago

with addSbtPlugin("com.github.0xbaadf00d" % "play-ebean_2.11" % "4e613c56c7"), SBT try to retrieve https://jitpack.io/com/github/0xbaadf00d/play-ebean_2.11_2.10_0.13/4e613c56c7/play-ebean_2.11-4e613c56c7.pom

It seem that SBT don't treat the same way plugin and dependency.