Scala Eclipse中的Maven Pom错误 [英] Maven pom error in eclipse with Scala
问题描述
我正在导入一个项目,该项目可以通过"mvn clean install"和旧的Eclipse开普勒构建并正常运行.我现在正在导入该项目以使Luna/Mars黯然失色,并出现以下错误:
I am importing a project which works and built fine through "mvn clean install" and old eclipse Kepler. I am now importing the project to eclipse Luna/Mars, and got the following errors:
Plugin execution not covered by lifecycle configuration: net.alchim31.maven:scala-maven-plugin:3.2.1:compile (execution: scala-compile, phase: process-resources)
在阅读了一些文章之后,我将以下内容添加到了一些模块的pom.xml(父pom.xml)中:
After read some articles, I added the following to my pom.xml (the parent pom.xml) of a few modules:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.2.1</version>
<goals>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
然后我在所有子模块的pom.xml上收到了一个新错误:
Then I got a new error on the pom.xml for all child modules:
Cannot parse lifecycle mapping metadata for maven project MavenProject:myProject
要摆脱此错误,我还需要做哪些其他设置?谢谢!
What additional settings I need to do to get rid of this error? Thank you!
推荐答案
我可以通过执行以下操作来工作:
I got things to work by doing the following:
在Eclipse中->首选项-> Maven->发现->打开目录->安装Takari Lifecycle支持
In Eclipse -> Preference -> Maven -> Discovery -> Open Catalog -> Install Takari Lifecycle support
这篇关于Scala Eclipse中的Maven Pom错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!