将Maven项目导入Eclipse时出现以下错误:
没有市场条目exec-maven-plugin:1.2.1错误
看起来它会在导入后导致进一步的构建问题 - 比如
生命周期配置未涵盖的插件执行:org.codehaus.mojo:exec-maven-plugin:1.2.1:java(执行:默认,阶段:生成源)
我错过了一个插件或者我的pom.xml有什么问题吗?
已安装m2e:
m2e - Eclipse的Maven集成(包括Incubating组件)1.5.0.20131218-1208 org.eclipse.m2e.feature.feature.group Eclipse.org - m2e
Eclipse Java开发工具3.8.2.v20130116-090414-8-8nFu3FNOfwKLRuqgXKIy9z0I83 org.eclipse.jdt.feature.group Eclipse.org
Eclipse Platform 4.2.1.v20130118-173121-9MF7GHYdG0B5kx4E_SkfZV-1mNjVATf67ZAb7 org.eclipse.platform.feature.group Eclipse.org
Eclipse RCP 4.2.2.v20130129-152330-7IARAABrMQkGSvMgQnUlz-DQz00h org.eclipse.rcp.feature.group Eclipse.org
提前致谢。
答案 0 :(得分:8)
问题是Eclipse的m2e插件不知道你能解决的exec-maven-plugin如下:
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<versionRange>[1.2.1,)</versionRange>
<goals>
<goal>java</goal>
<goal>exec</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>