I have a scala file located at src/main/scala/my.cool.package.name/MyTestClass
that has an import for scala.reflect.runtime.universe._
. Maven resolves this dependency fine, and the code compiles. The import is heavily used throughout the code, so I know the dependency actually exists and Maven is using it.
The project-name.iml
file that IDEA generates has the reference to scala-reflect
, but it's putting it in the TEST scope:
<orderEntry type="library" scope="TEST" name="Maven: org.scala-lang:scala-reflect:2.11.8" level="project" />
Because it's in TEST, and the source file isn't, the source file generates tons of warnings & errors in IDEA. If I manually remove scope="TEST"
from that line, IDEA resolves the dependency perfectly fine. The problem is that this file is auto-generated, so this change gets removed pretty often.
So, what is causing scala-reflect
to be brought in as TEST? I'm not explicitly referencing reflect
anywhere in my pom.xml
file, so if it's come from Maven, I'm not sure how. Is there a way to force that line to be generated the way I want?