I am running any of the examples under the 2.6 release of samples/scala/* using all of the stock build.gradle files for each of the samples.
For each scala sample , I tried running
gradle scalaConsole
and I get the output
paris mixedJavaAndScala % gradle scalaConsole
:compileJava UP-TO-DATE
:compileScala UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:scalaConsole
Error: Could not find or load main class scala.tools.nsc.MainGenericRunner
:scalaConsole FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:scalaConsole’.
Process ‘command ‘/usr/lib/jvm/java-7-openjdk-amd64/bin/java’’ finished with non-zero exit value 1
Seems to me that if you are going to have this code released, at least don’t expose / provide tasks to the user that are indeed broken or won’t ever work.
You’re right. We should remove this experimental, untested task.
The reason it fails in this way with the samples is a missing dependency. Adding this dependency to samples/scala/quickstart/build.gradle will at least get the scala console to run:
Not sure if this question deserved a snarky response , but perhaps this dependency should get added to the samples’ build.gradle file instead of relying on newbies to read your minds when the tool doesn’t work as it should for things as basic as sample programs.
Hey Jimi. I think you misread my response. I really do think that we should remove the scalaConsole task, since it doesn’t have any automated test coverage or documentation and it wasn’t ever finished properly.
Please pardon my testiness as I was in a bad mood from something else. Your answer was just perfect and it solved my problem. Is there a community involvement part of this project that would allow these kinds of features to live on ? Is it like Github projects where people can submit pull requests ?
I’m taking a look at this issue right now in source. I’ve found where the task is added and have removed it from the source. I’m in the process of testing it. Once it’s tested, I was going to push it up to my Github. Is there a JIRA task for this issue?