Victor Basso
Victor Basso

Reputation: 5796

How to prevent sbt from creating source/resource directories in parent project

I'm setting up a project with two modules, following this. I only want the source/resources directory structure in the modules, not in the parent project. How can I achieve that in build.sbt?

Upvotes: 1

Views: 281

Answers (2)

Victor Basso
Victor Basso

Reputation: 5796

It was actually IntelliJ IDEA creating the folders when clicking "refresh" in the SBT tab. Check this other question.

Upvotes: 1

marios
marios

Reputation: 8996

sbt will not create source/resources directories in the root folder. It will create a target/project directories, through.

Just make sure that your projects are in different folders.

That is, the source for core should be under the "core" directory:

lazy val core = (project in file("core")).
  settings(commonSettings: _*).
  settings(
    // other settings
  )

Your directory structure should be similar to this example.

Upvotes: 1

Related Questions