Error in POM.xml

TechnocraT picture TechnocraT · Jul 26, 2011 · Viewed 8.9k times · Source

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/

Answer

Stephen C picture Stephen C · Jul 26, 2011

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.