8

I have create multi-module maven project in Eclipse IDE (already installed M2Eclipse plugin). There I can build my project successfully. But after build also it shows errors icon in my every module project. What kind of issue it can be?

Thank You.

CoolBeans
  • 20,654
  • 10
  • 86
  • 101
Chandana
  • 2,578
  • 8
  • 38
  • 55
  • 2
    Did you ever bother to read the error messages? That is certainly a better idea than expecting us to guess the error messages. – Vineet Reynolds Aug 23 '11 at 04:01
  • How do you expect people to help you, if you haven't explained the problem? "Oh, look, I have problem! What could it be...?!". – carlspring Aug 23 '11 at 07:19
  • 1
    +1 for describing the problem **very precisely**, as this type of incomplete error reporting isn't accompanied by any text whatsoever (especially not on the `Error Log` or `Console` tabs). The answer by @CoolBeans solved the problem for me, too. – Withheld Aug 12 '13 at 20:04

3 Answers3

24

Without knowing what errors you are seeing I am going to assume that your issue is with eclipse project properties (build path, src directory specification, output classes directory, etc).

You tagged m2eclipse plugin, so you should be able to right click on your project in eclipse select maven->update project configuration. If you do not see that option under maven then you should first see an option called maven->enable dependency management. Click that first and then you should be able to see update project configuration option.

If this does not fix it, then open your project directory containing the pom.xml file in command prompt and run mvn eclipse:eclipse.

One of the above should resolve those pesky error messages provided that your maven build itself is successful.

CoolBeans
  • 20,654
  • 10
  • 86
  • 101
  • It was some maven build related version issues, for Maven 3 must use version number for all build plugins. using Effective POM I fixed the issues. – Chandana Aug 23 '11 at 04:35
  • @CoolBeans, I don't think its a good idea to mix both the eclipse-maven-plugin i.e. `eclipse:eclipse` and m2eclipse. Both of them indulge in their own varieties of magic. – Vineet Reynolds Aug 23 '11 at 04:55
  • @Vineet Reynolds I agree. I gave it as an option incase OP doesnt want to use m2eclipse. – CoolBeans Aug 23 '11 at 05:14
  • @CoolBeans I have updated project configuration as you mentioned. It's work fine and now there is no any error icon. – Chandana Aug 24 '11 at 15:45
  • @Chandana - cool, glad it worked. I personally prefer command line mvn over the m2eclipse plugin to avoid quirkinesses like this :) – CoolBeans Aug 24 '11 at 16:02
  • Updating the Maven project with force update of Snapshots and Releases option fixed the issue. – kanaparthikiran Sep 17 '18 at 18:24
1

In eclipse open the Markers Tab (You can open it from Window -> Show View -> searching Markers)

It will show all the related errors with your project. You can identify your problems related to your problem, and solve accordingly. Sometimes it shows Quick Fix option, which is helpful.

Kowser
  • 8,123
  • 7
  • 40
  • 63
0

For me, the above solution listed out by @CoolBeans was not working out, so i searched further and found out the following:

Go to Problems windows(present besides of Console window). If it is not there then click on Window-> Show View -> Problems

Inside Problems you will be able to see the Errors Description related to your project. In my case it was "java compiler level does not match the version of the installed java project facet". If that is the case for you as well, just follow below steps:

  1. Right Click Project -> Properties
  2. Click Project Facets(present in the left hand side list)
  3. Choose the correct java version in Java Project Facet
  4. Click Apply

That's it!

Ash
  • 137
  • 1
  • 3
  • 12