我正在尝试将 java+Scala 项目导入 Eclipse(v4.6.1 Neon)。这包括一个带有 scala-maven 插件的父项目,配置如下:
<pluginManagement>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>scala-compile-first</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
导入项目时显示错误:
在 Eclipse 中找不到处理 scala-maven-plugin:3.2.1:add-source 的市场条目。有关详细信息,请参阅帮助。
导入到 eclipse 时,在 eclipse 中没有为 scala 创建源文件夹(如 java src/main/java 和 src/main/resources)。同样在子项目中,它显示此错误。
生命周期配置未涵盖插件执行:net.alchim31.maven:scala-maven-plugin:3.2.2:add-source (execution: scala-compile-first, phase: process-resources)。
虽然我能够从命令行构建项目。
我也尝试为 Eclipse 安装 Scala IDE 插件,但没有任何效果。我不想将此目标标记为被忽略。