安装Maven插件连接器错误 [英] Setup Maven plugin connectors Error

查看:106
本文介绍了安装Maven插件连接器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将项目导入Spring Source Tool Suite(最新版本).

I am trying to import a project into Spring Source Tool Suite (latest version).

该项目以前是从maven原型目录创建的.

The project was previously created from maven archetype cataloge.

我遇到了屏幕截图中显示的错误.

I am getting the errors shown on the screenshot.

我能够在不同的机器上导入相同的项目,但是使用相同的maven存储库(我复制了整个.m2目录),没有任何问题.

I was able to import the same project on a different machine but with the same maven repository (I copied the whole .m2 directory) without any problems.

注意:所有这些树捆绑:com.springsource.bundlor.maven1.0.0.RELEASE,i18n-maven-plugin,maven-dependency-plugin都存在于.m2/repository目录中

Note: all of those tree bundles: com.springsource.bundlor.maven1.0.0.RELEASE, i18n-maven-plugin, maven-dependency-plugin are present in .m2/repository dir

关于如何解决它的任何想法?

Any idea on how to fix it?

在以下地址上出现我的错误的屏幕截图:

screenshot with my error on the address below:

http://imageshack.us/photo/my-images/64 /mavenpluginconnectors.png/

推荐答案

您的错误与项目或Maven配置无关.这与新版本的Eclipse现在内置了M2E(以前称为M2Eclipse)项目有关.

Your error has nothing to do with the project or the maven configuration. It has to do with the fact that the new versions of Eclipse have the M2E (previously known as M2Eclipse) project built into it now.

对新版本进行了改进,以便在导入Maven项目时会读取pom并正确设置Eclipse项目.为此,它需要各种连接器,其中大多数已经可用并且已配置为执行正确的操作.但是,您的插件执行尚未预先配置,因此您需要告诉M2E当Eclipse执行Maven构建时想要发生什么.

The new version has been improved so that as it imports your Maven project it reads the pom and properly sets up the Eclipse project. To do this it needs various connectors, most of which are already available and configured to do the Right Thing. However, your plugin executions have not been pre-configured and so you need to tell M2E what you want to have happen when Eclipse does a Maven build.

对我来说,我通过将以下内容添加到BuildManagement将M2E配置为忽略"这些执行:

For me, I configured M2E to "ignore" these executions by adding the following to BuildManagement:

            <plugin>
                <!--This plugin's configuration is used to store Eclipse m2e settings 
                    only. It has no influence on the Maven build itself. -->
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-dependency-plugin</artifactId>
                                    <versionRange>[1.0,)</versionRange>
                                    <goals>
                                        <goal>copy-dependencies</goal>
                                        <goal>unpack</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore />
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>hibernate3-maven-plugin</artifactId>
                                    <versionRange>[2.2,)</versionRange>
                                    <goals>
                                        <goal>hbm2ddl</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.sonatype.flexmojos</groupId>
                                    <artifactId>flexmojos-maven-plugin</artifactId>
                                    <versionRange>[4.0-RC2,)</versionRange>
                                    <goals>
                                        <goal>compile-swc</goal>
                                        <goal>compile-swf</goal>
                                        <goal>copy-flex-resources</goal>
                                        <goal>generate</goal>
                                        <goal>test-compile</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore />
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>

在这里阅读所有内容:

如何解决生命周期配置未涵盖的插件执行"用于Spring Data Maven构建

这篇关于安装Maven插件连接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆