概述
使用maven下载IDEA的 maven-scala-plugin 时报如下4个错误:
Cannot resolve plugin org.scala-tools:maven-scala-plugin:
Could not find artifact org.scala-lang:scala-compiler:pom:2.11.12 in scala-tools.org (http://scala-tools.org/repo-releases)
Could not find artifact org.scala-tools:maven-scala-plugin:jar: in scala-tools.org (http://scala-tools.org/repo-releases)
Failure to find org.scala-lang:scala-library:pom:2.11.12 in http://scala-tools.org/repo-releases was cached in the local repository, resolution will not be reattempted until the update interval of scala-tools.org has elapsed or updates are forced
解决方法如下:
首先:IDEA插件自动生成的pom文件中scala的版本是2.7,这里需要修改成与本地scala一致的版本号,我的是2.11.12
然后将在pom文件中添加如下依赖:
<dependency>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.11</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.5.1</version>
</dependency>
最后:在pom文件中右键 Maven–>Reimport ;
如果还失败;IDEA右侧Maven框下:项目 --> Plugins --> clean --> clean:clean ;然后再Reimport。
最后
以上就是呆萌蜻蜓为你收集整理的Cannot resolve plugin org.scala-toolsmaven-scala-plugin unknown的全部内容,希望文章能够帮你解决Cannot resolve plugin org.scala-toolsmaven-scala-plugin unknown所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复