Ubuntu Installation Configuration SBT

Source: Internet
Author: User
Tags sonatype aliyun

Environment: Ubuntu 16.04 lts SBT 0.13.15

sbt-0.13.x Download

Website address: http://www.scala-sbt.org/download.html
Baidu Network disk: Link: https://pan.baidu.com/s/1o886Uls Password: Kqh7

Unzip the compressed package to the/usr/local/directory  

TAR-ZXVF sbt-0.13.15.tgz-c/USR/LOCAL/SBT

Creating SBT files in the/usr/local/sbt/directory 

Cd/usr/local/sbt
Vim SBT

Copy the following to the SBT file
 

#!/bin/bash
bt_opts= "-xms512m-xmx1536m-xss1m-xx:+cmsclassunloadingenabled-xx:maxpermsize=256m"
Java $ Sbt_opts-jar/usr/local/sbt/bin/sbt-launch.jar "$@"

Note whether the Sbt-launch.jar directory is correct

Modify permissions for SBT files 

chmod u+x SBT

Configuring SBT Environment variables 

Vim/etc/profile

Add the following:
 

Export Path=/usr/local/sbt/bin: $PATH

And then run:
 

Source/etc/profile

Make a file take effect

Modify the Sbtconfig.txt file under the SBT path

Vim/usr/local/sbt/conf/sbtconfig.txt

Add the following:

-dsbt.global.base=/home/rose/.sbt
-dsbt.boot.directory=/home/rose/.sbt/boot/
-dsbt.ivy.home=/home/rose/.ivy2

Check if SBT is installed successfully 

SBT Sbt-version

The console prints the following

[Root@host sbt]# SBT sbt-version Java HotSpot (TM) 64-bit Server VM
warning:ignoring option maxpermsize=1024m; Support was removed in 8.0
Warn:no sbt.version set in Project/build.properties, base
Directory:/ROOT/SCALA/SBT
[Warn] Executing in batch mode.
[Warn] For better performance, hit [ENTER] to switch to interactive mode, or
[Warn] Consider launching SBT without any commands, or explicitlypassing ' shell '
[INFO] Set current project to SBT (in Build file:/root/scala/sbt/)
[INFO] 0.13.15

Installation Successful

Configuring the Maven repository for Aliyun

Create a repositories file under ~/.sbt/

CD ~/.SBT
Vim repositories

Add the following content
  

[repositories]
Local
Osc:http://maven.aliyun.com/nexus/content/groups/public
typesafe:http://r epo.typesafe.com/typesafe/ivy-releases/,[organization]/[module]/(scala_[scalaversion]/) (sbt_[sbtVersion]/) [ Revision]/[type]s/artifact. [Ext],bootonly
sonatype-oss-releases
maven-central
Sonatype-oss-snapshots

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.