eclipse - maven-scala-plugin 给出 pom 文件错误

标签 eclipse scala maven maven-plugin m2eclipse

我正在使用 scala 和 maven 测试 java 代码。 maven-scala-plugin 在 Eclipse 中返回 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 错误?

当我查看项目的 Maven 属性时,生命周期映射不可用: enter image description here

最佳答案

您应该从此更新站点安装 m2eclipse-connector:http://alchim31.free.fr/m2e-scala/update-site

检查此文档:

http://scala-ide.org/docs/tutorials/m2eclipse/index.html

关于eclipse - maven-scala-plugin 给出 pom 文件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13416264/

相关文章:

Eclipse:如何设置项目的main方法?

scala - 重置 SBT 中的列表设置

javascript - "with"从 Scala 中的 JavaScript 构造

maven - Maven 会覆盖本地 Maven 存储库中手动修补的 jar 吗?

spring-boot - 当我设置 spring.active.profile 时,Spring Boot 不读取 Application.yml 文件

java - Spring Boot 属性文件外部化

java - Tomcat7服务器错误,目录中不存在文件或不是可读目录

eclipse - 由于缺少必需的项目,插件安装失败

android - 这个 Eclipse 图标是什么意思?

scala - 如何在 sbt 中将 baseDirectory 转换为字符串?