sbt-intellij and generated code


I'm using scalaxb to generate some code from xsd/wsdl. This is put in target/scala-2.10/source_managed. I'm using the new sbt-plugin to import sbt-projects in IntelliJ Idea: The problem I have is that the generated code is not recognized and therefore I get compile errors in the IDE only.

In my build.sbt I added this to fix it for sbt-eclipse:

EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.Source, EclipseCreateSrc.Resource, EclipseCreateSrc.Unmanaged, EclipseCreateSrc.Managed)

Is there anything I can do to add the source_managed directory to sources in Idea? I'm kindof new to this IDE :)



Just realized that I don't understand what's going on. Isn't the build supposed to be external? I mean, that folder in target is of course part of sources in Compile in the sbt build - it builds cmd line. Does Idea provide sbt with other settings when running make?

Anyway, I found the way to add it as a source folder in the project structure and now it builds. Would be nicer if the plugin automatically took all the source folders from the sbt build definition though.



We've fixed that. The next nightly build should correctly import managed source (and resource) directories.


Please sign in to leave a comment.