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 themvn
command line; see this page.
It would also be a good idea to read the Maven documentation if you haven't done so already.
You cannot combine eclipse:eclipse with the m2eclipse support. You cannot use m2eclipse with a project that uses the old resource plugin.
If you want to use eclipse:eclipse, you must use NOT use the 'maven' import from eclipse. Use just 'import existing project'. If you want to use m2eclipse, don't use eclipse:eclipse.
I had this issue with the PDFBox source, with the parent pom for that project. I put this in the pdfbox/pom.xml (just to get it to compile in eclipse at lease, which is the only thing I wanted):
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4</version>
<executions>
<!-- had a process goal here that i removed because it was not compatible -->
</executions>
</plugin>
来源:https://stackoverflow.com/questions/6827836/error-in-pom-xml