Tuesday, 17 September 2013

Any way not to confuse sbt-eclipse if I just want everything in the top-level folder? (2.2.0 with 0.12.4)

Any way not to confuse sbt-eclipse if I just want everything in the
top-level folder? (2.2.0 with 0.12.4)

I'm a high school teacher, and I'm using Scala to teach my Intro to
Programming class. It's a little scary, but I'm excited.
However, since these are beginners, I want to give them as simple a
project structure as possible. In the beginning, everything will just be
at the top level, and at the very beginning, everything will probably be
in one .scala file.
Unfortunately, I can't figure out how to convince Eclipse that I don't
want src/main/scala, src/test/scala, etc. and not get errors. Here's my
best crack at build.sbt so far:
scalaSource in Compile <<= baseDirectory
scalaSource in Test <<= baseDirectory
resourceDirectory <<= baseDirectory
unmanagedSourceDirectories in Compile <<= Seq(scalaSource in Compile).join
unmanagedSourceDirectories in Test <<= Seq(scalaSource in Test).join
Unfortunately, when I run eclipse and refresh, Eclipse complains that
there are duplicate entries in the build path and that it can't link to
the base directory--which it represents as the absolute path to the
project directory, but with hyphens substituted for slashes.
I can fix up the Eclipse project manually, but it'd be great if I could
figure out how not to have to do that.

No comments:

Post a Comment