scala.js - Why doesn't my sbt project dependency work? (insists on trying to fetch it remotely) -
I want to be a bridge for Scala.js and Snap.svg in a SBT project, but also demo code For the bridge,
when demo / compile
do the SBT, it starts to say that it can not solve the dependency. It seems that it is trying to reach the bridge as it is a well-publicized project, but it is fine, and it's compiled.
What am I doing wrong?
Deleting publishing-specific files has not changed.
Directory structure:
├── build sbt ├── project │ ├── (PublishToBintray.scala) │ ├── build.properties │ ├── build.sbt │ ├── Project │ │ └── ... │ └─ ─ Target │ │ └── ... ├── (publication sbt) ├── scalajs_demos │ ├── main │ │ │ └── Scala │ │ └── watch. Scala │ └── target │ └── ... ├── source │ └── main │ └── scala │ └── org │ └── scales │ └── snapsg │ ├ ── SnapSwig Scolle │ └── package. Scala └── target └── ...
build.sbt:
scalaJSSettings name: = "Scala.js Sna P .svg "normalizedName: =" scalajs-snapsvg "version: =" 0.01 "organization: =" org.scala-lang.modules.scalajs "scale version: =" 2.11.1 "crosscroll version: = Seq (" 2.10.4 "," 2.11.1 ") / Note: The 2.10.x library was not tested. Dependencies = "org.scala-lang.modules.scalajs" %%% "Scalag-Dom"% "0.6" // TBD: Probably it requires, like jQuery pulls ScalaJSKeys.jsDependencies + = "org.webjars" % "Snap svg"% "0.3.0" / "snap.svg.js" homepage: = some (url ("http: // snapsvg.oo" /)) license + = ("Apache 2.0", URL ( "Https://github.com/adobe-webplatform/Snap.svg/blob/master/LICENSE") // --- // bridge (main) project // sluggish wall bridge = project.in (file (" . ") // --- // Demo Project // Lazy Valve Demo = Project. (File (" Scalves_dams "). Dependon (Bridge)
What has gone wrong in T:
Updating demo / compilation [info] {file: / users / asko / hg / scala-js-snapsvg /} Demographics ... [information] resolution org .scala-lang.modules.scalajs # scalajs-snapsvg_sjs0.5_2.10; 0.01 ... [Warning] Modu did not find: org.scala-lang.modules.scalajs # scalajs-snapsvg_sjs0.5_2.10; 0.01 [Warning] ==== Local: Try [Warning] / Users / Work / .vv2 / Local /org.scala- Lang.modules.scalajs / scalajs-snapsvg_sjs0.5_2.10 / 0.01 / ivys / ivy.xml [Warning ] ==== Public: Try [Warning] http://repo1.maven.org/maven2/org/scala- Lang / modules / scalajs / scalajs-snapsvg_sjs0.5_2.10 / 0.01 / scalajs-snapsvg_sjs0.5_2.10 -0.01.pom [info] Solve org.fusesource.jansi # jansi; 1.4 ... [Warning] :::: ::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::Warning: unmanageable states: [warning] ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::: [Warning] :: org.scala-lang.modules.scalajs # scalajs-snapsvg_sjs0.5_2.10; 0.01: Not Found [Warning] :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::01 :::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::: [Error] (demo / *: update) sbt.ResolveException: unresolved dependency: org.scala-lang.modules.scalajs # scalajs-snapsvg_sjs0.5_2.10; 0.01: Not Found [Error] Total Time: 0s, full 27.7 .2014 22:57:22>
One more thing, project / plugins.sbt
:
The root cause of your problem is that bridge
uses the project scalaVersion :: =" 2.11.1 "
(as Specified by your build.sbt
, but uses your demo
project default scalaVersion
(which is SBT 0.13, 2.10.2 in IIRC ). dependOn
Problems are confused when it tries to be related to projects. Look at this problem:
You might have thought that scalaVersion: = "2.11.1"
in the root Build.sbt
will apply to all sub-effects. But this is not true, this is only the app .
(here, the bridge
) is for the subproject contained in You must also specify this setting (and the others you want to share), either the settings ()
method demos
, or As the argument of the scalajs_demos / build. Sbt
file.
Comments
Post a Comment