I am trying to get Buildr to compile my Scala 2.8 project, and I was hoping that someone might already figure this out.
I currently have a standard HelloWorld application with an assembly file, for example:
ENV['JAVA_HOME'] = 'C:\Program Files (x86)\Java\jdk1.6.0_17' ENV['SCALA_HOME'] = 'C:\scala-2.8.0.Beta1-RC6' define "HelloWorld" do
When I run buildr, I get the following output:
(in C: / Users / Travis / eclipse_ws / HelloWorld, development)
2.7.5
HelloWorld Construction
Compiling HelloWorld in C: / Users / Travis / eclipse_ws / HelloWorld / target / classes
Buildr aborted!
â [31mScala compiler crashed:
# â [0m
The first problem is NoClassDefFoundError - it cannot find the main class of the Scala compiler. The second problem is that Scala.version prints 2.7.5. This is not true because the SCALA_HOME path points to release 2.8.
Finally, using the -trace flag shows me that Buildr generates a somewhat correct scalac command, and when I run this command manually, everything compiles. I say this somewhat correctly, only because some cp entries are duplicated. See the following:
scalac -classpath C: / scala -2.8.0.Beta1-RC6 / lib / scala -library.jar; C: / scala -2.8.0.Beta1-RC6 / lib / scala -compiler.jar; C: / scala -2.8.0.Beta1-RC6 / Library / scala -library.jar; C: / scala -2.8.0.Beta1-RC6 / Library / scala -compiler.jar -sourcepath C: / Users / Travis / eclipse_ws / HelloWorld / src / main / scala -d C: / Users / Travis / eclipse_ws / HelloWorld / target / classes -verbose -g C: /Users/Travis/eclipse_ws/HelloWorld/src/main/scala/hw/HelloWorld.scala
One more thing I tried (but the wrong builder) installed the following (which I thought was not required with SCALA_HOME):
#artifact_ns['Buildr::Compiler::Scalac'].library = '2.8.0'
So any ideas?
Here is a short list of my system information: Win 7 64 bit JDK 6 32 bit installed locally for buildr, but JDK 6 64-bit throughout Ruby 1.8.6 32 bit Buildr 1.3.5 32 bit Scala 2.8.0.Beta1-RC6
Another thing I'm going to do is reinstall my 32-bit JDK and extract it from the directory with (x86) in the name. I found that there are screws with bat Scala files, although I'm not sure if this applies to my current problems.
Thanks in advance!
scala buildr
Travis schneeberger
source share