Gradle fails to run command line application that is using 'scala' plugin and 'application' plugin


(claytonwohl) #1

Environment: Windows 7 x64, Java 7, Scala 2.9.2, Gradle 1.0 RC3

when I do “gradle run”, I get an error that it can’t find my main class. This doesn’t make sense. The source file Main.scala successfully compiles into Main.class. I am sure that exact package/class name is correct, exists, and is compiling. I can run this exact same app with the exact same main class from within Eclipse + Scala-IDE. I don’t understand this error.

:compileJava UP-TO-DATE
:compileScala
:processResources UP-TO-DATE
:classes
:run
Error: Could not find or load main class org.benchmarks.main.Main
  FAILURE: Build failed with an exception.
  * What went wrong:
Execution failed for task ':run'.
> Command 'C:\Program Files\Java\jdk1.7.0_04\bin\java.exe' finished with (non-zero) exit value 1.

(Peter Niederwieser) #2

Please provide a reproducible example. You can also try to get more information with ‘-s’ and ‘-d’.


(claytonwohl) #3

The issue is sporadic and seems to come and go for a reason I can’t identify. When I get it fully nailed down and reproduced, I will post more.


(claytonwohl) #4

The issue is sporadic and seems to come and go for a reason I can’t identify. When I get it fully nailed down and reproduced, I will post more.