Search code examples
eclipsejakarta-eemavenm2eclipse

Maven Java web project not recognised when importing into Eclipse


A colleague is trying to import a Java web project project into his Eclipse workspace. He's installed the m2e plugin and it recognises the "parent" project and the 3 sub projects it has (which are also Maven projects). However when the projects are imported, Eclipse doesn't seem to recognise them as Java projects (it doesn't show the usual "Java Resources" and "Deployment Descriptor"). The only two things that appear in the Project Explorer are shown below:

screenshot

I've imported the same project using my version of Eclipse and it recognises that the project is a Java web project without any issues. Is there something he needs to do/install to get it to work? He has the Eclipse WTP as well as the m2e plugin, so I can't see any different between his Eclipse installation and mine.


Solution

  • As it turns out, we needed to enable project facets in the project properties. I'm not sure why this wasn't enabled by default like it was when it was imported into my Eclipse installation, but enabling the appropriate project facets fixed the issues we were having.