0

I am facing an issue with SBT managed sources.

I want to import some automatically generated classes (like BuildInfo.scala) from src_managed to my Build.scala SBT file.

Although all classes will be generated successfully, I can not import them in Build.scala (class not found).

All my build classes are located in project folder.

How can I configure my build in order to get access to generated classes from SBT build file?

EDIT

My BuildInfo.scala is located in {root}/project/src_managed/sbt-buildinfo/. What I am trying to do is to import this class in a Build.scala class located in {root}/project/. But I get a compile error: project/Build.scala:8: object BuildInfo is not a member of package *******

codejitsu
  • 3,162
  • 2
  • 24
  • 38
  • It sounds like those files are actually part of your build definition, in which case they should be in `project/src_managed`, not your root `src_managed`? – Seth Tisue Nov 11 '15 at 13:11
  • @SethTisue you are right, I've changed the src_managed dir, but I still get the compile error (please see my edit). – codejitsu Nov 11 '15 at 13:27
  • Hmm... if I switch to my build definition project with `reload plugins` then type `show sourceManaged` I see `/Users/tisue/tmp/project/target/scala-2.10/sbt-0.13/src_managed`, so it looks like that's where it expects the sources to be? – Seth Tisue Nov 11 '15 at 14:56

0 Answers0