mpeltonen / sbt-idea

A simple-build-tool (sbt) plugin/processor for creating IntelliJ IDEA project files
Other
1.07k stars 153 forks source link

Multi-project "test" dependency listed as "compile" dependency in IntelliJ #309

Closed urbas closed 10 years ago

urbas commented 10 years ago

I have the following project structure:

lazy val root = project.in(file(".")).aggregate(util, utilTest)

lazy val util = project.in(file("Util")).dependsOn(utilTest % "test->compile")

lazy val utilTest = project.in(file("utilTest"))

When using gen-idea the following project structure is produced (see attached screenshot):

genideatestdependency

Problem:

Notice that the utilTest dependency appears as a compile dependency.

Expected behaviour:

The utilTest dependency should appear as a test dependency.

urbas commented 10 years ago

It works if instead of test->compile you write test. For example:

lazy val util = project.in(file("util")).dependsOn(utilTest % "test")

This is good enough for me, so I'll close the issue.

Btw, there's already a test in src/sbt-test/sbt-idea/project-dependency that tests this.