我正在使用scala和maven测试java代码。在Eclipse中,maven-scala-plugin返回一个pom文件错误。下面是我的pom代码片段:
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.15.2</version>
<executions>
<execution>
<id>scala-test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>这是错误:
Plugin execution not covered by lifecycle configuration: org.scala-tools:maven-scala-plugin:2.15.2:testCompile
(execution: scala-test-compile, phase: test-compile)pom配置正确了吗?
scala测试运行正常,因为它们都通过了测试。也许这是一个Maven的bug?
当我查看项目的maven属性时,生命周期映射不可用:

发布于 2012-11-16 20:56:52
不,这不是Maven的bug。This page描述了显示消息的原因以及如何处理该消息。
在按下Ctrl+1来解决这个问题之后,Eclipse应该会建议两个快速修复方法:
pom.xml中添加一些代码,这意味着目标不会在Eclipse中的构建上运行,只能从命令行运行。您还可以将添加部分中的<ignore>替换为<execute>,以便在Eclipse中运行该目标。发布于 2013-07-31 02:58:44
您应该从这个更新站点安装m2eclipse-connector:http://alchim31.free.fr/m2e-scala/update-site
请查看此文档:
http://scala-ide.org/docs/tutorials/m2eclipse/index.html
发布于 2015-10-24 15:49:25
在eclipse中安装m2e插件(Maven Integration for Scala IDE)后,它工作得很好。
https://stackoverflow.com/questions/13416264
复制相似问题