经过如下连接下载Scala IDE:
http://scala-ide.org/download/sdk.htmlhtml
根据本身的平台选择本身相应版本下载。下载完成以后解压,以下:
apache
选择eclipse.exe启动便可。eclipse
原生的Maven插件在Eclipse中,不能应用到scala项目。所以须要额外下载一个针对scala的eclipse maven插件。经过如下更新站点安装该插件:
http://alchim31.free.fr/m2e-scala/update-sitemaven
按照常规方法安装便可。ide
为了方便地建立Scala Maven项目,咱们在Eclipse配置远程的Maven Archetype,ArcheType至关于项目模板。在Preference页面中选择Maven->Archetypes:
spa
点击 Add Remote Catelog,在弹出框的catlog file输入:插件
http://repo1.maven.org/maven2/archetype-catalog.xmlscala
OK,完成。xml
Eclipse中选择New->Maven Project,在ArcheType的选择页面中,选择以下:
htm
刚进入该页面时,因为须要远程加载ArcheType,因此可能须要一点时间才能加载出来,在进度提示中能够看到正在加载catelog。
日后就是常规的maven建立,完成以后,由于要到远程Maven仓库加载不少jar包,因此可能会耗费一点时间:
最后项目结构以下:
运行App.scala:
End.
Ps: 在第3步 【设置远程Archetype】,设置成远程了以后,发现每次建立maven项目都要加载很长时间,后来又看了
http://maven.apache.org/archetype/maven-archetype-plugin/specification/archetype-catalog.html
的相关介绍:
能够本身设置本地的Archetype,把http://repo.maven.apache.org/maven2/archetype-catalog.xml下载到本地,以下:
这样以来,每次加载就会很快