eclipse与Scala中的Maven pom错误



我正在导入一个项目,它可以通过"mvn clean install"和旧的eclipse Kepler来工作和构建。我现在将项目导入eclipse Luna/Mars,并得到以下错误:

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)中添加了以下内容:

<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上得到了一个新的错误:

Cannot parse lifecycle mapping metadata for maven project MavenProject:myProject

我需要做哪些额外的设置来消除这个错误?谢谢你!

我做了以下事情:

In Eclipse -> Preference -> Maven -> Discovery -> Open Catalog -> Install Takari Lifecycle support

最新更新