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 3614370
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:14:25+00:00 2026-05-18T22:14:25+00:00

I know if I add withSources when I define one dependency, sbt can download

  • 0

I know if I add withSources when I define one dependency, sbt can download that sources jar file automatically.
For example,

val specs = “org.scala-tools.testing” % “specs_2.8.1” % “1.6.6” % “test” withSources ()

But for the scala-library.jar and scala-compiler.jar, I don’t need define them explicitly, how can I get sbt download their sources for me? So, I don’t need config it manually after generate idea project using sbt-idea-plugin.

  • 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-05-18T22:14:26+00:00Added an answer on May 18, 2026 at 10:14 pm

    You have to change the boot properties. There is a nice description in the recent blog decodified from Mathias:
    “How to make SBT download scala library sources” (started from @hseeberger key starting points)


    Here is the relevant part (in case that link ever goes stale)

    First, forget about trying to find some “hidden” setting in your SBT project definition enabling Scala library source download! It does not exist (at least not in SBT version 0.7.x).
    Rather, there are these two things you need to do in order to whip SBT into submission:

    1. Create an alternative configuration file for your SBT launcher.
    2. Make the SBT launcher use it.

    These are the steps in detail:

    • Find your sbt-launcher-0.7.x.jar file.
      Since I’m on OS/X and use SBT via Homebrew mine lives at /usr/local/Cellar/sbt/0.7.5.RC0/libexec/sbt-launch-0.7.5.RC0.jar.
    • Extract the sbt.boot.properties from the sbt sub directory in the launcher jar
    • Fire up your favorite editor and change line 3 to classifiers: sources (uncomment the line)
    • Find the sbt script file you created during your SBT setup (e.g. ~/bin/sbt, or, when using Homebrew, /usr/local/Cellar/sbt/0.7.x/bin/sbt)
    • Add the path to your tweaked sbt.boot.properties file, prepended with an ’@’ character and in double quotes, as the second-to-last argument of the java call.

    This is what my sbt script file looks like:

    #!/bin/sh
    java -Xmx768M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m \
         -jar /usr/local/Cellar/sbt/0.7.5.RC0/libexec/sbt-launch-0.7.5.RC0.jar \
         "@/usr/local/Cellar/sbt/0.7.5.RC0/libexec/sbt.boot.properties" \
         "$@"
    

    Once you have completed these steps SBT should happily download the scala-...-sources.jar files for the Scala compiler and standard library for any new project you create.
    To have SBT do this for an existing project, you have to manually delete the project/boot/scala-{version} directory before performing an ‘sbt update’ (SBT does not fetch additional source artifacts if the main jar is already present).

    Once you have a custom sbt.boot.properties file, there are also other ways to supply it to the SBT launcher.

    See SO question “how do I get sbt to use a local maven proxy repository (Nexus)?“

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

Sidebar

Related Questions

I know I can add a icon to the Resources.resx file of a project
I know one can add event listener for window.error. However when working with Iframes,
I know I can add service behaviors with some XML configuration, but I'd like
Does anyone know how to add full (n.n.n.n) Windows file version information to COM
* Edit * I didn't know about 'Add Dynamic Property' feature of Idea, that
Anyone know an add-in or something that could give me the number of time
I know you can add parameters , but how do you clear the parameters?
We know that to add a subdomain for localhost, we open and edit the
I know you can add custom keymappings to vim with imap in the .vimrc
Does anybody know of an add-on for Wordpress, Joomla or any CMS that will

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.