Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play framework - java.lang.RuntimeException: No main class detected

I am new to play framework and trying to run securesocial as in https://github.com/jaliss/securesocial Using Play 2.3, Scala 2.10.0

.sbt file is configured as

name := "SecureSocial-parent"

version := Common.version

scalaVersion := Common.scalaVersion

lazy val core =  project.in( file("module-code") ).enablePlugins(PlayScala)

lazy val scalaDemo = project.in( file("samples/scala/demo") ).enablePlugins(PlayScala).dependsOn(core)

lazy val javaDemo = project.in( file("samples/java/demo") ).enablePlugins(PlayJava).dependsOn(core)

lazy val root = project.in( file(".") ).aggregate(core, scalaDemo, javaDemo) .settings(
     aggregate in update := false
   )

But getting below error

~\securesocial-master>activator run
[info] Loading project definition from ~\securesocial-master\project
[info] Set current project to SecureSocial-parent (in build file:~/securesocial-master/)
java.lang.RuntimeException: No main class detected.
        at scala.sys.package$.error(package.scala:27)
[trace] Stack trace suppressed: run last securesocial-master/compile:run for the full output.
[error] (securesocial-master/compile:run) No main class detected.

The project compiled successfully with many warnings on deprecated API Any pointer will be useful on how to resolve the no main class error

like image 248
ad-inf Avatar asked Jul 10 '14 19:07

ad-inf


1 Answers

As far as I understand it, SecureSocial-parent is just the library - it can be compiled, but cannot be run per se. You can only run the demo projects. For example, if you start activator in the securesocial directory, you can type

project javaDemo

to switch to the Java demo project and then

~run

to run it.

like image 78
vektor Avatar answered Oct 09 '22 06:10

vektor