sarkisderderian / scalafx

Automatically exported from code.google.com/p/scalafx
Other
0 stars 0 forks source link

SBT error "sbt.ResolveException: unresolved dependency: org.hamcrest#hamcrest-core;1.3" #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Download the latest source code.
2. Run "sbt clean compile package make-pom package-src"
3. This error is produced:

[info] Loading project definition from E:\GH\scalafx\project
[info] Set current project to scalafx-project (in build file:/E:/GH/scalafx/)
[success] Total time: 0 s, completed Dec 30, 2013 8:45:47 PM
**** detected Java/JDK Home is set to C:\Program Files\Java\jdk1.7.0_45  ****
[info] Updating {file:/E:/GH/scalafx/}scalafx-project...
[info] Updating {file:/E:/GH/scalafx/}scalafx...
[info] Resolving org.scala-lang#scala-library;2.10.3 ...

M[info] Resolving org.scala-lang#scala-compiler;2.10.3 ...

M[info] Resolving org.scala-lang#scala-reflect;2.10.3 ...

M[info] Resolving org.scala-lang#jline;2.10.3 ...

M[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Resolving org.scala-lang#scala-library;2.10.3 ...

M[info] Resolving org.scalatest#scalatest_2.10;2.0 ...

M[info] Resolving org.scala-lang#scala-reflect;2.10.0 ...

M[info] Resolving junit#junit;4.11 ...

M[info] Resolving org.hamcrest#hamcrest-core;1.3 ...

M[info] Resolving org.hamcrest#hamcrest-parent;1.3 ...

M[info] Resolving org.scala-lang#scala-compiler;2.10.3 ...

M[info] Resolving org.scala-lang#scala-reflect;2.10.3 ...

M[info] Resolving org.scala-lang#jline;2.10.3 ...

M[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.hamcrest#hamcrest-core;1.3: several problems occurred while 
resolving dependency: org.hamcrest#hamcrest-core;1.3 {compile=[compile(*), 
master(*)], runtime=[runtime(*)]}:
[warn]  several problems occurred while resolving dependency: 
org.hamcrest#hamcrest-parent;1.3 {}:
[warn]  URI has an authority component
[warn]  URI has an authority component
[warn]  URI has an authority component
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: org.hamcrest#hamcrest-core;1.3: 
several problems occurred while resolving dependency: 
org.hamcrest#hamcrest-core;1.3 {compile=[compile(*), master(*)], 
runtime=[runtime(*)]}:
    several problems occurred while resolving dependency: org.hamcrest#hamcrest-parent;1.3 {}:
    URI has an authority component
    URI has an authority component
    URI has an authority component
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:213)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:104)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:51)
    at sbt.IvySbt$$anon$3.call(Ivy.scala:60)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:81)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
    at xsbt.boot.Using$.withResource(Using.scala:11)
    at xsbt.boot.Using$.apply(Using.scala:10)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:60)
    at sbt.IvySbt.withIvy(Ivy.scala:101)
    at sbt.IvySbt.withIvy(Ivy.scala:97)
    at sbt.IvySbt$Module.withModule(Ivy.scala:116)
    at sbt.IvyActions$.update(IvyActions.scala:121)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1161)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1159)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1182)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1180)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1184)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1179)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1187)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1152)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1130)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
    at sbt.std.Transform$$anon$4.work(System.scala:64)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:244)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
[error] (scalafx/*:update) sbt.ResolveException: unresolved dependency: 
org.hamcrest#hamcrest-core;1.3: several problems occurred while resolving 
dependency: org.hamcrest#hamcrest-core;1.3 {compile=[compile(*), master(*)], 
runtime=[runtime(*)]}:
[error]     several problems occurred while resolving dependency: 
org.hamcrest#hamcrest-parent;1.3 {}:
[error]     URI has an authority component
[error]     URI has an authority component
[error]     URI has an authority component
[error] Total time: 4 s, completed Dec 30, 2013 8:45:51 PM

What version of the product are you using? On what operating system?
SBT 0.13.1
Scala 2.10.3
Windows 8.1 Pro

Original issue reported on code.google.com by razvan.p...@gmail.com on 30 Dec 2013 at 6:51

GoogleCodeExporter commented 9 years ago
This looks like SBT bug. ScalaFX do not directly depend on `hamcrest-core`, 
indirectly through `junit`. It only happens if `hamcrest-core` is not in ivy 
cache.  

A work around is to make SBT download `hamcrest-core`. In an empty directory 
create `build.sbt` with a single line in it:
libraryDependencies += "junit" % "junit" % "4.11"

Run `sbt update` in that directory. It will download `junit` and 
`hamcrest-core` into ivy cache. After that the `ScalaFX` build works fine.

This should be reported to SBT as a bug.

Original comment by jpsacha on 3 Jan 2014 at 4:46

GoogleCodeExporter commented 9 years ago
That worked, thanks! Also had to set JAVAFX_HOME environment variable same as 
java sdk root.

Original comment by razvan.p...@gmail.com on 3 Jan 2014 at 4:53