POM.xml中出错 [英] Error in POM.xml

查看:179
本文介绍了POM.xml中出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用maven在eclipse helios中构建openNMS。使用import existing maven project导入源后,我会收到大约10k个错误。另外我在pom.xml本身有一些错误,我认为修复它可以减少错误的数量。 pom.xml中的错误是



m2之前的maven-resources-plugin不受m2e支持。使用maven-resources-plugin 2.4或更高版本。



Iam参考 http://www.opennms.org/wiki/Eclipse_and_OpenNMS 构建openNMS



Iam使用maven可从 http://www.eclipse.org/m2e/download/ 获取

解决方案

如果您告诉我们哪个版本的Eclipse&您正在使用的m2eclipse,以及您正在尝试构建的OpenNMS版本。



如果所有其他方式都失败,您应该能够从命令行运行Maven构建。根据我的经验,命令行构建总是更可靠和可预测的。



还要确保您正在使用与您尝试构建的OpenNMS版本相匹配的说明。







我已经运行命令mvn eclipse:从cmd行下载eclipse的eclipse存储库然后我尝试导入相同的源目录到eclipse只找到10k错误


这不是我的意思。


  • 退出eclipse。

  • 获取命令提示符。


  • 确认源代码

  • 从命令提示符运行mvn install。



您还没有回答我上面提到的问题。如果你不想要来回答,好的,但不要指望我们能够帮助你。







...我得到错误为Build Failure [INFO]有测试失败。


发生的情况是单元测试失败,大概是因为需要设置某些功能才能启用测试。 (也许测试正在尝试与数据库进行交谈?)



有两种解决方案:




  • 找出导致测试失败的原因,并解决它。肯定的报告可能会给你一些线索,并且可能有一些关于测试设置的开发人员文档。


  • 通过添加 -Dmaven.test.skip = true 到 mvn 命令行;请参阅此页面




如果还没有这样做,那么阅读Maven文档也是一个好主意。


I am trying to build the openNMS in eclipse helios using maven. After importing the source using "import existing maven project" i get the around 10k errors. Also i have some error in pom.xml itself, i thought fixing it could reduce the no of errors. The error in pom.xml is

maven-resources-plugin prior to 2.4 is not supported by m2e. Use maven-resources-plugin version 2.4 or later.

Iam referring to http://www.opennms.org/wiki/Eclipse_and_OpenNMS for building the openNMS

Iam using maven available at http://www.eclipse.org/m2e/download/

解决方案

It would help if you told us which versions of Eclipse & m2eclipse you are using, and which version of OpenNMS you are trying to build.

If all else fails, you should be able to run the Maven build from the command line. In my experience, command line builds are always more reliable and predictable.

Also make sure that you are using the instructions that match the version of OpenNMS you are trying to build.


I have run the command mvn eclipse:eclipse from cmd line which downloaded the libraries in repository then i tried to import the same source directory into eclipse only to find 10k errors

That's not what I meant.

  • Get out of eclipse.
  • Get a command prompt.
  • Create a new directory somewhere the is not in your eclipse workspace.
  • Checkout the source code.
  • From the command prompt run "mvn install".

And you haven't answered the questions I asked above. If you don't want to answer, fine ... but don't expect us to be able to help you.


... and i get the error as Build Failure [INFO] There are test failures.

What has happened is that the unit tests have failed, presumably because something needs to be set up to enable testing. (Perhaps, the tests are trying to talk to a database?)

There are two solutions:

  • Find out what is causing the tests to fail, and fix it. The surefire reports may give you some clues, and there may be some developer documentation on the test setup.

  • Turn off the tests by adding -Dmaven.test.skip=true to the mvn command line; see this page.

It would also be a good idea to read the Maven documentation if you haven't done so already.

这篇关于POM.xml中出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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