java - Sbt script and different resources and source directories -


i making build.sbt script java project. project not follow standard structure (as src/main/java) need point sbt script correct 1 (as have made gradle script in have changed both source , resources directories). structure of project is:

src   packagename     main.java   resources test 

i have search lot don't find anything, documentation build java project sbt not make example. finally, cannot change structure of project.

that actual sbt script:

organization := "something"  name := "name"  version := "1.0-snapshot" 

it returns

java.lang.runtimeexception: no main class detected. 

i have found solution:

unmanagedsourcedirectories in compile += basedirectory.value / "src"  resourcedirectory in compile := basedirectory.value / "src" 

adding these 2 lines makes flow of compilation work. (more details on: http://www.scala-sbt.org/0.13/docs/howto-customizing-paths.html)


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -