Gabriel95 / scalafx

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

Unable to compile ScalaFX SBT project! #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Checkout ScalaFX source
2. Compile for 2.10 
3. Publish to local Ivy repo
3. Add dependency to SBT project
4. Copy source fragment from 
http://code.google.com/p/scalafx/wiki/GettingStarted into project
5: sbt compile

What is the expected output? What do you see instead?

Expected success, got this:

[info] Loading project definition from 
/home/data/Development/Personal/Scala/WoTSigTool/project
[info] Set current project to WoTSigTool (in build 
file:/home/data/Development/Personal/Scala/WoTSigTool/)
> [info] ans: java.lang.String = <modified system property 'jline.terminal' for 
Scala console compatibility>
> clean
[success] Total time: 0 s, completed Jan 25, 2013 6:30:58 AM
> compile
[info] Updating 
{file:/home/data/Development/Personal/Scala/WoTSigTool/}default-31b179...
[info] Resolving org.scala-lang#scala-library;2.10.0 ...
[info] Resolving org.python#jython;2.5.3 ...
[info] Resolving net.databinder#dispatch-http_2.10;0.8.9 ...
[info] Resolving net.databinder#dispatch-core_2.10;0.8.9 ...
[info] Resolving org.apache.httpcomponents#httpclient;4.1.3 ...
[info] Resolving org.apache.httpcomponents#httpcore;4.1.4 ...
[info] Resolving commons-logging#commons-logging;1.1.1 ...
[info] Resolving commons-codec#commons-codec;1.4 ...
[info] Resolving net.databinder#dispatch-futures_2.10;0.8.9 ...
[info] Resolving org.scala-lang#scala-actors;2.10.0 ...
[info] Resolving net.databinder#dispatch-mime_2.10;0.8.9 ...
[info] Resolving org.apache.httpcomponents#httpmime;4.1.2 ...
[info] Resolving org.apache.james#apache-mime4j-core;0.7.2 ...
[info] Resolving com.typesafe#slick_2.10;1.0.0-RC1 ...
[info] Resolving org.slf4j#slf4j-api;1.6.4 ...
[info] Resolving org.scala-lang#scala-compiler;2.10.0 ...
[info] Resolving org.scala-lang#scala-reflect;2.10.0 ...
[info] Resolving ch.qos.logback#logback-core;1.0.9 ...
[info] Resolving com.h2database#h2;1.3.170 ...
[info] Resolving net.liftweb#lift-json_2.10;2.5-M4 ...
[info] Resolving org.specs2#specs2_2.10;1.12.3 ...
[info] Resolving org.specs2#specs2-scalaz-core_2.10.0-RC3;6.0.1 ...
[info] Resolving org.scala-lang#scalap;2.10.0 ...
[info] Resolving com.thoughtworks.paranamer#paranamer;2.4.1 ...
[info] Resolving 
com.googlecode.scalascriptengine#scalascriptengine;1.2.1-2.10.0-SNAPSHOT ...
[info] Resolving org.scala-tools.time#time_2.9.1;0.5 ...
[info] Resolving joda-time#joda-time;1.6.2 ...
[info] Resolving com.googlecode.scalaconcurrency#scalaconcurrency;0.8.1-2.10.0 
...
[info] Resolving com.googlecode.classgenerator#classgenerator;0.6.7-2.10.0 ...
[info] Resolving org.javassist#javassist;3.16.1-GA ...
[info] Resolving org.scalafx#scalafx-core_2.10;1.0-SNAPSHOT ...
[info] Resolving org.scala-lang#scala-swing;2.10.0 ...
[info] Done updating.
[info] Compiling 1 Scala source to 
/home/data/Development/Personal/Scala/WoTSigTool/target/scala-2.10/classes...
[error] bad symbolic reference. A signature in Stage.class refers to term javafx
[error] in package <root> which is not available.
[error] It may be completely missing from the current classpath, or the version 
on
[error] the classpath might be incompatible with the version used when 
compiling Stage.class.
[error] bad symbolic reference. A signature in Stage.class refers to term stage
[error] in value javafx which is not available.
[error] It may be completely missing from the current classpath, or the version 
on
[error] the classpath might be incompatible with the version used when 
compiling Stage.class.
[error] two errors found
[error] (compile:compile) Compilation failed
[error] Total time: 33 s, completed Jan 25, 2013 6:31:35 AM

What version of the product are you using? On what operating system?

Snapshot of source checked out 24/01/2013, Sabayon Linux with kernel 3.7, JDK 
1.7.0.9.

Original issue reported on code.google.com by adam.jor...@gmail.com on 25 Jan 2013 at 4:44

GoogleCodeExporter commented 8 years ago
Never mind. I did not know that the following needed to be in your build.sbt 
file:

unmanagedJars in Compile += Attributed.blank(
    file(scala.util.Properties.javaHome) / "lib" / "jfxrt.jar")

fork in run := true

in addition to the obvious:

libraryDependencies += "org.scalafx" % "scalafx" % "1.0-SNAPSHOT"

Original comment by adam.jor...@gmail.com on 25 Jan 2013 at 9:56

GoogleCodeExporter commented 8 years ago
Since the tip for the correct configuration of the build.sbt in the project 
depending on ScalaFX has been integrated in the ScalafxMaven wiki page, Adam is 
ok with closing this issue as "Invalid".

Original comment by Alain.Fa...@gmail.com on 28 Jan 2013 at 2:30