Installation settings for SBT

Source: Internet
Author: User
Tags sonatype

Article reproduced from http://my.oschina.net/u/915967/blog/146746

This article is primarily a Windows platform installation, and the Linux environment operates similarly.

First go to http://www.scala-sbt.org/release/docs/Getting-Started/Setup.html to download the SBT package for Windows, zip,tar.gz is OK.

Extract the downloaded package to the directory you specified, I usually extract to the D:\DEV\SBT directory, D:\dev is used in the daily work of the development tool software, such as Eclipse, JDK, maven and so on.

After extracting the SBT package from Windows, I have already brought the Sbt.bat script, which is a lot of convenience! See Sbt.bat set (set Fn=%sbt_home%sbtconfig.txt) related is read from a configuration file, so in sbt\ Bin directory to create the Sbtconfig.txt file, so the configuration is written in this file, not directly change the Sbt.bat, for later upgrade backup is very convenient.

My configuration file is as follows:

1 -dfile.encoding = utf 8 -dsbt.boot.directory = e : /sbt/boot/-dsbt.ivy.home = e : /sbt/-xmx 1536 M-XSS 1 m-xx : +cmsclassunloadingenabled-xx : maxpermsize = 256 m

A few of the key parameters are that these 2 parameters have made many people miserable ....

1 -Dsbt.boot.directory=e:/sbt/boot/
1 -Dsbt.ivy.home=e:/sbt/

Because the SBT download jar package will be placed by default in the user directory, but these are placed in the C-disk user directory is not good attention, such as you re-install the system and so on, then next time you have to wait ah wait ah download long jar, is not very painful? If you put it on the C-drive, you avoid the pain of repeating the download.

Once set, you need to add the Sbt\bin to the PATH environment variable so that it can be used anywhere in CMD. Now you can open the cmd window and use SBT.

1 sbt

This will start to download the relevant jar package, while observing you set the Sbt.boot.directory and Sbt.ivy.home under the change? If not please check if Setup is successful!

If you feel that the download is slow and there are faster warehouses, such as a single, you can create the. SBT directory in the user directory and put a repositories file with the following:

123456 [repositories]  local  aliyun nexus:http://xxxx/nexus/content/groups/public/  typesafe-ivy-releases: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]  maven-central  sonatype-snapshots: https://oss.sonatype.org/content/repositories/snapshots

The first one is the local repository, the second one is set up for you, the next 2 are the SBT settings, and you can unpack the Sbt.jar package for a detailed view.

The next only wait, wait .... After the success you can start the SBT trip!!!

Enjoy the fun!!

Installation settings for SBT

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.