sbt cannot resolve ensime-sbt-cmd in a Play2-Scala project

南楼画角 提交于 2019-12-24 16:34:16

问题


I'm trying to configure Sublime Text 2 to better support working with Scala and Play! 2 Framework by following instructions from http://engineering.panaxiom.co.uk/post/34631917299/sublime-text-2-with-sbt-and-play-2. (I made just one change: I updated the plugin version to 0.1.1.)

I was able to almost complete the steps given in the tutorial but the second one always fails (generate ensime config file) simply because sbt is unable to resolve ensime-sbt-cmd plugin (when I enter a project directory and execute play command). I'm not able to find the cause of the problem but sbt gives me an error like:

[error] Server access Error: connect: Address is invalid on local machine, or port is
not valid on remote machine url=http://repo1.maven.org/maven2/org/ensime/
ensime-sbt-cmd_2.9.2_012/0.1.1/ensime-sbt-cmd-0.1.1.pom

(The command output shows other urls to: scalasbt.artifactoryonline.com and repo.typesafe.com, but the maven repo url exists). After that, some warnings are displayed, again with urls of repositories.

sbt is able to resolve all other plugins or dependencies that the project has (I just finished create the project, so there are no other extra plugins or dependencies except from ensime-sbt-cmd).

I tried to change scalaVersion (on project_dir/build.sbt) but it make no difference. sbt version is 0.12, scala version is 2.9.2.

Someone knows what I can do to solve this problem? Is it possible to be something related to Java 7 on Windows 8 64 bits machine and Kaspersky Internet Security 2013? With this combination of softwares I was unable to launch Eclipse Marketplace and Netbeans plugins updates until I configured KIV exclusion rules with Java commands (java.exe, javaw.exe, javaws.exe).

Thanks and sorry because of the long text.


回答1:


Make sure that your project/build.sbt file contains

sbt.version=0.12.4

According to your error message, your sbt version has been set to "012" not "0.12"



来源:https://stackoverflow.com/questions/16226714/sbt-cannot-resolve-ensime-sbt-cmd-in-a-play2-scala-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!