I have a web app built with Maven. Most of the time, I built the application using Intellij IDEA, but now I want to import the application in Eclipse to see something in th
I was able to resolve this by removing my EAR project from my Eclipse workspace, then re-importing it.
This issue was fixed for me my installing additional eclipse modules. in particular, the ones related to m2e-wtp. just do a search for m2e
in the plugins search listing for your version of eclipse
I used
mvn eclipse:eclipse -Dwtpversion=2.0
in command line in the folder where I had my pom.xml. Then I refreshed the project in eclipse IDE. After that I was able to add my project.
If you face an error like "There are no resources that can be added or removed from the server", then
1) Go to the META_INF of your websvcsEAR and go to the application.xml.
2) Goto modules-> clickDetails and add the module that is existing. i.e., some EAR which your project demands.
3) Click ok
4) Now go to your server -> right click -> add and remove -> add your EAR.
The reason why this is happening is because eclipse by default looks for the deployment descriptor in the folder {project.home}/Webcontent/WEB-INF/web.xml where as the Maven puts them in src/main/webapp/WEB-INF/web.xml.
So when you are trying to add your project onto the server eclipse cannot find a deployment descriptor and hence you get the annoying message.
This can be solved by adding the following entries in .settings/org.eclipse.wst.common which can be found in
Make the following changes in to the org.eclipse.wst.common
Please check the following link from more details. http://java.dzone.com/articles/webapps-eclipse-and-maven. The comments section has an excellent example with a working project.
You need the project to have a Eclipse Dynamic Web Module facet. You can try doing this via the project properties dialog and looking at project facets, then clicking the appropriate check box. This may not be available however, so you may need to do the next thing.
Create a backup of your project and follow the directions at dzone.com. This'll allow you to modify the project facets via your eclipse .project file.
Keep in mind, once you add those facets, you cannot change them back via Eclipse. Definitely make sure you have a backup before starting.