Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8298493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:47:58+00:00 2026-06-08T15:47:58+00:00

I have the following setup of a Scala application and a common core library:

  • 0

I have the following setup of a Scala application and a common core library:
root

 -> /ApplicationA
   -> /project
     -> /build.sbt
 -> /CoreLibrary
   -> /project
     -> /build.sbt

I want to add a reference from ApplicationA to CoreLibrary à la Eclipse project reference, so that every time CoreLibrary changes ApplicationA is built as well. I´ve tried the following contents of build.Scala for ApplicationA:

  val core = Project(
      id = "platform-core",
      base = file("../CoreLibrary"))

  val main = Project(id = "application, base = file(".")).dependsOn(core)

However, when compiling ApplicationA SBT complains that a dependency can only be a subdirectory!!:

java.lang.AssertionError: assertion failed: Directory C:\git\CoreLibrary is not contained in build root C:\git\ApplicationA

This seems completely straightforward, what’s the correct way of having this project dependency?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:48:01+00:00Added an answer on June 8, 2026 at 3:48 pm

    You can do a source dependency on your project like that :

     lazy val core = RootProject(file("../CoreLibrary"))
    
     val main = Project(id = "application", base = file(".")).dependsOn(core) 
    

    I have a working example with a multimodule play build : https://github.com/ahoy-jon/play2MultiModule/blob/master/playapp/project/Build.scala

    But I think the proper way (it depends of your context) of doing it is to create a

     -> /project/
       -> Build.scala
     -> /ApplicationA
       -> /project
         -> /build.sbt
     -> /CoreLibrary
       -> /project
         -> /build.sbt
    

    referencing the two projects and the dependencies between them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following setup in cloud9 IDE. Project root folder Hello.html - contains simple
I have following models setup in my Django application class School(models.Model): name = models.TextField()
I have the following setup: eclipse a standard Java project (A) an eclipse plugin
I have following setup. index.php require_once common.php; ... common.php ... $obj = new MyClass;
I have the following Scala code to setup a Jetty server with Scalatra. val
I have the following setup: Project A Project B depends on A Each project
I have the following setup. I want to check that commits have a certain
I have the following setup in my application and I'm having some difficulties passing
I have the following setup: wicket: 6.1.0 wicket-atmosphere: 0.4 (via Maven) On Application.init() I
I have following setup, but when I put 1024 and replace all 512 with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.