I know Maven pretty well, but I usually work with Netbeans, which makes it quite easy to deploy Java EE applications - and handle hot deployment of any changes.
The team I work with now uses Eclipse as their IDE of choice, but none of them has worked with Maven projects before; so I need to know how to correctly add Eclipse's project facets to the maven projects we have, in order to support (hot) deployment through WTP. We are using Weblogic 12c for this particular endeavour.
Our project layout is as simple as it gets:
super-project (pom)
project-ear (pom)
project-ejb (pom)
project-web (pom)
Thanks for any resource you can point me to.
解决方案
I suppose that you've installed all required plugins to the Eclipse already. As @Michał Politowski mentions, M2E, M2E-WTP and so on.
Add Archetype Catalog
Go to menu Window--->Preferences.
At the Preferences window, select Maven---->Archetypes,
On the Right Panel, click Add Remote Catalog... button.
At the Remote Archetype Catalog windows enter the following: -
Description Maven Central
Add more remote catalog.
Description Java.Net
Click OK to apply change.
Create the parent project
Go to menu File ---> New ---> Other.
At the Select Wizard Windows, select Maven ---> Project.
Click next and enter the required information so that we are at the New Maven Project.
At the Filter textbox, enter pom
Choose org.codehaus.mojo.archetypes:pom-root:1.1
Click next and enter the required information so that the parent creation is finished.
Create the child project
Right click at the parent project and select New ---> Other.
At the Select Wizard Windows, select Maven ---> Project.
Click next and enter the required information so that we are at the New Maven Project.
You will see that the Parent Project = MY PARENT
Enter the Module name, e.g. my-ear, my-ejb or my-web. Then click Next button,
At the Filter textbox, enter some of the following
org.codehaus.mojo.archetypes:webapp-javaee6:1.5
org.codehaus.mojo.archetypes:ejb-javaee6:1.5
org.codehaus.mojo.archetypes:ear-javaee6:1.5
Click next and enter the required information so that the child creation is finished.
Summary
I've used both NetBeans 7.x and Eclipse Juno together. When I move to Eclipse I've face the issue as same as your. Then I've captured the steps above from NetBeans logs one by one, and do the same thing manually by using Eclipse.
I hope this may help.