The near-development Spark Project uses the Scala language, which shows how to use SBT to compile projects on idea.
Development environment: Windows
1. Download SBT
Http://www.scala-sbt.org/download.html
I am using a zip package, download and unzip to the D:\tool\ directory
2. Add a configuration
2.1 Open D:\tool\sbt\conf\sbtconfig.txt, add the following lines of configuration at the end, note the specified directories and files
-dsbt.ivy.home=d:/tool/sbt/. IVY2-DSBT. global.base=d:/tool/sbt/. SBT-DSBT. repository.config=d:/tool/sbt/conf/repo.properties
The first line sbt.ivy.home specifies the local custom repository path (if not set to the default User directory C:\Users\Administrator\.ivy2)
2.2 Create a new repo.properties file in the d:/tool/sbt/conf/directory, fill in the following, specify the address of the mirror station:
[repositories] local comp-maven:http://repo.data.1verge. NET/nexus/content/groups/public/ store_cn:http://maven.oschina. NET/content/groups/public/ store_mir:http://mirrors.ibiblio.org/maven2/ store_0: http://maven. net. cn/content/groups/public/ store_1:http://repo.typesafe.com/typesafe/ ivy-releases/ store_2:http://repo2.maven.org/maven2/
2.3 Adding D:\sbt\tool\bin to the environment variable path
Set in 3.Idea
3.1 Make sure the Scala plugin is properly installed in idea
3.2 Settings in default settings, other settings, file--
VM Parameters:
-xx: MaxPermSize=512m-dsbt. Log. format=true-dsbt. global.base=d:/tool/sbt/. SBT-DSBT. ivy.home=d:/tool/sbt/. IVY2-DSBT. boot. directory=d:/tool/.sbt/boot/-DSBT. repository.config=d:/tool/sbt/conf/ Repo.properties
To the end of this configuration.
Configure SBT on Idea (window environment)