score:1
Your project setup allows you to access EntityRepository
trait which is in domain
subproject from anywhere in infra
subproject because infra
depends on domain
. All you need to do is to reference EntityRepository
by its full name or import the package where it resides (import com.example.EntityRepository
).
If you use IntelliJ you can generate projects for it from sbt using sbt-idea
plugin. The same goes for Eclipse with sbteclipse-plugin
. This way your generated IDE projects would have proper references to each other and will help you find your classes.
Although you have the same package in two different SBT subprojects it's not a problem. This should not cause any compilation problems.
To eliminate problems that could be caused by IDE a good test is to compile with SBT. Shutdown running sbt, start it over again and run ;clean; compile; test
in SBT console. If everything compiles fine (or even if it does not) regenerate your IntelliJ projects with gen-idea
from SBT console. For all SBT commands in your case you should be in root
project which I suppose is default location when you start SBT.
Source: stackoverflow.com
Related Query
- Extend trait from another module
- sbt multimodule project importing trait from another module
- Extend case class from another case class
- How to import classes from another module in Intellij
- Can companion object extend some trait different from companion class?
- Import trait from another file
- Accessing Scala private classes from another module
- How to extend class defined in one scala file from another scala file
- Use implicit value from one module in another in Scala/Spark
- How to force right resource file to be used when calling from another module
- Why can a Scala trait extend a class?
- How to reference external sbt project from another sbt project?
- How do I easily convert from one collection type to another during a filter, map, flatMap in Scala?
- How can I call another task from my SBT task?
- Why does Option not extend the Iterable trait directly?
- Scala: Yielding from one type of collection to another
- In Scala, how to check if a Map contains all entries from another Map?
- Scala implicit conversion from parent trait
- Why classes that don't extends other classes must extend from traits? (with doesn't work)
- How is an sbt task defined using <<= different from one defined with := that references another setting's .value?
- In scala is it possible for a trait to extend a class which needs parameters?
- Guice and Play2 Singleton from trait
- Scala traits and structural types: can a trait extend a structural type and then call super?
- Dynamic trait difference from Scala 2.9 to 2.10
- add column from one dataframe to another dataframe in scala
- How to call a step from another step in Cucumber-JVM
- Reference a constructor argument from a trait
- How to initialize the value from trait in subtype?
- Scala, Extend object with a generic trait
- Copy schema from one dataframe to another dataframe
More Query from same tag
- What is the difference between ArrayBuffer and Array
- Transform F[A] to Future[A]
- Concurrent for-comprehensions
- How is Scala Case Class different from immutable map
- Can you convert an array of Bytes to an array of Strings and then back to an array of Bytes?
- Spring Ehcache : Delete entries by a condition like endDate > now
- IntelliJ Scala maven build jar not generating class files
- Reading Encoded value in spark 1.6 throwing Error
- Scala mode indentation in Emacs
- collectFirst with match clause in partial function
- Generating a list of random Integers in Java (in a Scala-like fashion)
- Passing Functions to Spark: What is the risk of referencing the whole object?
- How to do Sliding Window Rank in Spark using Scala?
- Make notification in playframework
- Scala adding immutable list to mutable one
- How do you send data from Kafka streams to clients via Websockets in PlayFramework?
- Can I return Map collection in Scala using for-yield syntax?
- Find greatest common subtype of two Scala types
- Processing upserts on a large number of partitions is not fast enough
- Scala: upper bound [T <: AnyRef] does not allow to return [AnyRef]
- Dropping a nested column from Spark DataFrame
- liftweb: getting model field
- Where to place Scala Lenses in my project?
- Have a List in Play framework web service parameters
- How do I define mappers in Scala for a Cassandra sink in Flink?
- serving hierarchical static content with spray
- Refreshing SBT project in Intellij Idea switches Java to 7
- Dump array of map column of a spark dataframe into csv file
- Scala Breeze implicit CanMapValues
- What is a Singleton Type exactly?