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

  • Home
  • SEARCH
  • 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 8310735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:34:10+00:00 2026-06-08T19:34:10+00:00

Before I had something like this (simplified), using sbt 0.11.3: // project/Build.scala import sbt._

  • 0

Before I had something like this (simplified), using sbt 0.11.3:

// project/Build.scala
import sbt._
import Keys._

object MyBuild extends Build {
   lazy val standardSettings = Defaults.defaultSettings ++ Seq(
      version      := "0.2",
      scalaVersion := "2.9.2"
   )

   lazy val main = Project(
      id        = "main",
      base      = file( "." ),
      settings  = standardSettings,
      aggregate = Seq( sub )
   )

   lazy val sub = Project(
      id        = "main-sub",
      base      = file( "sub" ),
      settings  = standardSettings
   )
}

But I want to keep as much information as possible in the plain build.sbt file. So now I have

// build.sbt
version      := "0.2"

scalaVersion := "2.9.2"

And

// project/Build.scala
import sbt._
import Keys._

object MyBuild extends Build {
   lazy val main = Project(
      id        = "main",
      base      = file( "." ),
      aggregate = Seq( sub )
   )

   lazy val sub = Project(
      id        = "main-sub",
      base      = file( "sub" )
   )
}

But that doesn’t seem to mix in my settings from build.sbt into the sub projects:

> show version
[info] main-sub/*:version
[info]  0.1-SNAPSHOT
[info] main/*:version
[info]  0.2
> show scala-version
[info] main-sub/*:scala-version
[info]  2.9.1
[info] main/*:scala-version
[info]  2.9.2

How to remedy this? I also tried to add explicit settings to the sub-project, e.g.

  • settings = Defaults.defaultSettings
  • settings = Project.defaultSettings
  • settings = MyBuild.settings
  • settings = main.settings (sure this one should do?!)

…but none worked.

  • 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-08T19:34:12+00:00Added an answer on June 8, 2026 at 7:34 pm

    The information is a bit hidden in the last section of sbt’s Multi Projects documentation:

    When having a single .scala file setting up the different projects, it’s easy to use reuse settings across different projects. But even when using different build.sbt files, it’s still easy to share settings across all projects from the main build, by using the ThisBuild scope to make a setting apply globally.

    Thus:

    // build.sbt
    version in ThisBuild := "0.2"
    
    scalaVersion in ThisBuild := "2.9.2"
    

    Wow, that sucks big time if you have two dozen keys.

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

Sidebar

Related Questions

How I can delete an object which I had added before with this code.
Until recently, I posted Python code (whitespace matters) to blogspot.com using something like this:
This is a suggested re-up on a question I had before. Its really and
Ok I have this problem that I've never had before, it's really bugging me.
It is looking increasingly like I'll have to go live before I have had
I had this problem before and can't for life of me remember how to
I had a similar question before, but this is a few steps beyond that
I had never had this error before, and I didn't move any file, or
Strangely I had this working before but I reinstalled my system, upgraded to w7
In rails I could do something like this to make sure a user is

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.